Agents spend tokens on things that don’t need a model: re-read files, verbose shell output, ever-growing conversation history. Sophon is an MCP server that compresses that traffic deterministically, with no embedding model, GPU or API key at query time. It sits in front of prompt caching, memory layers such as mem0, or Claude Code.
What it does
- 11 MCP tools over stdio: prompt, history and shell-output compression, file deltas, codebase digest
- compress_output ships 21 command-aware filters (git, cargo, docker, kubectl, JSON…)
- read_file_delta and write_file_delta send diffs instead of whole files
- navigate_codebase: tree-sitter or regex symbol extraction, ranked by PageRank against the query
- Every benchmark ships as a script, misses included (recall caps at ~40 % on LOCOMO)
How it’s built
Rust workspace of 11 crates, compiled to a single 5.2 MB binary by default; tree-sitter and a BGE embedder are opt-in build features. Installs through npm (prebuilt binaries) or cargo.
Status
Open source · MIT — View the code ↗