TheDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/headroomlabs-ai/headroom/llms.txt
Use this file to discover all available pages before exploring further.
headroom mcp command group manages the Headroom Model Context Protocol (MCP) server. The MCP server exposes headroom_retrieve, headroom_compress, and headroom_stats as tools that Claude Code and other MCP-capable agents can call on demand — enabling CCR (Compress-Cache-Retrieve) even for subscription users without direct API access.
The MCP server requires
pip install 'headroom-ai[mcp]'. The proxy must be running independently for the retrieve and stats tools to function. Start it with headroom proxy.How it works
ANTHROPIC_BASE_URLroutes all requests through the Headroom proxy- The proxy compresses large tool outputs (file listings, search results, code files)
- Claude sees compressed summaries with
[Retrieve more: hash=…]markers - When Claude needs the full content, it calls
headroom_retrieve - The MCP server fetches the original content from the proxy’s CCR store
MCP clients display tools as
mcp__<server>__<tool>. Because the server is named headroom and the tools are named headroom_retrieve / headroom_compress / etc., Claude Code shows them as mcp__headroom__headroom_retrieve. The double headroom is normal MCP namespacing, not a bug.headroom mcp install
Register the Headroom MCP server with every detected coding agent. Currently supports Claude Code; Cursor, Codex, Continue, and others are added in subsequent releases.URL of the running Headroom proxy that the MCP server will connect to for retrieve and stats calls.
Restrict installation to a specific agent name (e.g.
claude). Repeat the flag to target multiple agents. Defaults to every detected agent.Overwrite an existing Headroom MCP entry even when the spec has changed. Without
--force, a mismatched entry is reported but left in place.headroom mcp serve
Start the MCP server with stdio transport. This command is typically invoked automatically by the agent via its MCP configuration — you do not need to run it manually during normal use.URL of the Headroom proxy to connect to. Defaults to
HEADROOM_PROXY_URL env var or http://127.0.0.1:8787.Enable verbose debug logging. Useful when diagnosing MCP tool call failures.
headroom mcp uninstall
Remove the Headroom MCP server from Claude Code’s configuration. Cleans up both the Claude CLI registry (claude mcp remove headroom) and ~/.claude/mcp.json. Other MCP servers are preserved.
codebase-memory-mcp if it was registered by --code-graph.
headroom mcp status
Show the current MCP installation and proxy connectivity status.- MCP SDK installation status
- Whether the
headroomserver is registered in Claude Code’s config - The configured proxy URL
- Whether the proxy is reachable at that URL
MCP tool reference
The MCP server exposes these tools to the agent:headroom_retrieve
Retrieve the full original content that was compressed into a CCR hash. Claude calls this automatically when it encounters a [Retrieve more: hash=…] marker in a tool result.
Input:
query is provided.
headroom_compress
Manually compress a message array on demand. Useful when the agent wants to compact its context before a large operation.
Input:
headroom_stats
Retrieve current proxy statistics: total requests, tokens saved, compression ratio, and per-model breakdowns.
Input: (none)
Returns: The same payload as GET /stats on the proxy.
Quick start
headroom wrap claude to handle all three steps automatically.