Use Claude Code with Any Free & Local Models – Free Claude Code Proxy

Use Claude Code without a paid Anthropic plan. This proxy routes requests to NVIDIA NIM, DeepSeek, Kimi, GLM, and local models.

Free Claude Code is an open-source proxy for Claude Code that routes Anthropic API calls to Anthropic-compatible model providers, local model servers, and third-party gateways.

The proxy is useful for developers who like Claude Code’s terminal workflow but want more control over model cost, provider choice, local inference, remote bot access, or model routing.

It runs between Claude Code and your chosen backend, so your Claude Code CLI can work through NVIDIA NIM, Kimi, Wafer, OpenRouter, DeepSeek, LM Studio, llama.cpp, Ollama, OpenCode Zen, or Z.ai GLM models.

More Features

  • Maps Opus, Sonnet, Haiku, and fallback traffic to separate model providers.
  • Exposes a /v1/models endpoint for Claude Code model picker support.
  • Supports streaming, tool use, reasoning blocks, token metadata, and provider error normalization.
  • Includes a local Admin UI at /admin for proxy settings and provider checks.
  • Supports Claude Code CLI, VS Code extension, and JetBrains ACP.
  • Optional Discord and Telegram bot access for remote coding sessions.
  • Optional voice note transcription through local Whisper or NVIDIA NIM.
  • Includes local request optimizations for trivial Claude Code probes.

Use Cases

  • Run Claude Code through a free NVIDIA NIM key for lower-cost coding sessions.
  • Route routine tasks to cheap or local models and reserve powerful models for harder work.
  • Use Claude Code in VS Code with a local Anthropic-compatible proxy.
  • Connect Claude Code to local models through LM Studio, llama.cpp, or Ollama.
  • Run remote Claude Code sessions from Discord or Telegram.
  • Use voice notes to send coding prompts into a Discord or Telegram bot workflow.

How to Use Free Claude Code

1. Make sure you first have Claude Code installed on your device.

npm install -g @anthropic-ai/claude-code

2. Install uv and Python:

macOS or Linux

curl -LsSf https://astral.sh/uv/install.sh | sh
uv self update
uv python install 3.14

Windows PowerShell

powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
uv self update
uv python install 3.14

3. Install the Free Claude Code proxy.

uv tool install --force git+https://github.com/Alishahryar1/free-claude-code.git

4. Start the proxy server.

fcc-server

5. Open the local Admin UI from the terminal output.

http://127.0.0.1:8082/admin

6. Add a provider key in the Admin UI. NVIDIA NIM is the default-oriented setup, and the default model is nvidia_nim/z-ai/glm4.7.

7. Run Claude Code through the proxy launcher. Keep fcc-server open during coding sessions. The launcher reads the current local port and auth token each time it starts.

fcc-claude

VS Code Extension Settings

Add these values to claude-code.environmentVariables in VS Code settings.

"claudeCode.environmentVariables": [
  { "name": "ANTHROPIC_BASE_URL", "value": "http://localhost:8082" },
  { "name": "ANTHROPIC_AUTH_TOKEN", "value": "freecc" },
  { "name": "CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY", "value": "1" },
  { "name": "CLAUDE_CODE_AUTO_COMPACT_WINDOW", "value": "190000" }
]

Reload the extension after the setting change. The proxy handles model traffic after the environment variables take effect.

JetBrains ACP Settings

Edit the installed Claude ACP configuration file.

PlatformConfig path
WindowsC:\Users\%USERNAME%\AppData\Roaming\JetBrains\acp-agents\installed.json
Linux and macOS~/.jetbrains/acp.json

Add the environment settings for acp.registry.claude-acp.

"env": {
  "ANTHROPIC_BASE_URL": "http://localhost:8082",
  "ANTHROPIC_AUTH_TOKEN": "freecc",
  "CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY": "1",
  "CLAUDE_CODE_AUTO_COMPACT_WINDOW": "190000"
}

Restart the IDE after changing the file.

Discord and Telegram Bot Settings

Setting or stepPurpose
Messaging PlatformSelects discord or telegram.
Discord Bot TokenAuthenticates the Discord bot.
Allowed Discord ChannelsLimits bot access to approved channels.
Telegram Bot TokenAuthenticates the Telegram bot.
Allowed Telegram User IDLimits bot access to one approved Telegram user.
Allowed DirectorySets the workspace root the bot may access.
/stopCancels a task.
/clearResets sessions.
/statsShows session state.

Voice Note Install Commands

Install NVIDIA NIM transcription support.

uv tool install --force "free-claude-code[voice] @ git+https://github.com/Alishahryar1/free-claude-code.git"

Install local Whisper support.

uv tool install --force "free-claude-code[voice_local] @ git+https://github.com/Alishahryar1/free-claude-code.git"

Install both voice backends.

uv tool install --force "free-claude-code[voice,voice_local] @ git+https://github.com/Alishahryar1/free-claude-code.git"

Add CUDA local Whisper support.

uv tool install --force "free-claude-code[voice_local] @ git+https://github.com/Alishahryar1/free-claude-code.git" --torch-backend cu130

Restart fcc-server after changing the voice extras.

Manual Environment Variable Method

Claude Code can also route directly to a compatible backend through environment variables. This Windows PowerShell example uses DeepSeek’s Anthropic-compatible endpoint.

$env:ANTHROPIC_BASE_URL = "https://api.deepseek.com/anthropic"
$env:ANTHROPIC_AUTH_TOKEN = "Your API Key"
$env:ANTHROPIC_MODEL = "deepseek-v4-pro[1m]"
$env:ANTHROPIC_DEFAULT_OPUS_MODEL = "deepseek-v4-pro[1m]"
$env:ANTHROPIC_DEFAULT_SONNET_MODEL = "deepseek-v4-pro[1m]"
$env:ANTHROPIC_DEFAULT_HAIKU_MODEL = "deepseek-v4-flash"
$env:CLAUDE_CODE_SUBAGENT_MODEL = "deepseek-v4-flash"
$env:CLAUDE_CODE_EFFORT_LEVEL = "max"

This method removes the proxy UI and provider routing layer. It can work for a single compatible provider, but it lacks Free Claude Code’s Admin UI, model-tier routing panel, bot wrapper, and local provider catalog.

Pros

  • Ten provider backends in one proxy.
  • Local Admin UI needs no config file editing.
  • Supports VS Code, JetBrains, CLI, Discord, and Telegram.
  • Per-tier model routing controls cost and quality separately.
  • Open source.

Cons

  • Local server must stay running during sessions.
  • Setup requires Python and uv.
  • Local model quality varies by model size.

Related Resources

Leave a Reply

Your email address will not be published. Required fields are marked *

Get the latest & top AI tools sent directly to your email.

Subscribe now to explore the latest & top AI tools and resources, all in one convenient newsletter. No spam, we promise!