MetaMCP — Claude Code MCP server: what it does, how to install
An on-demand gateway for secondary MCP servers. It exposes three fixed tools to discover schemas, run lazy child tools, and execute verified workflows.
claude mcp add metamcp -- npx -y @mentu/metamcpWhat MetaMCP does
MetaMCP acts as a routing layer for MCP servers that are not needed on every turn. Connecting dozens of servers directly inflates the client prompt with tool definitions. MetaMCP replaces them with three predictable tools: mcp_discover to inspect cached schemas, mcp_call for on-demand execution, and mcp_run for pipeline tasks.
Downstream servers live in a .mcp.json configuration file and stay dormant until summoned. MetaMCP also supports Methods, which are declarative JSON manifests with strict step dependencies, input validation, and execution bounds.
Methods that alter state are blocked unless MetaMCP starts with the --allow-writes flag. The package requires Node.js 20 or newer. Foundational servers with sensitive authentication or frequent access should remain connected directly rather than routed through this gateway.
What it helps with
- reduce tool schema overhead in the model context
- load secondary MCP servers on demand without idling processes
- execute multi-step workflows via validated JSON Methods
- prevent unvetted mutations during automated tool retries
Example prompts for the agent
- Search for page capture tools using
mcp_discover - Execute
capture_pageon thebrowserchild server usingmcp_call - Run the
content.acquire-and-normalizeworkflow viamcp_run
How to install MetaMCP
Platform CLI
claude mcp add metamcp -- npx -y @mentu/metamcpPlatform CLI
codex mcp add metamcp -- npx -y @mentu/metamcpConfig file
{
"mcpServers": {
"metamcp": {
"command": "npx",
"args": [
"-y",
"@mentu/metamcp"
]
}
}
}Config file
{
"servers": {
"metamcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@mentu/metamcp"
]
}
}
}Platform CLI
gemini mcp add metamcp npx -y @mentu/metamcpStep by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about MetaMCP
How do I install MetaMCP in Claude Code?
Run claude mcp add metamcp -- npx -y @mentu/metamcp. Then configure your target child servers in .mcp.json.
What is MetaMCP designed for?
It aggregates long-tail servers behind a small interface. Instead of exposing every tool schema at startup, it launches child servers only when explicitly called.
Why do mutating Methods fail by default?
Methods declaring write effects are disabled for safety. You must launch the gateway with --allow-writes to permit operations that modify external resources.