mcptoon — Claude Code MCP server: what it does, how to install
Compacts MCP tool schemas down to 581 tokens to protect your model context. Useful when running dozens of local tools across desktop and CLI agents.
claude mcp add mcptoon -- uvx mcptoonWhat mcptoon does
The utility creates a compact index of MCP tool schemas instead of passing complete parameter definitions into the context window. Full schemas load on demand. If a tool output gets truncated, the reversible compression mechanism lets you retrieve the original content using an assigned handle.
The package relies solely on the Python standard library and occupies 534KB. You can scan existing local MCP servers with mcptoon quickstart, which configures client agents and provides the /mcptoon skill automatically.
A fresh setup can stay in direct mode without reducing tokens, so check active behavior with mcptoon mode. Agents can also search for uninstalled servers by task description and invoke them directly.
What it helps with
- shrink tool schema overhead in the model context window
- discover and install MCP servers using plain-text queries
- retrieve uncompressed tool outputs from stored reference handles
- sync tool configurations across multiple CLI and desktop agents
Example prompts for the agent
- Load the /mcptoon skill and check what MCP tools are currently available.
- Locate an MCP tool for HTML to PDF conversion and run it.
- The tool output was cut short, fetch the original text using mcptoon.
How to install mcptoon
Platform CLI
claude mcp add mcptoon -- uvx mcptoonuvx runs the command named after the package; if the README names another one, use uvx --from mcptoon <command>
Platform CLI
codex mcp add mcptoon -- uvx mcptoonuvx runs the command named after the package; if the README names another one, use uvx --from mcptoon <command>
Config file
{
"mcpServers": {
"mcptoon": {
"command": "uvx",
"args": [
"mcptoon"
]
}
}
}uvx runs the command named after the package; if the README names another one, use uvx --from mcptoon <command>
Config file
{
"servers": {
"mcptoon": {
"type": "stdio",
"command": "uvx",
"args": [
"mcptoon"
]
}
}
}uvx runs the command named after the package; if the README names another one, use uvx --from mcptoon <command>
Platform CLI
gemini mcp add mcptoon uvx mcptoonuvx runs the command named after the package; if the README names another one, use uvx --from mcptoon <command>
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about mcptoon
How to install mcptoon in Claude Code?
Run the terminal command claude mcp add mcptoon -- uvx mcptoon to register the server.
What does mcptoon do?
It optimizes tool schemas and consolidates MCP management so extensive toolsets do not exhaust agent context limits.
How to verify that mcptoon is actually saving tokens?
Run mcptoon mode in your terminal: after a fresh installation, the tool might sit in direct mode without compressing schemas.