openclaw-claude-proxy (OCP)
OpenAI-compatible local proxy for Claude CLI — use Opus 4.6 in Cursor, Cline, Open WebUI and more, with zero API cost.
What is it?
openclaw-claude-proxy (OCP) wraps the claude CLI in an OpenAI-compatible HTTP server. Any tool that speaks OpenAI API can talk to Claude — without paying per token.
Why it matters
| Claude API | OCP (this project) | |
|---|---|---|
| Cost | Pay per token | $0 (included in Max/Pro) |
| Models | All | claude-opus-4-6, sonnet, haiku |
| OpenAI compatible | Yes | Yes |
| Multi-user | No | Yes — share one subscription |
| Setup | API key | npm install -g openclaw-claude-proxy |
Quick Start
npm install -g openclaw-claude-proxy
ocp-server
Then point any OpenAI client at http://localhost:9090.
Authentication
For shared/exposed deployments, set PROXY_API_KEY to require Bearer token auth:
PROXY_API_KEY=my-secret ocp-server
Works with
-
Cursor — set base URL to
http://localhost:9090, model toclaude-opus-4-6 - Cline (VS Code) — OpenAI provider, same base URL
- Open WebUI — add as OpenAI connection
-
LangChain / LlamaIndex — set
openai_api_base -
Any OpenAI SDK — just change
base_url
Honest tradeoffs
- Uses CLI pool internally → requests execute sequentially per worker (not pure parallel)
- Requires active Claude Max or Pro subscription on the machine
- Pool workers restart on crash with backoff
Links
- GitHub: https://github.com/dtzp555-max/openclaw-claude-proxy
- npm:
npm install -g openclaw-claude-proxy
Give it a ⭐ if it saves you money!
Top comments (0)