MCP Servers
Bundle Model Context Protocol servers to provide agents with additional tools and data sources.
Plugins can bundle Model Context Protocol (MCP) servers to provide the agent with additional tools and data sources.
Configuration Format
MCP servers are configured in .mcp.json at the plugin root.
{
"mcpServers": {
"plugin-database": {
"command": "${PLUGIN_ROOT}/servers/db-server",
"args": ["--config", "${PLUGIN_ROOT}/config.json"],
"env": {
"DB_PATH": "${PLUGIN_ROOT}/data"
}
},
"plugin-api": {
"command": "npx",
"args": ["@company/mcp-server", "--plugin-mode"],
"cwd": "${PLUGIN_ROOT}"
}
}
}Server Configuration Schema
| Field | Required | Type | Description |
|---|---|---|---|
command | Yes | string | The executable to run. Supports ${PLUGIN_ROOT}. |
args | No | string[] | Command-line arguments. ${PLUGIN_ROOT} is expanded. |
env | No | object | Environment variables. Values support ${PLUGIN_ROOT}. |
cwd | No | string | Working directory. Supports ${PLUGIN_ROOT}. |
Lifecycle
- MCP servers MUST start automatically when the plugin is enabled.
- MCP servers MUST stop when the plugin is disabled or the session ends.
- If a server fails to start, the tool SHOULD log the error and continue.
Discovery
Tools MUST discover MCP server configurations in:
.mcp.jsonat the plugin root- Inline in the manifest's
mcpServersfield - Any additional paths declared in the manifest
Compatibility
This spec does not redefine the MCP protocol. Plugin MCP servers MUST implement the Model Context Protocol as specified by that project.