Using prxy.monster with Claude Code
Claude Code speaks Anthropic Messages traffic, so it can point at prxy.monster with the Anthropic base URL. The value is the module pipeline around those calls: MCP pruning, cache hits, context preservation, and cost guards.
Setup time: 30 seconds.
Configure
export ANTHROPIC_BASE_URL=https://api.prxy.monster
export ANTHROPIC_API_KEY=prxy_live_xxxxxxxxxxxxxxxxxxxxxxxx
Restart Claude Code. That’s it.
Claude Code uses @anthropic-ai/sdk under the hood. It respects ANTHROPIC_BASE_URL automatically — no settings change, no config file edit, no restart of anything other than Claude Code itself.
Code change
None. Claude Code is a CLI; you don’t touch its code. Just the two env vars above.
Verify
prxy doctor
(or, if you don’t have the CLI:)
curl https://api.prxy.monster/health
Open Claude Code and watch its first few requests. They should succeed if routing and provider credentials are configured.
What you get
Concretely, on a typical Claude Code session:
| Pain | Fix |
|---|---|
| MCP overhead — ~67k tokens loading every MCP definition before you type | mcp-optimizer — prunes irrelevant tools per query. ~67k → ~8k. |
| Rate limit at 20 minutes | semantic-cache returns repeats free. exact-cache catches identical re-asks. |
| Auto-compaction wipes context | compaction-bridge preserves the working set across compaction events. rehydrator restores the relevant context on the next message. |
| Sessions don’t compound — every Monday starts from zero | patterns logs successful fixes and re-injects them. The model gets faster on problem types you’ve solved before. |
| Long sessions hit context wall | ipc compresses old messages progressively (verbatim → truncated → summary → single sentence). |
Recommended pipeline for Claude Code
This is the killer config:
PRXY_PIPE=mcp-optimizer,compaction-bridge,rehydrator,semantic-cache,patterns,ipc
Set it on the key with PATCH /v1/keys/:id using pipelineConfig, or set per-process in local mode:
export PRXY_PIPE=mcp-optimizer,compaction-bridge,rehydrator,semantic-cache,patterns,ipc
(Note: PRXY_PIPE is read by the proxy, not by Claude Code — for cloud, store the pipeline on the API key; for local, set it in the container environment.)
Streaming
Claude Code uses streaming heavily. prxy.monster passes through Anthropic’s per-block SSE format unmodified. Cache hits replay as synthetic SSE, indistinguishable to Claude Code’s parser.
Pricing reality check
You’re already paying Anthropic for tokens. prxy.monster doesn’t add per-token cost — you BYOK to Anthropic, and we charge a flat tier for the gateway.
Net effect for a typical Claude Code user:
- Anthropic bill: same to lower when cache or optimization reduces provider work.
- prxy.monster bill: $20/mo Pro, or Team for shared quota.
- Your time: significantly more productive minutes per dollar.
Common issues
anthropic-betaheaders — pass-through. Prompt caching, tool use, and other beta features all work.- MCP servers — Claude Code’s MCP wiring is unaffected. The
mcp-optimizermodule sees the tool definitions Claude Code sends and prunes irrelevant ones before the request hits Anthropic. /clear— works the same. Thepatternsmodule preserves your learned patterns across/clear.- Local mode — point
ANTHROPIC_BASE_URL=http://localhost:3099to your local Docker container (see Local quickstart).
Worked example
Drop-in .env and a step-by-step setup walkthrough: github.com/Ekkos-Technologies-Inc/prxy-monster-examples/tree/main/examples/claude-code-setup