Gateway MCP Pattern
Tool-access architecture where the agent sees one small MCP router while backend service schemas are loaded or invoked lazily. It preserves structured MCP-style outputs without injecting every service's full tool catalog into every prompt.
Key points
- In [src-041], the Nexus-Dev gateway exposes a single routing tool with about 20 tokens of fixed schema overhead.
- The gateway has slightly higher per-operation cost than Native MCP because each call includes a routing envelope, but the fixed cost remains tiny even as backend services grow [src-041].
- For a 20-prompt session with two GitHub operations, the article estimates the gateway at 892 tokens versus 61,654 for Native GitHub MCP [src-041].
- Gateway MCP is recommended for services used regularly but not constantly, roughly the 15-40 percent G/N band, and can also compete with on-demand skills in the 5-15 percent band [src-041].
- The pattern is especially useful for general-purpose coding agents that may need many external services, but only a few in any single session [src-041].
Related entities
Related concepts
- Model Context Protocol
- Tool Schema Tax
- Gn Ratio Tool Selection
- MCP Vs Cli Token Tradeoff
- Agent Orchestration
Source references
- [src-041] Marco Mornati — "The Future of Agentic Tooling: MCP Servers vs. CLI A Data-Driven Comparison" (2026-04-27)
Recommended next
Keep reading from this thread
From 500 indexed pages and articles.
- Wiki concept Tool Schema Tax The fixed context cost paid when an agent runtime injects tool schemas into every prompt, regardless of whether those tools are used in Related by gateway
- Wiki concept G/N Ratio Tool Selection Decision framework for choosing between CLI, on-demand skill files, Gateway MCP, and Native MCP by estimating how often a service is actually Related by gateway
- Wiki concept On-Demand Skill Files Pattern for keeping service-specific CLI/API guidance out of the always-loaded project context until the agent actually needs that service. Related by 041