SuperAPI AI Directory

terse

terse is an MCP proxy tool for AI agents, designed to reduce the tokens consumed when agents read tool outputs, while not changing the data values the model actually reads. It uses lossless compression to remove structural redundancy in JSON results (such as repeated keys, repeated values, and repeated nested structures), loses no data by default, and requires no decoding step. On real GitHub API payloads, terse can reduce token consumption by 59.1%; in the maintainer's own Claude Code session replay, it saved 22.6% of the cost of the MCP results it processed, accounting for 0.71% of the entire session bill. terse applies compression selectively per tool, passes through results it cannot compress unchanged, and provides real-time savings statistics. It supports cross-call diffing (must be manually enabled) and optional lossy compression (marked per field), and is suitable for AI agent sessions that need to frequently read large, repetitive tool outputs.

Open website

About this tool

terse is an MCP (Model Context Protocol) proxy for AI agents, with the main purpose of reducing the tokens agents consume when reading tool outputs while ensuring that the data values the model reads remain unchanged. It uses lossless compression to remove structural redundancy in JSON results, such as repeated keys, repeated values, and repeated nested structures, presenting the data to the model in a more compact form without requiring a decoding step.

In terms of main capabilities, terse uses a layered compression pipeline: Tier 0 includes whitespace compression and tabulation (converting a uniform record list into a header plus value rows); Tier 0.5 uses dictionary encoding to collapse repeated strings and subtrees; Tier 0.6 and 0.65 handle embedded JSON strings and Python literals, respectively (must be manually enabled); Tier 0.7 is cross-call diffing (must be manually enabled), which, when the same tool is called repeatedly, outputs a lossless delta from the previous result; Tier 1 is optional lossy compression, marking fields to truncate or discard to retrieval handles. In addition, cross-block joining is enabled by default, merging multiple content blocks into one record array for compression.

In terms of usage, terse acts as a plug-and-play proxy for MCP servers, is transparent to downstream servers, and requires no client reformatting. It provides real-time savings statistics (terse stats) and includes self-installing operational tools (install-mcp, mcp-status). Cross-call diffing and lossy compression must be manually enabled via command-line arguments or a policy file.

Applicable scenarios are mainly AI agent sessions where tool outputs are large, highly repetitive, and read multiple times in long sessions. According to real session replays, the proportion of the bill saved by terse is small (about 0.71%), because most input tokens are cache reads, and MCP results account for only a small part of session cost. terse's value is concentrated on a few large, repetitive results, and it provides a lossless guarantee.

In terms of limitations, terse only removes duplication and does not discard rows or old results; for tool outputs that have already been compressed or projected, the effect is close to zero. Cross-call diffing is off by default and has a low trigger rate in real workloads (0.67% of blocks), mainly because only one diff base is kept per tool, and interleaved calls evict the base. Lossy compression must be manually enabled and marked per field. In addition, clients (such as Claude Code) save results exceeding a certain token count to files, and such results cannot be saved through terse. terse's compressionThe effect varies by tool (0–30%), so a per-tool policy is used rather than blind compression.