Mcptoon - MCP CLI client cutting token usage by 97%
Show HN: Mcptoon – MCP CLI client that cuts tool discovery tokens by 97%
Mcptoon is a token-efficient MCP CLI client that dramatically reduces the token overhead of MCP (Model Context Protocol) interactions. It achieves a 97% reduction in tool discovery tokens and 40-60% reduction in result tokens by using TOON (Token-Optimized Object Notation) instead of verbose JSON. This pure Python, zero-dependency tool works with every AI agent—including Claude Code, Codex, OpenCode, and Cursor—and supports both stdio and HTTP MCP servers. With a simple CLI, configurable output formats, and safety features, Mcptoon helps developers save significant context window space, enabling more efficient AI conversations.
MCP tool discovery costs 10,000+ tokens. mcptoon costs 350.
- debazel
Why is it replacing true/false with T/F? true/false is already 1 token in all tokenizer I've seen. Even worse is replacing null with ∅. ∅ is a special unicode symbol that takes up 2 tokens compared to the 1 token for null...
- Zinu
I don’t think the Show Me section makes sense, the TOON variant clearly doesn’t have the same information. And the examples in the “How TOON works” section focuses on number of characters instead of tokens. I would think “null” is a single token anyway, why bother replacing it with an uncommon character?
- Loic
I spent more than one week, as a side project, to add an MCP server to my Cheméo website. Only 4 tools.
It took me way more time than expected, I was thinking: "Just wrap the REST API, 2h, done".
The MCP payload has nothing to do with the REST API one. Because you need to make it interpretable and context efficient even so it is structured data.
It was really interesting work and I suppose very little people are taking the time to rethink what is sent over the wire while creating a MCP server. If so, we would not have MCPs with the minimal payload being 500kB of JSON soup.
If you send my MCP through your "save token filter", I can guarantee you, that you will have trash down the line.
- codingjoe
Q: aren't models trained to message templates using JSON for tool calls. Would a model inherently struggle with a different format?
Q: is there a measurable difference compared to harnesses with tool search?
- ameshkov
I made an MCP proxy with a similar idea in the past: replace a ton of tools that consume tokens with just two (get_tool_schema, invoke_tool) - https://github.com/ameshkov/mcp-compress-router
One thing that I noticed is that it’s often better to return tool names with argument names, i.e. return “search_web(query)” instead of just “search_web” when listing tools. Otherwise models often tend to hallucinate argument names and an extra turn is required to correct the mistake.
One additional advantage that such tools provide is that when you use different coding agents you don’t have to set up all the MCP servers in every agent, you just set up one (or point the agent to the cli like in this project).