
terse
Lossless token-compression proxy that shrinks MCP tool output for AI agents
The repository was last updated 2 days ago and is published under MIT.
terse is an open-source MCP server for developer tools. It is available on CLI, API, Self-hosted, Linux, macOS and Windows.
- Pricing
- Open source
- Platforms
- CLI, API, Self-hosted
- GitHub stars
- 3
- Last commit
- Language
- Python
- License
- MIT
Similar MCP servers
About terse
Sits between an MCP client and any downstream MCP server and rewrites JSON tool results into a denser form the model still reads value for value. Repeated keys, repeated values and repeated nested shapes are folded, and every transform has an exact inverse that is checked by a round-trip test, so nothing the model receives is dropped or altered.
The proxy is selective: it applies per-tool policies and passes through output it cannot shrink, so results never grow. A live ledger records sizes and decisions without storing content, letting a user see what was saved in their own sessions. Lossy modes exist but are opt-in and off by default.
It suits developers who run agents against verbose, record-heavy APIs such as issue trackers, REST endpoints or database rows, and who want token savings without a model in the loop or a cache that expires.
What it does
- Lossless JSON codec
- Folds repeated keys, values and subtrees while guaranteeing the original data can be rebuilt exactly.
- Transparent MCP proxy
- Wraps any stdio MCP server so the client talks to it exactly as before.
- Per-tool policies
- Applies compression tiers selectively per tool and passes through output it cannot shrink.
- Savings ledger
- Records payload-free statistics so users can see tokens saved per session with the terse stats command.
- Cross-call diff (opt-in)
- Sends lossless deltas for repeated calls to the same tool when enabled.
- Client config wrapping
- Rewrites MCP client configuration to route a server through terse and restores it cleanly on request.
Good for
- Reduce tokens spent reading verbose GitHub or issue-tracker API results in an agent loop
- Cut context costs for agents that query database rows through an MCP server
- Measure whether compressing MCP tool output actually saves money in your own sessions
- Wrap an existing MCP server in Claude Code without changing the server itself
Pricing
Open source
Free and open source under the MIT licence.
terse FAQ
Does terse change the values the model receives?
No. Every transform has an exact inverse and a round-trip gate checks that decompressing returns the original data.
Does terse need a model or an API key?
No model runs in the proxy; compression is deterministic and does not call a model.
Will terse make small results bigger?
No. Output it cannot shrink is passed through unchanged, so a result body never grows.
How do I install terse?
Install the terse-mcp package with uv tool install or pipx, or run it through the provided Docker image.
Is terse free?
Yes. terse is open source, so you can use and self-host it for free.
What are the best alternatives to terse?
The closest alternatives to terse are TokenSlim MCP — verifiable token reduction for agents, token-disrespector, slimproof, Jmunch MCP and mcp-context-condenser.
Where this comes from
- Description: written from the project's README.