Creating Plugins
November 15, 2025 ยท View on GitHub
๐ Recommended: Use Plugin Templates
The fastest and easiest way to create a plugin is to use the provided templates. Templates include all necessary boilerplate, build configuration, and documentation out of the box.
Check out our example plugins for insight.
Note: Prior versions of hyper-mcp used a different plugin interface (v1). While this plugin interface is still supported, new plugins should use the v2 interface.
Quick Start with Templates
The recommended way to create a new plugin:
-
Browse available templates in
templates/plugins/ -
Copy the template for your language:
cp -r templates/plugins/rust/ ../my-plugin/ cd ../my-plugin/ -
Follow the template README - each template includes comprehensive setup instructions, examples, and best practices
-
Customize and implement your plugin logic
-
Build and publish using the provided
Dockerfile
See Plugin Templates Documentation for complete details and language options.
Using XTP (Alternative Method)
If you prefer to use the XTP CLI tool:
-
Install the XTP CLI:
curl https://static.dylibso.com/cli/install.sh -s | bash -
Create a new plugin project:
xtp plugin init --schema-file xtp-plugin-schema.yamlFollow the prompts to set up your plugin. This will create the necessary files and structure.
For example, if you chose Rust as the language, it will create a
Cargo.toml,src/lib.rsand asrc/pdk.rsfile. -
Implement your plugin logic in the language appropriate files(s) created (e.g. -
Cargo.tomlandsrc/lib.rsfor Rust) For example, if you chose Rust as the language you will need to update theCargo.tomlandsrc/lib.rsfiles.Be sure to modify the
.gitignorethat is created for you to allow committing yourCargo.lockfile.
Publishing Plugins
Rust
To publish a Rust plugin:
# example how to build with rust
FROM rust:1.88-slim AS builder
RUN rustup target add wasm32-wasip1 && \
rustup component add rust-std --target wasm32-wasip1 && \
cargo install cargo-auditable
WORKDIR /workspace
COPY . .
RUN cargo fetch
RUN cargo auditable build --release --target wasm32-wasip1
FROM scratch
WORKDIR /
COPY --from=builder /workspace/target/wasm32-wasip1/release/plugin.wasm /plugin.wasm
Then build and push:
docker build -t your-registry/plugin-name .
docker push your-registry/plugin-name
Note: The Rust template includes this Dockerfile and all necessary build configuration - no additional setup needed if you're using the template.
Next Steps
- ๐ Plugin Templates Documentation - Comprehensive guide to using templates
- ๐ Rust Plugin Template - Complete Rust plugin setup and development guide
- ๐ Example Plugins - Working examples to learn from
- ๐ MCP Protocol Specification - Protocol details and specifications
- โ๏ธ Extism Documentation - Plugin runtime and PDK documentation