Repository navigation
Description
Problem Description
Currently, MCP (Model Context Protocol) primarily relies on JSON for transporting context data. While JSON is universal, it is extremely verbose and token-intensive. In an era of expanding context windows, this verbosity translates directly into higher API costs and lower data density per context.
For example, a simple JSON array:
{
"users": [
{ "id": 1, "name": "Alice", "role": "admin" },
{ "id": 2, "name": "Bob", "role": "user" }
]
}
When represented in TOON format, the same data is far more compact, consuming fewer tokens:
users[2]{id,name,role}:
1,Alice,admin
2,Bob,user
Proposed Solution
I strongly propose that MCP adds native support for TOON (Token-Oriented Object Notation) as an efficient, optional serialization format.
TOON Project Repository: https://github.com/toon-format/toon
Core Advantages (Based on TOON's Benchmark Data)
This proposal is based on the impressive benchmark results from the TOON project, which show it excels in both token efficiency and model comprehension.
1. Massive Token Efficiency (Cost Savings)
TOON is optimized for LLM input. Its benchmarks (using the gpt-5-o200k_base tokenizer) show significant savings:
- ~58.8% token reduction vs. formatted JSON on "Flat-Only" (uniform arrays/tabular) data.
- ~21.8% token reduction vs. formatted JSON on "Mixed-Structure" (nested) data.
2. Higher LLM Retrieval Accuracy (Performance Boost)
This isn't just about compression; LLMs appear to understand TOON better. A benchmark test performing 209 data retrieval questions across 4 different models found:
- TOON achieved 73.9% accuracy, while standard JSON achieved only 69.7%
- This gives TOON a superior "Efficiency Ranking" (Accuracy per 1K Tokens) of 26.9, far surpassing standard JSON (15.3) and even compact JSON (22.9).
3. The Perfect Balance of Structure and Efficiency
- TOON is nearly as compact as pure CSV (only 6.0% more tokens on flat data).
- However, unlike CSV, TOON provides full support for nested and complex structures through its indentation-based syntax (similar to YAML). This makes it a true, drop-in replacement for JSON, not a downgrade in capability.
Value Proposition for MCP
MCP is positioned as a "Model Context Protocol" and is the perfect layer to handle this "translation." Developers can continue to work with convenient JSON objects in their application code, while MCP translates the data to the hyper-efficient TOON format just before sending it to the LLM.
Integrating TOON support would provide all MCP users with a powerful "switch" to:
- Drastically reduce API costs.
- Fit significantly more data into the context window.
- Potentially achieve higher data retrieval accuracy than they would with JSON.
This feature would be a significant enhancement to MCP's core value proposition of efficiency, cost-effectiveness, and performance.
Activity
evalstate commentedon Nov 21, 2025
MCP most commonly uses
TextContent[]blocks for Context, which MCP Server developers are free to populate with whatever textual format they choose (Plain Text, Markdown, CSV, XML, JSON and TOON are all acceptable).lovexmm521 commentedon Nov 22, 2025
Thanks for the clarification, @evalstate!
I understand now. I mistakenly thought MCP enforced JSON structure within the TextContent payload itself, but it's great to hear the protocol is agnostic regarding the actual content format.
Since TOON (and similar formats) serves as a valid and highly efficient alternative for TextContent (as you mentioned), I will close this feature request regarding the protocol change.
However, given the significant token savings (~58%) and accuracy improvements shown in the benchmarks, it might be valuable to include a section in the Best Practices or Examples documentation in the future. Showing developers that they aren't limited to JSON for data retrieval—and can use formats like TOON to optimize context windows—could be a big win for the ecosystem.
Thanks again for the quick response!
Squashed 'docs/registry/' changes from e689ee49..5d706049