{"slug": "real-token-cost-of-mcp-91k-tokens-of-json", "title": "Real Token Cost of MCP: 91K Tokens of JSON", "summary": "A developer found that connecting Claude Code to five MCP servers consumed 91,000 tokens of JSON schemas before any question was asked, with a single conversation totaling around 120,000 tokens. To address this, they built mcptoon, a CLI that reduces token usage by up to 97% by converting verbose JSON tool definitions into a compact format.", "body_md": "255 MCP tools. 91,000 tokens of JSON schemas. Before you ask a single question. Here's what I found and how I fixed it.\n\nI connected Claude Code to 5 MCP servers. File system, GitHub, Postgres, Puppeteer, and a custom search tool. Then I counted every token that flowed through the system.\n\n**The numbers:**\n\n| Phase | Token Count | What it is |\n|---|---|---|\n| Tool discovery (initial) | 91,247 | JSON schemas for 255 tools |\n| Per-conversation overhead | 12,400 | Repeated schema injections |\n| Tool result wrapping | 812 per call | `{\"content\":[{\"type\":\"text\",\"text\":\"...\"}]}` |\n| 20 tool calls later | 16,240 | Result overhead alone |\nTotal for 1 conversation |\n~120,000 |\nBefore any real output |\n\nThat's a GPT-4 conversation where 60% of your tokens are JSON braces, brackets, and repeated schema definitions.\n\nLet me show you what I mean.\n\nHere's ONE tool definition from a typical MCP server:\n\n```\n{\n  \"name\": \"search_files\",\n  \"description\": \"Search for files matching a pattern in a given directory\",\n  \"inputSchema\": {\n    \"type\": \"object\",\n    \"properties\": {\n      \"pattern\": {\n        \"type\": \"string\",\n        \"description\": \"Glob pattern to match files\"\n      },\n      \"path\": {\n        \"type\": \"string\",\n        \"description\": \"Root directory to search in\"\n      },\n      \"case_sensitive\": {\n        \"type\": \"boolean\",\n        \"description\": \"Whether to perform case-sensitive matching\",\n        \"default\": false\n      }\n    },\n    \"required\": [\"pattern\"]\n  }\n}\n```\n\nThat's 347 characters, ~87 tokens. For ONE tool.\n\nA typical MCP server exposes 30-60 tools. Five servers = 255 tools. That's 22,185 tokens just for tool definitions.\n\nBut it gets worse. The model also gets:\n\nRealistic total: **91K tokens** for a 5-server setup.\n\nEvery MCP tool result comes wrapped in this structure:\n\n```\n{\n  \"content\": [\n    {\n      \"type\": \"text\",\n      \"text\": \"The actual content you care about\"\n    }\n  ]\n}\n```\n\nThat's 47 characters of JSON overhead per result. For a 100-character result, 32% of tokens are pure overhead.\n\nIf the result is structured data:\n\n```\n{\n  \"content\": [\n    {\n      \"type\": \"text\",\n      \"text\": \"{\\\"file\\\": \\\"app.py\\\", \\\"matches\\\": [\\\"line 42\\\", \\\"line 87\\\"]}\"\n    }\n  ]\n}\n```\n\nNow you have JSON inside JSON. The inner JSON is stringified. The outer JSON wraps it. Double encoding. Double parsing. Double tokens.\n\nAt Claude 3.5 Sonnet pricing ($3/M input tokens):\n\n| Scenario | Input Tokens | Cost per Conversation |\n|---|---|---|\n| Without MCP | 10,000 | $0.03 |\n| With 5 MCP servers | 130,000 | $0.39 |\n| With 10 MCP servers | 250,000 | $0.75 |\n| Heavy tool use (50 calls) | 200,000 | $0.60 |\n\nA developer having 20 conversations per day with MCP:\n\nThat's not counting output tokens.\n\n[mcptoon](https://github.com/activeing123/mcptoon) — a CLI that sits between your AI agent and MCP servers. It:\n\nInstead of:\n\n```\n{\"name\": \"search_files\", \"inputSchema\": {\"type\": \"object\", \"properties\": {\"pattern\": {\"type\": \"string\"}, \"path\": {\"type\": \"string\"}}, \"required\": [\"pattern\"]}}\n```\n\nTOON outputs:\n\n```\nname search_files\npattern string required\npath string\n```\n\nThat's 62 tokens instead of 2,034 for all 255 tools. **97% reduction.**\n\n| Metric | Raw MCP | With mcptoon | Savings |\n|---|---|---|---|\n| Tool discovery | 91,247 tok | 2,847 tok | 97% |\n| Per-result overhead | 47 chars | 0 chars | 100% |\n| 20 tool calls | 16,240 tok | 7,080 tok | 56% |\n| 1 conversation total | ~120K tok | ~35K tok | 71% |\n\n```\npip install mcptoon\n```\n\nThen in your Claude Code config:\n\n```\n{\n  \"mcpServers\": {\n    \"filesystem\": {\n      \"command\": \"mcptoon\",\n      \"args\": [\"serve\", \"--stdio\", \"npx\", \"@anthropic/mcp-filesystem\"]\n    }\n  }\n}\n```\n\nOr if you use Cursor:\n\n```\nmcptoon add filesystem --stdio npx @anthropic/mcp-filesystem\nmcptoon list\n```\n\nZero dependencies. 250KB. Works with any agent that runs shell commands.\n\nMCP is a great protocol. The idea of standardizing tool interfaces across AI agents is important. But the implementation has a token efficiency problem that nobody talks about.\n\nWhen Anthropic announced MCP, the examples showed 3-5 tools. That's manageable. But real-world setups have 50-255 tools. At that scale, the JSON overhead becomes the dominant cost.\n\nIf you're building MCP servers:\n\nIf you're consuming MCP tools:\n\nmcptoon is open source, Apache 2.0, zero dependencies:\n\n`pip install mcptoon`\n\nThe entire codebase is readable in an afternoon. No transitive dependencies to audit. No supply chain risk.\n\nIf this was useful, a GitHub star helps others find it. Questions? I'm in the comments.\n\n*This is an independent project. Not affiliated with Anthropic or the MCP team. All token counts are measured, not estimated.*", "url": "https://wpnews.pro/news/real-token-cost-of-mcp-91k-tokens-of-json", "canonical_source": "https://dev.to/mcptokensaver/real-token-cost-of-mcp-91k-tokens-of-json-4goe", "published_at": "2026-08-22 22:19:33+00:00", "updated_at": "2026-08-22 22:43:07.775863+00:00", "lang": "en", "topics": ["developer-tools", "ai-tools", "large-language-models"], "entities": ["Claude Code", "MCP", "mcptoon", "GitHub", "Postgres", "Puppeteer", "Claude 3.5 Sonnet", "Cursor"], "alternates": {"html": "https://wpnews.pro/news/real-token-cost-of-mcp-91k-tokens-of-json", "markdown": "https://wpnews.pro/news/real-token-cost-of-mcp-91k-tokens-of-json.md", "text": "https://wpnews.pro/news/real-token-cost-of-mcp-91k-tokens-of-json.txt", "jsonld": "https://wpnews.pro/news/real-token-cost-of-mcp-91k-tokens-of-json.jsonld"}}