opencode-plugin-mcp-registry
v0.4.1
Published
OpenCode plugin that verifies MCP servers against a private MCP registry
Maintainers
Readme
opencode-plugin-mcp-registry
An OpenCode plugin that verifies MCP servers configured in OpenCode against a private MCP registry. Unregistered or deleted servers have their tool calls blocked; deprecated servers trigger a warning.
How it works
At startup the plugin fetches the complete server list from your registry and builds an in-memory lookup table keyed by the short name — the part after the / in the registry's reverse-DNS server names (e.g. io.github.jgraph/drawio-mcp → drawio-mcp).
OpenCode MCP config keys are matched against this short name, so your config key just needs to match the last segment of the registry name.
| Registry status | Behavior |
| --------------- | ----------------------------------- |
| active | Tools execute normally |
| deprecated | Warning logged, tools still execute |
| deleted | Tool call blocked with an error |
| Not in registry | Tool call blocked with an error |
If the registry is unreachable at startup, the plugin fails open (logs a warning, allows all servers) so your workflow is not broken by a registry outage.
Install
Add the package to your OpenCode config:
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-plugin-mcp-registry"]
}Configuration
| Environment variable | Default | Description |
| -------------------- | ------------------------------------------------ | ----------------------------- |
| MCP_REGISTRY_URL | https://your-registry.example.com | Base URL of your MCP registry |
Set it in your shell before starting OpenCode:
export MCP_REGISTRY_URL="https://your-registry.example.com"
opencodeNaming convention
Your OpenCode MCP config key must match the short name (part after /) of the registry server name:
{
"mcp": {
"drawio-mcp": {
"type": "remote",
"url": "https://mcp.draw.io/mcp"
}
}
}This matches registry entry io.github.jgraph/drawio-mcp.
The match is case-insensitive and normalizes non-alphanumeric characters to _, so minor differences in punctuation are tolerated.
Development
npm install
npm run typecheckTo test locally, copy index.ts to .opencode/plugins/mcp-registry.ts in your project and set MCP_REGISTRY_URL in your environment.
