Sophon — Claude Code MCP server: what it does, how to install
Sophon compresses MCP agent context, including chat history, prompts, command output, and file deltas. Use it when tool traffic keeps growing.
claude mcp add sophon -- npx -y mcp-sophonWhat Sophon does
Sophon exposes MCP tools for reducing prompts, conversation history, and shell output. It can pass file edits as deltas, turn repeated fragments into token references, keep an incremental JSONL memory, and rank relevant parts of a repository for a code question.
The server ships as a single Rust binary and performs query-time compression without an ML model, GPU, or API key. Its output filters cover commands such as git, cargo, docker, kubectl, plus JSON data. You can run it through MCP with npx -y mcp-sophon.
There are practical limits. On raw source files, compress_prompt follows a budget cap instead of routing sections by the query. Some shell commands can add tokens, so the result depends on the data and the repository state.
What it helps with
- compress a growing conversation history
- trim
gitorcargocommand output - send file changes instead of the full file
- rank relevant code in a repository
- replace repeated boilerplate with a token reference
Example prompts for the agent
- Use
compress_historyto reduce this conversation while keeping its facts and recent context. - Run
compress_outputon the output fromcargo testand retain the failures. - Use
navigate_codebaseto locate the code responsible for authentication.
How to install Sophon
Platform CLI
claude mcp add sophon -- npx -y mcp-sophonPlatform CLI
codex mcp add sophon -- npx -y mcp-sophonConfig file
{
"mcpServers": {
"sophon": {
"command": "npx",
"args": [
"-y",
"mcp-sophon"
]
}
}
}Config file
{
"servers": {
"sophon": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"mcp-sophon"
]
}
}
}Platform CLI
gemini mcp add sophon npx -y mcp-sophonStep 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 Sophon
How do I install Sophon in Claude Code?
Run claude mcp add sophon -- npx -y mcp-sophon.
What does Sophon do?
It compresses dynamic MCP context such as prompts, conversation history, shell output, file changes, and code fragments. It also keeps JSONL memory and ranks repository content for code questions.
Does Sophon need an API key or GPU?
No. Query-time operation uses neither API keys nor a GPU or ML model; the server is built around a Rust binary.