toonify-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@toonify-mcpCompress the verbose JSON output from the API"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Toonify MCP
English | 繁體中文 | 日本語 | Español | Français | Deutsch | 한국어 | Русский | Português | Tiếng Việt | Bahasa Indonesia
Context compression plugin for Claude Code. Automatically trims large tool output—JSON, YAML, stack traces, and logs—before it enters the context window.
Works as a Claude Code plugin (automatic, zero-config) or as an MCP server (on-demand).
Features
Compresses large JSON, YAML, and API responses
Reduces long test failures and stack traces
Runs automatically in the background—no change to your Claude Code workflow required
Related MCP server: token-saver-mcp
Limitations
Skipped for short text, very small files, and content where exact original formatting must be preserved.
Installation
git clone https://github.com/PCIRCLE-AI/toonify-mcp.git
cd toonify-mcp
npm install
npm run build
npm install -g .
toonify-mcp setup
toonify-mcp doctortoonify-mcp setup adds the local marketplace and installs, updates, or re-enables the plugin automatically.
Check status
toonify-mcp statusMCP mode (optional)
toonify-mcp setup mcp
claude mcp listclaude mcp list should show toonify: toonify-mcp - ✓ Connected.
Pipe filter (any agent CLI)
toonify-mcp compress reads stdin, compresses what's safe to compress (JSON/YAML → TOON, repetitive logs collapsed; source code, prose, and precision-sensitive numbers pass through untouched), and writes to stdout. It never breaks a pipe — when compression doesn't apply, the input comes out byte-for-byte.
curl -s https://api.example.com/users | toonify-mcp compressThis works with any agent CLI, because output is compressed before it enters the model's context. To have an agent adopt it, add a rule to your project's agent instructions (e.g. AGENTS.md):
When a command is likely to print large JSON/YAML or long logs,
pipe it through `toonify-mcp compress` (e.g. `curl ... | toonify-mcp compress`).
It only rewrites output it can compress losslessly; everything else passes through.OpenAI Codex CLI (on-demand)
toonify-mcp setup codexRegisters toonify as an MCP server in ~/.codex/config.toml (a timestamped backup of the file is made first). Codex can then call the optimize_content tool on demand.
Note: on Codex this is on-demand, not automatic — Codex's hooks cannot yet replace tool output the way Claude Code's updatedToolOutput does, and appending a compressed copy would grow context instead of shrinking it. For automatic compression on Codex, use the pipe filter above.
Docs
Available Tools
5 toolscleanup_expired_cacheB
Clean up expired cache entries and return the number of entries removed
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It states that the tool removes expired entries and returns a count, but does not disclose whether the operation is destructive, reversible, or requires specific permissions. It also does not mention potential side effects like locking or performance impact. Compared to the update_drive example, this is a significant gap for a mutation tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that front-loads the action and the return value. There is no redundant or filler text. Every word contributes to the understanding of what the tool does, making it appropriately concise and well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with no parameters and no output schema, the description does convey the primary purpose and the return value. However, given the absence of annotations, it does not fully address behavioral aspects such as side effects, when it is safe to call, or how it relates to sibling tools. An agent might need additional context to use it correctly, especially to distinguish it from 'clear_cache'.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, so the schema coverage is trivially 100%. The description does not need to add parameter details since there are none. Per the calibration rules, a tool with 0 parameters receives a baseline score of 4, and the description does not introduce any contradictory or confusing information.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('clean up'), the target ('expired cache entries'), and the outcome ('return the number of entries removed'). It is specific and easy to understand. However, it does not explicitly differentiate itself from the sibling tool 'clear_cache', which could also remove cache entries, though 'expired' suggests a narrower scope.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like 'clear_cache' or 'get_cache_stats'. It does not mention any conditions, prerequisites, or scenarios where this tool is preferred. The agent must infer usage from the name and description alone, which may lead to ambiguous selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
clear_cacheB
Clear the optimization result cache
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden of behavioral disclosure. It states 'clear' which implies a destructive, likely irreversible action, but does not mention side effects, performance impact, or whether other cached data is affected. The complete lack of detail on consequences is a significant gap for a mutation tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence with no wasted words. It front-loads the core action and resource. However, it is so brief that it omits important context, though for a zero-parameter tool this brevity is acceptable.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite the tool's simplicity (no parameters, no output schema), it lacks essential context: no indication of when to use it, what happens to the cache, or how it differs from related tools like cleanup_expired_cache. An agent cannot reliably determine if this is the right action without additional information.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has zero parameters, so the description does not need to explain parameter meaning. Since schema coverage is trivially 100% and there are no parameters to document, the baseline of 4 applies, and the description is adequate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('clear') and the target ('optimization result cache'), making the core purpose unambiguous. However, it does not distinguish this tool from the sibling cleanup_expired_cache, which also relates to cache clearing, so it's not fully differentiated.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no guidance on when to use this tool versus alternatives like cleanup_expired_cache or get_cache_stats. No context is given about scenarios where clearing the entire cache is appropriate, nor any exclusions or recommendations.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_cache_statsA
Get detailed cache statistics (LRU cache + Prompt cache)
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description must carry the behavioral burden. It states it is a read operation ('Get'), implying non-destructive behavior, but it does not disclose any other behavioral traits such as potential performance costs, whether the stats are cumulative or per-request, or if any side effects exist. For a simple read tool this may be adequate, but it adds no nuance beyond the obvious.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence that states the action and resource without any fluff. Every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
There is no output schema, so the description must explain what the agent will receive. It mentions 'detailed cache statistics' and names two cache types, but does not enumerate any actual metrics or return format. An agent cannot predict what fields will be present. For a tool with no parameters and no annotations, this is a significant gap.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters and the schema is 100% covered (vacuously). Per the baseline rule for 0-parameter tools, the description does not need to explain parameters. The description does not attempt to add parameter information, which is correct.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('Get') and resource ('cache statistics') and explicitly names two cache types (LRU + Prompt). It clearly distinguishes itself from siblings like clear_cache and cleanup_expired_cache which are mutations, and from optimize_content which is a different operation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is given on when to use this tool versus get_stats or other siblings. The description does not state any exclusions, prerequisites, or alternative selection criteria, leaving the agent to infer when this is the appropriate choice.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_statsB
Get token optimization statistics
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The verb 'Get' implies a read-only operation, which is transparent enough for a basic getter. However, there are no annotations to confirm safety or side effects, and the description does not explicitly state that it has no side effects or that it is safe to call. The description carries the burden but does not fully disclose behavior beyond the implicit read nature.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise phrase with no unnecessary words or repetition. It is front-loaded with the action verb and clearly names the subject. No fluff or redundancy is present.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's low complexity (no parameters, no output schema), the description is almost complete. It tells the agent what the tool does. However, it could be slightly more specific about the nature of the statistics (e.g., counts, sizes, savings) to fully remove ambiguity. Still, for a parameterless getter, this is reasonably complete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, and the schema shows an empty properties object. Since there are no parameters to describe, the description adds no parameter semantics, but the baseline for 0 parameters is 4. The description does not need to add anything beyond what the schema already conveys.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states the action ('Get') and the resource ('token optimization statistics'), but the noun phrase is somewhat vague and does not specify what statistics are included or how they relate to the sibling tools. It is clear enough to understand the general purpose, but not as precise as a description like 'List ALL calls in date range'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus the sibling tools. In particular, 'get_cache_stats' might overlap, but the description does not clarify the distinction or suggest conditions for choosing one over the other. The agent is left without any usage orientation.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
optimize_contentB
Optimize structured data content for token efficiency using TOON format
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | The content to optimize (JSON or YAML) | |
| toolName | No | Name of the tool that generated this content |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full responsibility for behavioral disclosure. It states 'optimize' but does not specify whether the input is modified in place, whether the operation is reversible, what the output format is, or any side effects. The TOON format is mentioned but never explained, leaving the agent to guess about the transformation's nature.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence with no fluff. It is appropriately front-loaded with the core action and format. However, it is so brief that it sacrifices necessary detail, though that is more a completeness issue than a conciseness issue.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has only two parameters and no output schema, so the description should compensate by explaining what the output looks like, what TOON format entails, and any prerequisites. None of this is provided. An agent cannot predict the result of calling this tool beyond a vague notion of optimization, making the description incomplete for safe invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so both parameters are already documented. The description adds no additional meaning about 'content' or 'toolName'—for instance, why toolName might be needed or how it influences optimization. Since the schema already covers the basics, a baseline of 3 is appropriate, but there is room for added context that the description does not provide.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('Optimize') and resource ('structured data content') and introduces the TOON format, which clearly distinguishes it from sibling tools focused on caching and stats. The purpose is unambiguous and does not rely on the tool name.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no guidance on when to use this tool versus alternatives, nor any mention of conditions or exclusions. The description merely states what it does without helping the agent decide when to invoke it, even though the sibling tools are clearly different in function.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
5 tool updates
v0.8.2- First observed
cleanup_expired_cache - First observed
clear_cache - First observed
get_cache_stats - First observed
get_stats - First observed
optimize_content
TDQS
Scored across 5 tools
Each tool has a distinct role—optimize, stats, and cache maintenance—but get_stats vs get_cache_stats and clear_cache vs cleanup_expired_cache could be confused without careful reading. The descriptions generally clarify the boundaries.
All tool names follow a consistent verb_noun snake_case pattern: optimize_content, get_stats, clear_cache, get_cache_stats, cleanup_expired_cache. The naming is predictable and readable.
Five tools is a well-scoped set for a token optimization utility: one core operation, one statistics endpoint, and three cache-management tools. Each tool has a clear place and none feel like filler.
The tool surface covers the main optimize operation, general statistics, and comprehensive cache lifecycle management (view, clear, cleanup expired). This is a complete and practical set for the server's stated purpose.
Maintenance
Related MCP Connectors
Persistent context for Claude. Your AI always knows your projects and next actions across sessions.
Persistent memory for Claude Code and Cursor. Stop re-explaining your project every session.
A paid remote MCP for OpenAI Codex context compressor, built to return verdicts, receipts, usage log
Live SEO workflow tools for Claude Code, Codex, and AI agents.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenance2-5x longer Claude Code sessions before compaction. Saves 30-40% on input token costs. Remembers your rules and corrections so Claude stops repeating mistakes after compaction. Auto-runs in the background, just install once and forget about it.379MIT
- AlicenseNot gradedqualityDmaintenanceAutomatically reduces token usage in Claude Code sessions using algorithmic optimizations like code compression, smart file reading, output summarization, and prompt rewriting, with no extra API calls or cost.13 npm1MIT
- AlicenseNot gradedqualityBmaintenanceEnables local-first context compression for AI agents, offering tools to compress text, retrieve original content, and get compression statistics.214 npmMIT
- AlicenseNot gradedqualityAmaintenanceReduces context window usage by 60-90% through intelligent caching, compression, and smart tool replacements for Claude Code and Claude Desktop.688 npm524MIT