How to use in Claude Desktop app? #587
Replies: 2 comments
-
|
Nice approach. I've found that even city-level differences within the same country can be dramatic—especially for queries with local intent. Do you also test for currency and measurement unit formatting in your localized SERPs? |
Beta Was this translation helpful? Give feedback.
-
Using Headroom with Claude Desktop AppThe Claude Desktop app doesn't directly support ANTHROPIC_BASE_URL environment variable injection the way the CLI does. Here are two approaches that work: Option 1: MCP Server (Recommended)Headroom exposes an MCP server that Claude Desktop can connect to directly: Add this to your Claude Desktop config (claude_desktop_config.json). This gives Claude Desktop access to headroom_compress, headroom_retrieve, and headroom_stats tools without needing proxy routing. {
"mcpServers": {
"headroom": {
"command": "headroom",
"args": ["mcp"]
}
}
}Option 2: System-Level ProxySet a system-wide HTTPS_PROXY that captures all Claude Desktop traffic: # Start headroom proxy
headroom proxy --port 8787
# Then launch Claude Desktop with environment variable
HTTPS_PROXY=http://localhost:8787 /Applications/Claude.app/Contents/MacOS/ClaudeOption 3: Headroom Wrap (for Claude Code within Desktop)If you are using Claude Code (available via the terminal inside Claude Desktop), headroom wrap claude works the same way as in a regular terminal: headroom wrap claude
headroom doctor # verifyThe proxy approach is the most complete since it captures all API traffic including file uploads and tool calls. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Goal
Use Headroom's compression in the Claude Desktop app (the GUI with Cowork / Claude Code built in), not just the terminal CLI.
What works
headroom wrap claudein a terminal works perfectly — traffic routes through the proxy, compression kicks in.What I can't get working
Routing the desktop app through the proxy. I tried the standard proxy approach:
headroom proxy --port 8787(running,/healthreports healthy, v0.22.4)ANTHROPIC_BASE_URL=http://127.0.0.1:8787in~/.claude/settings.jsonenvblocksetx)Result: the desktop app still talks directly to
api.anthropic.com.ANTHROPIC_BASE_URL=https://api.anthropic.com/statsshows 0 requests from the appEnvironment
Questions
wrap/ proxy routing CLI-only by design?settings.jsonenvor a custom base URL)?Beta Was this translation helpful? Give feedback.
All reactions