ToonifySAFE
Context compression plugin for Claude Code. Automatically trims large tool output—JSON, YAML, stack traces, and logs—before it enters the context window.
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
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
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 doctor
toonify-mcp setup adds the local marketplace and installs, updates, or re-enables the plugin automatically.
Check status
toonify-mcp status
MCP mode (optional)
toonify-mcp setup mcp claude mcp list
claude 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 compress
This works with any agent CLI, because output is compressed before it enters the model's context. To have an agent adopt it, add a ru
26dc4dee5831OBSERVED · 2026-10-07Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.
claude mcp add toonify-mcp --env ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY} --env TOONIFY_MIN_TOKENS=${TOONIFY_MIN_TOKENS} -- npx -y [email protected]{
"mcpServers": {
"toonify-mcp": {
"command": "npx",
"args": [
"-y",
"[email protected]"
],
"env": {
"ANTHROPIC_API_KEY": "${ANTHROPIC_API_KEY}",
"TOONIFY_MIN_TOKENS": "${TOONIFY_MIN_TOKENS}"
}
}
}
}Exposed tools (5)
4 read · 0 write · 1 destructive. Blast radius: 1 tool can delete or overwrite — an agent that can be talked into calling a tool can be talked into calling this one.
| Tool | Risk | Description |
|---|---|---|
cleanup_expired_cache | read | Clean up expired cache entries and return the number of entries removed |
clear_cache | destructive | Clear the optimization result cache |
get_cache_stats | read | Get detailed cache statistics (LRU cache + Prompt cache) |
get_stats | read | Get token optimization statistics |
optimize_content | read | Optimize structured data content for token efficiency using TOON format |
Trust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | WARN |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- declared (5 observation(s))
- Network
- none-observed
- Shell
- none-observed
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (7)
clear_cache
const { version } = require('../../package.json') as { version: string };const { version } = require('../../package.json') as { version: string };const { version } = require('../../package.json') as { version: string };const { version } = require('../../package.json') as { version: string };import { Pipeline } from '../../src/optimizer/pipeline/pipeline';@modelcontextprotocol/sdk, @toon-format/toon, tiktoken, yaml, @jest/globals, @swc/core, @swc/jest, @types/jest
Gates applied: no_behavioural_pass.
26dc4dee5831full audit observations/trust-audit/mcp-server/pcircle-ai__toonify.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-07 | 26dc4dee5831 | SAFE | B | 89 | first audit |
Questions
What is the Toonify MCP server?
Context compression plugin for Claude Code. Automatically trims large tool output—JSON, YAML, stack traces, and logs—before it enters the context window.
What tools does Toonify expose?
5 in total: 4 read-only, 0 that write, and 1 that can delete or overwrite (clear_cache). Every one is listed on this page with its risk.
Is Toonify safe to connect to an agent?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B. Separately from the audit: 1 of its tools can destroy data, so scope the token you give it to what you actually need.
What credentials does Toonify need?
It reads ANTHROPIC_API_KEY and TOONIFY_MIN_TOKENS from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How does Toonify run?
It speaks stdio, so it runs as a local process your client starts. It is published on npm as toonify-mcp at 0.8.2.
How current is this page?
The grade is for one exact copy of the source (26dc4dee5831), read on 2026-10-07. The repository is watched and re-audited when it changes.