DEV Community

Cover image for Anthropic and MuleSoft Are Now Fighting the Same Bill I've Been Complaining About
MCP Token Saver
MCP Token Saver

Posted on

Anthropic and MuleSoft Are Now Fighting the Same Bill I've Been Complaining About

Two weeks ago, complaining about MCP token costs made you the annoying person
in the room. This week, Anthropic and MuleSoft both shipped features that treat
the exact same problem as a first-class cost — and each of them picked a
different third of the battlefield.

I've been living in this battlefield for two months, building mcptoon, a 128KB
zero-dependency CLI (it lives on PyPI) that compresses MCP payloads. So when
the giants started aiming at the same target, I did what any reasonable
developer does: made a map. Here it is — including the third of the
battlefield that still has nobody on it.

What just happened

Anthropic shipped two capabilities for Claude:

  • Advanced tool use — a tool-search tool that keeps tool definitions out of the context window until needed. Anthropic's own testing with ~58 tools showed tool-definition tokens dropping 85%, and they now have agents running 1,000+ tools.
  • Programmatic tool calling — instead of handing each tool result to the model as context, your agent writes code that calls tools and returns only the distilled answer. Their reported case: 37% fewer tokens in a multi-data-source analysis.

MuleSoft added MCP payload optimization to its enterprise gateway — and the
compression format it picked is TOON, the same token-oriented format
mcptoon has been speaking since the summer.

Three vendors. One diagnosis: MCP payloads are a bill, not a feature.

The map: who fights where

Battlefield Who's on it What they fight
Tool definitions (the catalog) Anthropic (TST), mcptoon The "every session re-charges the full menu" tax
Tool orchestration (how calls happen) Anthropic (PTC) The "every intermediate result becomes context" tax
Tool traffic in transit MuleSoft (gateway) Enterprise traffic, compressed behind a gateway that runs their stack
Tool results on the way back …nobody with a 128KB wheel The "one image tool = megabytes of base64 in context" tax

That last row is the gap. Every discussion about MCP cost is about what goes
in to the model — the catalog, the schemas, the orchestration. But agentic
sessions pump results back into context all day, and results have no
guardrails: a screenshot tool returns base64 PNG, a search tool returns the
full JSON envelope, a database tool returns 200 rows when you asked for 5.

What mcptoon does about it (and what it deliberately doesn't)

mcptoon is result-side discipline, and it's honest about the numbers:

  • Catalog discipline: 255 tools / 50 servers list at 71,929 → 581 tokens (−99.2%) in the default compact view — schemas stay on disk, the model sees a name index and pulls signatures on demand. (Same tax Anthropic's tool-search tool attacks, from the client side instead of the platform side.)
  • Result compression: TOON on tool results saves ~34% vs JSON per payload; the slim manifest format runs 88.5% smaller than raw JSON.

And one design decision I keep explaining to people: you can not compress
everything. An image generator returning base64 must never be squeezed —
compressing it either breaks it or wastes the tokens you were trying to save.
Result-side compression needs per-tool judgment. MuleSoft's per-tool override
policy validated that choice from the enterprise side.

What mcptoon doesn't do, on purpose: it doesn't live inside Claude's platform
like TST/PTC (it works with any agent that speaks MCP), and it doesn't sit in a
gateway (it's a CLI on your machine — no server, no key, no proxy process).

If you use Claude Code, it's a one-line install

Claude Code users can add mcptoon from the plugin marketplace with one line —
the plugin installs the CLI, wires the bridge into your session, and ships a
skill that teaches the agent when to compress and when to ask for the full
payload. No JSON editing — the thing my last three articles were collectively
about. The exact line is in the repo's README.

The bill, in actual money

The standard conversion: $3 per 1M input tokens. Assumptions stated (they
always should be): a working day triggers ~20 catalog loads (agentic style,
every session), 30 days a month.

  • 255 tools, raw catalog: 71,929 tokens → ~$128.43/month
  • 255 tools, mcptoon compact index: 581 tokens → ~$1.05/month

Your number depends on your session frequency — run the math with your own
counts before believing anyone's (including mine).

See it on your own machine

mcptoon installs with one command from PyPI — and its demo command installs a throwaway
server, calls it, and prints the before/after token numbers from your own
machine. No hand-written config, no API key, no account.


Sources: Anthropic's advanced tool use and programmatic tool calling docs
(platform.claude.com), MuleSoft's MCP payload optimization policy
(docs.mcp.mulesoft.com), and mcptoon's own measured benchmarks (tiktoken,
cl100k_base). The full battle map lives in the README.

Top comments (0)