Toon Token Optimizer
About
MCP server for TOON (Token-Oriented Object Notation) - Reduce LLM token usage by 50-70%
Details
- Author
- elminson
- GitHub stars
- 3
- Downloads
- 338
- Categories
- Other, AI, Productivity
Jump to
- Convert JSON, CSV, TSV, XML, HTML tables, and YAML to TOON format
- Decode TOON back to JSON
- Analyze data to show potential token and cost savings
- Automatically find and convert data sections in prompts
- Achieve up to 65% token reduction for structured data
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
Toon Token OptimizerCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Install via npx (no install needed) by adding the server to your MCP settings, or globally with npm install -g toon-mcp-server. Then invoke tools like toon_encode, toon_decode, toon_analyze, or toon_optimize_prompt through your MCP client (e.g., Claude Desktop or Claude Code).
toon_encode
Convert data to TOON (Token-Oriented Object Notation) format to reduce token usage by 50-70%. Supports: JSON, CSV, TSV, XML, HTML tables, YAML, and raw objects. TOON uses a header-based format where field names are defined once: - JSON: {"id":1,"name":"test"} → [id,name]\n1,test - Reduces repetitive keys in arrays of objects Use this before sending large datasets to LLMs to save tokens and costs.
toon_decode
Decode TOON format back to JSON object or array.
toon_analyze
Analyze data and show potential token savings with TOON encoding.
toon_optimize_prompt
Optimize a prompt containing data for token efficiency. Detects data structures within the prompt and converts them to TOON format, adding instructions for the LLM to understand the format. Returns the optimized prompt with estimated token savings.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"toon token optimizer": {
"toon": {
"command": "npx",
"args": [
"-y",
"toon-mcp-server"
]
}
}
}
}
McpServers
{
"toon": {
"command": "npx",
"args": [
"-y",
"toon-mcp-server"
]
}
}
TOON MCP Server
MCP (Model Context Protocol) server for TOON (Token-Oriented Object Notation) encoding. Reduce LLM token usage by 50-70% when sending structured data.
What is TOON?
TOON is a compact data format optimized for LLM input. Instead of repeating field names for every object, it uses a header-based format:
JSON (1041 tokens):
[
{"id": 1, "name": "Product A", "price": 99.99},
{"id": 2, "name": "Product B", "price": 149.99}
]
TOON (389 tokens):
[id,name,price]
1,Product A,99.99
2,Product B,149.99
Result: 62% fewer tokens = 62% cost savings
Installation
Quick Start (npx - no install needed)
Add to your MCP settings:
Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"toon": {
"command": "npx",
"args": ["-y", "toon-mcp-server"]
}
}
}
Claude Code (~/.claude/settings.json):
{
"mcpServers": {
"toon": {
"command": "npx",
"args": ["-y", "toon-mcp-server"]
}
}
}
Global Install
npm install -g toon-mcp-server
Then add to your MCP settings:
{
"mcpServers": {
"toon": {
"command": "toon-mcp"
}
}
}
As Claude Code Skill
```bash
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.





