DEV Community

MCP Token Saver
MCP Token Saver

Posted on

5 MCP pains that waste your tokens — and how I killed all 5 with a 50KB CLI

I've been using MCP servers with Claude Code daily. Here's what nobody tells you:

Pain 1: Context death. Add 10 MCP servers (especially browser tools like puppeteer/playwright) and you get 50,000-100,000+ tokens of {"type":"object","properties":...} before you type a single word. The MCP community itself says "MCP is unusable past 5 servers." Latent Space's analysis confirms: "The MCP protocol creates a scaling cliff around 20-30 tools."

Pain 2: Config hell. Want to add a server? Edit claude_desktop_config.json by hand. Miss a comma → broken. Wrong path → broken. Missing env var → broken. You debug for an hour.

Pain 3: Agent can't self-serve. Your agent says "I need GitHub search." It can't install tools — it's an AI. So you stop coding, edit JSON, restart, and your agent forgot what it was doing.

Pain 4: Reconfigure per agent. Set up 15 servers for Claude Code. Switch to Cursor → different format, redo everything. Then OpenCode. Then Codex. Same servers, 4× the work.

Pain 5: Paying for JSON garbage. Every MCP result: {"content":[{"type":"text","text":"{\"name\":\"react\",\"stars\":219000}"}]} — 80 tokens to deliver 6 tokens of data. Over 200 tool calls, that's 15,000 tokens of pure syntax waste.


The fix: mcptoon

I built mcptoon — a CLI that keeps all your MCP servers configured but their schemas never enter your agent's context.

How? CLI mode.

Your agent runs mcptoon commands instead of connecting to MCP servers as a client. Schemas live on disk in ~/.mcptoon/config.json. Only the compact output you request enters context.

Measured results (255 tools, 5 formats)

Tools JSON Standard TOON mcptoon SLIM Compact
50 17,790 8,776 (-51%) 6,981 (-61%) 1,203 (-93%) 117 (-99%)
255 90,804 44,863 (-51%) 35,735 (-61%) 6,174 (-93%) 117 (-100%)

Simon Willison said it: "JSON is the least token-efficient format possible for structured data sent to an LLM." TOON fixes this.

TOON vs JSON

JSON (287 tokens):

[{"name":"search_web","description":"Search the web","inputSchema":{"type":"object","properties":{"query":{"type":"string"},"num_results":{"type":"number","default":5}},"required":["query"]}},{...}]
Enter fullscreen mode Exit fullscreen mode

TOON (5 tokens):

search_web fetch_url
Enter fullscreen mode Exit fullscreen mode

One config, every agent

pip install mcptoon
mcptoon init
mcptoon add fetch --stdio npx -y @modelcontextprotocol/server-fetch
mcptoon manifest --compact    # → all tool names, 117 tokens
Enter fullscreen mode Exit fullscreen mode

Works with Claude Code, Cursor, Codex, OpenCode, CatPaw — any agent that runs shell commands. Zero dependencies. 50KB. Python 3.10+. Apache 2.0.

Your agent can even install its own tools: mcptoon add github --stdio npx -y @modelcontextprotocol/server-github

GitHub: https://github.com/activeing123/mcptoon


Curious — what's your MCP token overhead? My benchmark scripts are in the repo.

Top comments (0)