Automatically reduce Claude API token usage by 30-65% (typically 50-55%) for JSON, CSV, and YAML data through transparent TOON format conversion.
Built for developers who care about efficiency
PostToolUse hook intercepts tool results and applies TOON format conversion transparently. No manual calls needed.
claude plugin add toonify-mcp
LRU cache with TTL expiration achieves 50-500x performance improvement on cache hits (~0.1ms vs 5-50ms).
Accurate token counting for 15+ languages with language-aware multipliers (2x Chinese, 2.5x Japanese, 3x Arabic).
Works out of the box with sensible defaults. Optional configuration file for advanced customization.
Works as Plugin (automatic) or MCP Server (manual). Choose the mode that fits your workflow.
Track token savings locally with comprehensive statistics. Monitor cache hit rates and performance.
Transparent optimization in Plugin mode
Claude Code calls Read tool to fetch file contents
Hook automatically checks if content should be optimized
JSON/CSV/YAML converted to compact TOON representation
50-55% typical token reduction achieved ✨
Get started in minutes
# Download the repository
git clone https://github.com/PCIRCLE-AI/toonify-mcp.git
cd toonify-mcp
# Install deps and build
npm install
npm run build
# Install globally from local source
npm install -g .
# Add as plugin (automatic mode)
claude plugin add toonify-mcp
# Verify installation
claude plugin list
# Should show: toonify-mcp ✓
That's it! The PostToolUse hook will now automatically intercept and optimize structured data from Read, Grep, and other file tools.
# Prerequisite: complete Option A to install toonify-mcp
# Register as MCP server
claude mcp add toonify -- toonify-mcp
# Verify
claude mcp list
# Should show: toonify: toonify-mcp - ✓ Connected
For explicit control or non-Claude Code MCP clients. Call tools manually when needed.
See the token reduction in action
{
"products": [
{"id": 101, "name": "Laptop Pro", "price": 1299},
{"id": 102, "name": "Magic Mouse", "price": 79}
]
}
[TOON-JSON]
products[2]{id,name,price}:
101,Laptop Pro,1299
102,Magic Mouse,79
Join developers who are saving 30-65% on Claude API token costs