पेज · Orchestra MCP
Plugin Development
This guide covers how to create plugins that are installable via orchestra install.
Requirements
For a plugin to be installable, it must:
- Be a Go module hosted on GitHub (e.g.,
github.com/my-org/my-plugin). - Build to a single binary with an entry point at
cmd/main.goor the module root. - Support the
--manifestflag that prints plugin metadata as JSON to stdout and exits. - Print
READY <addr>to stderr when the QUIC server is listening. - Accept standard plugin flags:
--orchestrator-addr,--listen-addr,--certs-dir.
All of these are handled automatically by the SDK if you use plugin.New(...).BuildWithTools() and call p.ParseFlags().
Plugin Structure
Manifest Format
When --manifest is passed, the binary must print JSON to stdout and exit:
The orchestra install command uses this to register the plugin's capabilities.
Distribution
Option A: Pre-built Binaries (Recommended)
Create GitHub Releases with platform-specific tarballs:
Each tarball should contain the plugin binary at the root level. The binary name must match the repository name.
Use GitHub Actions or GoReleaser to automate this.
Option B: Source Build
If no release binary is available, orchestra install falls back to cloning the repo and running go build. The build target is auto-detected:
cmd/main.goexists -> build./cmd/cmd/directory exists -> build./cmd/- Otherwise -> build
./
Installation Flow
When a user runs orchestra install github.com/my-org/my-plugin:
- Attempt to download
my-plugin-{os}-{arch}.tar.gzfrom GitHub Releases. - If download fails (and
--binarynot set), clone the repo andgo build. - Place the binary in
~/.orchestra/plugins/bin/my-plugin. - Run
my-plugin --manifestto discover capabilities. - Register in
~/.orchestra/plugins/registry.json.
Integration with orchestra serve
When orchestra serve starts, it:
- Loads the plugin registry from
~/.orchestra/plugins/registry.json. - Adds each registered plugin to the orchestrator's
plugins.yamlconfig. - The orchestrator starts the plugin binary with standard flags.
- The plugin's tools become available through MCP.
Testing Your Plugin
Test that your plugin works with Orchestra end-to-end:
Example: Minimal Plugin
go.mod:
cmd/main.go: