
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
claude-max-api-proxy
Advanced tools
Use your Claude Max subscription with any OpenAI-compatible client. Wraps Claude Code CLI as an OpenAI-compatible API server.
Use your Claude Max subscription ($200/month) with any OpenAI-compatible client — no separate API costs!
This provider wraps the Claude Code CLI as a subprocess and exposes an OpenAI-compatible HTTP API, allowing tools like Clawdbot, Continue.dev, or any OpenAI-compatible client to use your Claude Max subscription instead of paying per-API-call.
| Approach | Cost | Limitation |
|---|---|---|
| Claude API | ~$15/M input, ~$75/M output tokens | Pay per use |
| Claude Max | $200/month flat | OAuth blocked for third-party API use |
| This Provider | $0 extra (uses Max subscription) | Routes through CLI |
Anthropic blocks OAuth tokens from being used directly with third-party API clients. However, the Claude Code CLI can use OAuth tokens. This provider bridges that gap by wrapping the CLI and exposing a standard API.
Your App (Clawdbot, etc.)
↓
HTTP Request (OpenAI format)
↓
Claude Code CLI Provider (this project)
↓
Claude Code CLI (subprocess)
↓
OAuth Token (from Max subscription)
↓
Anthropic API
↓
Response → OpenAI format → Your App
npm install -g @anthropic-ai/claude-code
claude auth login
# Clone the repository
git clone https://github.com/anthropics/claude-code-cli-provider.git
cd claude-code-cli-provider
# Install dependencies
npm install
# Build
npm run build
node dist/server/standalone.js
The server runs at http://localhost:3456 by default.
# Health check
curl http://localhost:3456/health
# List models
curl http://localhost:3456/v1/models
# Chat completion (non-streaming)
curl -X POST http://localhost:3456/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "claude-opus-4",
"messages": [{"role": "user", "content": "Hello!"}]
}'
# Chat completion (streaming)
curl -N -X POST http://localhost:3456/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "claude-opus-4",
"messages": [{"role": "user", "content": "Hello!"}],
"stream": true
}'
| Endpoint | Method | Description |
|---|---|---|
/health | GET | Health check |
/v1/models | GET | List available models |
/v1/chat/completions | POST | Chat completions (streaming & non-streaming) |
| Model ID | Maps To |
|---|---|
claude-opus-4 | Claude Opus 4.5 |
claude-sonnet-4 | Claude Sonnet 4 |
claude-haiku-4 | Claude Haiku 4 |
Clawdbot has built-in support for Claude CLI OAuth! Check your config:
clawdbot models status
If you see anthropic:claude-cli=OAuth, you're already using your Max subscription.
Add to your Continue config:
{
"models": [{
"title": "Claude (Max)",
"provider": "openai",
"model": "claude-opus-4",
"apiBase": "http://localhost:3456/v1",
"apiKey": "not-needed"
}]
}
from openai import OpenAI
client = OpenAI(
base_url="http://localhost:3456/v1",
api_key="not-needed" # Any value works
)
response = client.chat.completions.create(
model="claude-opus-4",
messages=[{"role": "user", "content": "Hello!"}]
)
Create a LaunchAgent to start the provider automatically on login. See docs/macos-setup.md for detailed instructions.
src/
├── types/
│ ├── claude-cli.ts # Claude CLI JSON output types
│ └── openai.ts # OpenAI API types
├── adapter/
│ ├── openai-to-cli.ts # Convert OpenAI requests → CLI format
│ └── cli-to-openai.ts # Convert CLI responses → OpenAI format
├── subprocess/
│ └── manager.ts # Claude CLI subprocess management
├── session/
│ └── manager.ts # Session ID mapping
├── server/
│ ├── index.ts # Express server setup
│ ├── routes.ts # API route handlers
│ └── standalone.ts # Entry point
└── index.ts # Package exports
spawn() instead of shell execution to prevent injection attacks| Usage | API Cost | With This Provider |
|---|---|---|
| 1M input tokens/month | ~$15 | $0 (included in Max) |
| 500K output tokens/month | ~$37.50 | $0 (included in Max) |
| Monthly Total | ~$52.50 | $0 extra |
If you're already paying for Claude Max, this provider lets you use that subscription for API-style access at no additional cost.
Install and authenticate the CLI:
npm install -g @anthropic-ai/claude-code
claude auth login
Ensure you're using -N flag with curl (disables buffering):
curl -N -X POST http://localhost:3456/v1/chat/completions ...
Check that the Claude CLI is in your PATH:
which claude
Contributions welcome! Please submit PRs with tests.
MIT
FAQs
Use your Claude Max subscription with any OpenAI-compatible client. Wraps Claude Code CLI as an OpenAI-compatible API server.
The npm package claude-max-api-proxy receives a total of 1,434 weekly downloads. As such, claude-max-api-proxy popularity was classified as popular.
We found that claude-max-api-proxy demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.