- ✅ Support for two
.mcp.jsonformats:- Direct format (Claude Code standard):
{"server-name": {...}} - Wrapped format (backward compatible):
{"mcpServers": {"server-name": {...}}}
- Direct format (Claude Code standard):
- ✅ Support for inline
mcpServersinplugin.json - ✅ Automatic merging of
.mcp.jsonandplugin.jsonMCP servers
- ✅
${CLAUDE_PLUGIN_ROOT}→ Plugin cache directory path - ✅
${PLUGIN_NAME}→ Plugin name - ✅
${PLUGIN_VERSION}→ Plugin version - ✅ Applied to:
command,args,url,envvalues
- ✅ stdio: Local process execution (e.g.,
bun run server.ts) - ✅ http: HTTP/HTTPS endpoints
- ✅ sse: Server-Sent Events
- ✅ websocket: WebSocket connections
- ✅ headers: HTTP headers for authentication
- ✅ ALL plugin files are copied to cache (not just skills/commands/agents)
- ✅ MCP server source files (
.ts,.js,.py, etc.) - ✅ Dependency files (
package.json,requirements.txt, etc.) - ✅ Configuration files (
.npmrc,.env.example, etc.) - ✅ Lock files (
bun.lock,package-lock.json, etc.)
- Plugin files copied to cache directory
.mcp.jsonparsed and variables substituted- MCP servers registered with plugin name prefix (e.g.,
discord.discord) - Configuration written to
~/.config/opencode/.mcp.json
- Plugin cache directory removed
- Symlinks removed (skills, commands, agents)
- MCP servers with plugin prefix removed from
.mcp.json
- ✅ Fixed
copyPluginToCacheto copy ALL files, not just specific directories - ✅ Fixed
copyDirto use proper recursive copy instead ofos.Rename - ✅ Fixed
ReadPluginJSONto returnnilinstead of error when file doesn't exist - ✅ Fixed marketplace name not being set during plugin installation
- ✅ Fixed plugin removal not working when marketplace name is empty
- ✅ MCP config parsing (both formats)
- ✅ Variable substitution
- ✅ MCP server installation/uninstallation
- ✅ Plugin prefix handling
- ✅ Full plugin installation with MCP servers
- ✅ Real plugin testing (playwright, github, discord)
# Install Discord plugin (stdio MCP server with source code)
$ opencode-plugin plugin install discord
✓ Successfully installed plugin: discord@0.0.4
From marketplace: anthropics/claude-plugins-official
Cache: ~/.opencode-plugin-cli/cache/.../discord/0.0.4
Skills: 2, Commands: 0, Agents: 0
MCP Servers: 1
# Verify MCP config
$ opencode-plugin mcp show discord.discord
MCP Server: discord.discord
Type: stdio
Command: bun
Arguments:
- run
- --cwd
- /Users/.../cache/.../discord/0.0.4 # Variable substituted!
- --shell=bun
- --silent
- start
# Verify all files copied
$ ls cache/.../discord/0.0.4/
.claude-plugin/ .mcp.json .npmrc ACCESS.md bun.lock
LICENSE package.json README.md server.ts skills/
# Install GitHub plugin (HTTP MCP server)
$ opencode-plugin plugin install github
✓ Successfully installed plugin: github@latest
MCP Servers: 1
$ opencode-plugin mcp show github.github
MCP Server: github.github
Type: http
URL: https://api.githubcopilot.com/mcp/
Headers:
Authorization=Bearer ${GITHUB_PERSONAL_ACCESS_TOKEN}
# Install Playwright plugin (stdio MCP server, npm package)
$ opencode-plugin plugin install playwright
✓ Successfully installed plugin: playwright@latest
MCP Servers: 1
# List all MCP servers
$ opencode-plugin mcp list
Installed MCP Servers:
NAME TYPE COMMAND/URL
discord.discord stdio bun
github.github http https://api.githubcopilot.com/mcp/
playwright.playwright stdio npx
# Uninstall removes MCP servers automatically
$ opencode-plugin plugin remove discord
✓ Removed cache: .../discord/0.0.4
✓ Successfully removed plugin: discord (2 symlinks removed)
$ opencode-plugin mcp list
NAME TYPE COMMAND/URL
github.github http https://api.githubcopilot.com/mcp/
playwright.playwright stdio npxinternal/mcp/manager.go- MCP configuration managerinternal/mcp/manager_test.go- Comprehensive unit testsinternal/plugin/installer.go- Updated to copy all plugin filesinternal/marketplace/manager.go- Fixed to return marketplace namecmd/mcp/mcp.go- CLI commands for MCP management
docs/MCP.md- Complete MCP documentationREADME.md- Updated with MCP featurestest/e2e/mcp_integration_test.go- Integration teststest/e2e/real_plugin_test.go- Real plugin tests
-
Copy ALL plugin files: Instead of only copying
skills/,commands/,agents/, the installer now copies everything (except.git). This ensures MCP server source code and dependencies are available. -
Plugin name prefix: MCP servers are prefixed with plugin name (e.g.,
discord.discord) to avoid conflicts between plugins with same server names. -
Variable substitution at install time: Variables are replaced when installing, not at runtime, for better performance.
-
Support both MCP config formats: The system accepts both the direct format (Claude Code standard) and wrapped format for backward compatibility.
-
Optional plugin.json: MCP-only plugins can have just
.mcp.jsonwithoutplugin.json.
- MCP servers are not validated for executable permissions
- No MCP server health checking
- No MCP server dependency management (user must install bun, node, etc.)
- Could add
opencode-plugin mcp validatecommand - Could add MCP server logs viewing