Guide for bundling MCP servers with plugins. Use when the user asks to "add MCP server", "integrate MCP", "external tools", ".mcp.json", or "Model Context Protocol".
From claude-plugin-devnpx claudepluginhub nthplusio/functional-claude --plugin claude-plugin-devThis skill uses the workspace's default tool permissions.
Executes pre-written implementation plans: critically reviews, follows bite-sized steps exactly, runs verifications, tracks progress with checkpoints, uses git worktrees, stops on blockers.
Guides idea refinement into designs: explores context, asks questions one-by-one, proposes approaches, presents sections for approval, writes/review specs before coding.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
Guide for bundling MCP (Model Context Protocol) servers with plugins.
my-plugin/
├── .claude-plugin/
│ └── plugin.json
└── .mcp.json # MCP server configs
{
"server-name": {
"command": "${CLAUDE_PLUGIN_ROOT}/servers/my-server",
"args": ["--config", "${CLAUDE_PLUGIN_ROOT}/config.json"],
"env": {
"API_KEY": "${API_KEY}"
}
}
}
Key conventions:
${CLAUDE_PLUGIN_ROOT} for plugin-relative paths in command and args${ENV_VAR} syntax for secrets in envcommand + args; remote servers use urlFor simple MCP servers, define directly in marketplace.json:
{
"name": "github",
"source": "./external_plugins/github",
"strict": false,
"mcpServers": {
"github": {
"command": "npx",
"args": ["-y", "@anthropic/github-mcp"]
}
}
}
Note: strict: false is required when defining mcpServers inline.
MCP tools are namespaced: mcp__<server>__<tool>
Examples:
mcp__postgres__querymcp__github__create_issueUse in hook matchers:
{
"matcher": "mcp__postgres__.*"
}
For wrapping third-party MCP servers as standalone plugins:
external_plugins/
└── service-name/
├── .claude-plugin/
│ └── plugin.json
└── .mcp.json
Document required environment variables in README.