Claude Code Proxy is a lightweight HTTP proxy that enables Claude Code to work with OpenRouter (200+ models), OpenAI Direct (GPT-5), and Ollama (local inference). It supports full tool integration, streaming, and thinking blocks. Ideal for operations teams looking to streamline AI model access and integration.
git clone https://github.com/nielspeter/claude-code-proxy.gitClaude Code Proxy is a lightweight Go-based HTTP proxy that bridges Claude Code with multiple AI providers: OpenRouter (200+ models including GPT, Grok, Gemini), OpenAI Direct (GPT-5 reasoning), and Ollama (free local inference). It provides full compatibility with Claude Code features including tool calling, extended thinking blocks, streaming responses, and real-time token tracking. The proxy uses adaptive per-model detection to automatically learn which parameters each model supports, requiring zero hardcoding. With zero runtime dependencies, fast startup times under 10ms, and daemon mode for serving multiple Claude Code sessions, it's designed for operations teams needing streamlined AI model access and integration.
Build the Go binary with `go build` or install system-wide with `make install`. Configure your provider by setting `OPENAI_BASE_URL` and `OPENAI_API_KEY` in `~/.claude/proxy.env` (no key needed for Ollama). Start the proxy with `./claude-code-proxy` and set `ANTHROPIC_BASE_URL=http://localhost:8082` in your environment before running Claude Code.
Route Claude Code sessions to cost-effective models via OpenRouter without changing client code
Enable local-only inference with Ollama while maintaining Claude Code compatibility
Access GPT-5 reasoning models directly through Claude Code interface
Manage multi-provider model access with automatic capability detection per model
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/nielspeter/claude-code-proxyCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Set up a Claude Code Proxy to connect to [AI_PLATFORM] for accessing [MODEL_NAME]. Provide step-by-step instructions, including necessary configurations and security considerations for [COMPANY] in the [INDUSTRY] sector.
## Setup Instructions for Claude Code Proxy ### Step 1: Install the Proxy 1. Clone the repository: ```bash git clone https://github.com/claude-code-proxy/claude-code-proxy.git ``` 2. Navigate to the project directory: ```bash cd claude-code-proxy ``` 3. Install dependencies: ```bash npm install ``` ### Step 2: Configure the Proxy 1. Create a `.env` file in the root directory. 2. Add the following environment variables: ```env PORT=3000 OPENAI_API_KEY=your_openai_api_key OLLAMA_API_KEY=your_ollama_api_key ``` 3. Save the file. ### Step 3: Run the Proxy 1. Start the proxy server: ```bash npm start ``` 2. The proxy should now be running on `http://localhost:3000`. ### Step 4: Integrate with Claude Code 1. Open Claude Code. 2. Navigate to the settings menu. 3. Add the proxy URL (`http://localhost:3000`) as a custom endpoint. 4. Save the settings. ### Security Considerations - Ensure that the proxy server is running in a secure environment. - Regularly update the proxy software to the latest version. - Monitor the proxy logs for any suspicious activity.
Pioneering accessible, high-performance AI models
AI assistant built for thoughtful, nuanced conversation
Get more done every day with Microsoft Teams – powered by AI
Automate your spreadsheet tasks with AI power
Agentic AI Workflow platform
Connected workspace for docs, wikis, and projects
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan