Repository navigation
sub-mcp — zero-overhead MCP proxy for AI coding agents
Give subagents MCP access without loading schemas into the main session. The main agent's context window stays clean; subagents get full MCP tools on demand.
Features
- Transparent wrapper — installs to
~/.sub-mcp/bin/claude, interceptsclaude -pcalls and injects--mcp-config - Seamless tool approval — automatically adds
--allowedToolsto pre-approve injected MCP tools, so subagents work without interactive permission prompts - MCP-first system prompt — auto-injects a default system prompt nudging subagents to prefer MCP tools over built-in alternatives (WebFetch, WebSearch). Override per-profile with a custom
systemPromptin profiles.yml. - Profile-based routing — named MCP configurations with per-profile model, budget, and system prompt overrides
isolateMcpsupport — profiles can use--strict-mcp-configto prevent inheriting parent MCPs- Zero secrets on disk — env vars stored as
${VAR}placeholders, resolved at runtime only - Direct query mode —
sub-mcp query -p <profile> <prompt>for explicit profile routing - CWD-independent config —
sub-mcp refreshworks from any directory (falls back to~/.sub-mcp/profiles.yml) - Anti-recursion — spawner reads saved real-claude-path to avoid re-entering the wrapper
Quick start
npm install && npm run build
node dist/cli.js install
export PATH="$HOME/.sub-mcp/bin:$PATH"Full changelog
See README for complete documentation.