Whittle MCP
Trim test logs, JSON, diffs and OpenAPI files so agents read fewer tokens
Whittle MCP is a free MCP server for ai models and llm tooling. It runs locally on your machine and is started by your AI client.
- Pricing
- Free
- Platforms
- CLI, API
- Runs
- Locally
- Version
- 0.1.1
- Listing updated
Similar MCP servers
Install
Add with the CLI
Run in a terminal
claude mcp add whittle-mcp -- uvx whittle-mcpAdd --scope user to use it in every project, or --scope project to share it in .mcp.json.
Or share it with your project
Add to .mcp.json
{
"mcpServers": {
"whittle-mcp": {
"command": "uvx",
"args": [
"whittle-mcp"
]
}
}
}Add to claude_desktop_config.json
{
"mcpServers": {
"whittle-mcp": {
"command": "uvx",
"args": [
"whittle-mcp"
]
}
}
}Settings → Developer → Edit Config, then quit and reopen Claude Desktop.
Add to ~/.cursor/mcp.json
{
"mcpServers": {
"whittle-mcp": {
"command": "uvx",
"args": [
"whittle-mcp"
]
}
}
}Use .cursor/mcp.json in a project to share it with the project.
Add to ~/.copilot/mcp-config.json
{
"mcpServers": {
"whittle-mcp": {
"type": "stdio",
"command": "uvx",
"args": [
"whittle-mcp"
]
}
}
}Or put the same entry in .mcp.json at your workspace root to share it.
Add with the CLI
Run in a terminal
codex mcp add whittle-mcp -- uvx whittle-mcpOr add to config.toml
Add to ~/.codex/config.toml
[mcp_servers.whittle-mcp]
command = "uvx"
args = ["whittle-mcp"]Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"whittle-mcp": {
"command": "uvx",
"args": [
"whittle-mcp"
]
}
}
}Gemini CLI and Antigravity
Gemini CLI
Add to ~/.gemini/settings.json
{ "mcpServers": { "whittle-mcp": { "command": "uvx", "args": [ "whittle-mcp" ] } } }Or run: gemini mcp add -s user whittle-mcp uvx -- whittle-mcp
Antigravity
Add to ~/.gemini/config/mcp_config.json
{ "mcpServers": { "whittle-mcp": { "command": "uvx", "args": [ "whittle-mcp" ] } } }Use .agents/mcp_config.json to add it to one workspace only.
Devin Desktop (formerly Windsurf)
Add to ~/.config/devin/mcp_config.json
{ "mcpServers": { "whittle-mcp": { "command": "uvx", "args": [ "whittle-mcp" ] } } }On Windows the file is %APPDATA%\devin\mcp_config.json. Use .devin/mcp_config.json to share it with a project.
Cline
Add to cline_mcp_settings.json
{ "mcpServers": { "whittle-mcp": { "command": "uvx", "args": [ "whittle-mcp" ] } } }Open it from the MCP Servers icon → Configure → Configure MCP Servers.
Zed
Add to Zed settings.json
{ "context_servers": { "whittle-mcp": { "command": "uvx", "args": [ "whittle-mcp" ] } } }Open it with zed: open settings file. Merge context_servers into the settings you already have.
JetBrains AI Assistant and Junie
AI Assistant
Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add
{ "mcpServers": { "whittle-mcp": { "command": "uvx", "args": [ "whittle-mcp" ] } } }Junie
Add to ~/.junie/mcp/mcp.json
{ "mcpServers": { "whittle-mcp": { "command": "uvx", "args": [ "whittle-mcp" ] } } }Use .junie/mcp/mcp.json to share it with a project.
Kiro
Add to ~/.kiro/settings/mcp.json
{ "mcpServers": { "whittle-mcp": { "command": "uvx", "args": [ "whittle-mcp" ] } } }Use .kiro/settings/mcp.json to add it to one workspace only.
Using several servers? Build one config file with the MCP config generator.
About Whittle MCP
Whittle MCP shrinks the output that coding agents keep re-reading, such as test runs, logs, large JSON, git diffs and OpenAPI documents, while keeping the facts. Whatever it removes is replaced by a short marker, and an expand tool returns exactly the omitted part on request.
It works as an MCP server started with uvx, and as a shell filter so output can be piped through it, for example a test run into whittle tests. Tools take a file path, and a command mode exists only if the server is started with a flag. A receipt reports tokens before and after, and each trimmer is scored on tokens saved and on whether must-keep facts survive using a public corpus.
Trimmers handle test output from pytest, jest, go test, cargo test and others, logs with collapsed repeats, JSON masking and OpenAPI indexing. A web demo on Hugging Face lets you try it with nothing installed.
Tools this server provides (3)
Taken from the project documentation; the running server may differ.
From the tool list in its README, going by the names, 3 names don't say.
From the server's own tool labels and tool names; not verified by us.
- trim_tests
- Trim test runner output to failures and summary
- trim_log
- Collapse repeats and shorten tracebacks in logs
- mask_json
- Mask large JSON while keeping keys
What it does
- Test output trimming
- Keeps failures, assertions and locations plus the summary.
- Log compaction
- Collapses repeats and shortens tracebacks while keeping distinct errors.
- JSON masking
- Keeps keys and a sample of array items.
- Diff and OpenAPI trimming
- Collapses lockfiles and generated files and indexes operations.
- Expand on demand
- Returns any omitted part using the marker's id.
- Token receipts
- Shows tokens before and after and a running report of savings.
Good for
- Cutting token use from long pytest output
- Summarising a huge API response before an agent reads it
- Shrinking a git diff full of lockfile changes
- Indexing an OpenAPI spec by operation
- Measuring how many tokens trimming saved
Pricing
Free
Free to install from PyPI
Prices change. Check huggingface.co before you buy.
Whittle MCP FAQ
How do I install Whittle MCP?
pip install whittle-mcp, or run it with uvx whittle-mcp.
Does trimming lose information?
Removed parts are replaced by a marker and can be retrieved with expand.
Can Whittle MCP run commands?
Only if you start the server with the allow-run flag; otherwise tools read file paths.
Can I try Whittle MCP without installing?
Yes, a Hugging Face Space lets you paste a log, JSON or diff.
Is Whittle MCP free?
Yes. Whittle MCP is free to use.
How do I add Whittle MCP to Claude Code?
Run this command in your terminal: claude mcp add whittle-mcp -- uvx whittle-mcp
What are the best alternatives to Whittle MCP?
The closest alternatives to Whittle MCP are llmtrim, ctxprune, Token Optimizer MCP, MoneyTools Slim and Tokenectomy Razor.
Where this comes from
- Description: written from the project's README, the project's website and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.