Developer builds CLI tool to cut MCP server token usage by 91% in AI coding agents
A developer created an open-source CLI tool called mcptoon that compresses the JSON schemas dumped into context by MCP servers, reducing token consumption from roughly 40,000 tokens to around 3,500 for 255 tools. The tool replaces verbose JSON schemas with a compact pipe-delimited format and returns tool results as human-readable key-value pairs instead of nested JSON. At GPT-4o pricing, the developer estimates savings of around $540 per month across 100 daily sessions. An early version inadvertently increased token count by substituting null with a Unicode symbol, a mistake caught by the developer community and later corrected using tiktoken-verified measurements. The tool works with any shell-command-capable agent and uses a single configuration file compatible across platforms like Claude Code, Cursor, and OpenCode.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in