Run Claude Code, Codex & Gemini CLI with any AI model
Magpie is a free local gateway that gives every agent every model. Add a provider once — DeepSeek, Kimi, GLM, Qwen, OpenRouter, Ollama, or the Claude and ChatGPT plans you already pay for — then pick it from Claude Code, Codex, Gemini CLI or any other agent, in one click.
Get the official build from GitHub · Official site: usemagpie.ai
What is Magpie?
Magpie is a small desktop app and CLI that sits in your menu bar and shows one list: every AI coding agent on your machine, and the model each one is set to. Click a value, pick a model. That is the whole app.
Underneath that one screen it runs a local gateway on
127.0.0.1:3425. The gateway speaks OpenAI Chat Completions,
OpenAI Responses and the Anthropic Messages API all at once, and translates
between them — streaming, tool calls and reasoning included — so an agent can
use a vendor whose API it does not natively speak.
127.0.0.1:3425OpenAI Chat · Responses · Anthropic Messages · Gemini
Because everything is spelled provider/model and served through that
one endpoint, your agents never hold vendor keys or vendor URLs — they only ever
point at http://127.0.0.1:3425/v1.
Every agent. Every model.
Magpie reads and writes each agent's own config file, so switching a model does not break anything else in it. Only agents that are actually installed or configured are shown in the app.
Supported agents
Supported providers
Presets are grouped into vendors, relays and local servers. A preset needs only a key; custom endpoints take a name, a base URL and optionally a model list.
| Agent | Model you want | Guide |
|---|---|---|
| Claude Code | Kimi K3 | Configure → |
| Claude Code | GLM | Configure → |
| Codex | DeepSeek | Configure → |
| Gemini CLI | GLM | Configure → |
| OpenCode | Your Claude plan | Configure → |
| Goose | OpenRouter | Configure → |
| Any agent | Local Ollama model | Configure → |
Quick start: three steps
-
Install Magpie
Grab the desktop app for your platform, or use the terminal installer.
curl -fsSL https://usemagpie.ai/install.sh | shThe installer puts the
magpiecommand in~/.local/binand the app in/Applicationson macOS. Full walkthrough: install guide. -
Add a provider
A preset needs only the key. Local servers need none.
# add providers magpie provider add deepseek sk-… magpie provider add moonshot sk-… magpie provider add ollama # local, no key # check what is set up magpie providers -
Point an agent at a model
Magpie rewrites only the key you changed, so comments and ordering in your config survive intact.
magpie claude moonshot/kimi-k3 magpie codex deepseek/deepseek-v4-pro magpie gemini zhipu/glm-5.3 magpie ls # every agent and its model
Prefer the terminal? magpie tui opens the whole app in your shell.
Details in the setup guide.
Why people pick Magpie
settings.json,
config.toml or config.yaml survive. Writes are atomic.
Tutorials and setup guides
Step-by-step walkthroughs for the pairings people ask about most. Each guide lists the exact config file, the commands, and how to roll back.
- Use Claude Code with KimiProvider preset, model alias, rollback
- Use Claude Code with GLMAnthropic-compatible endpoint setup
- Use Codex with DeepSeekResponses API and reasoning effort
- Use Gemini CLI with GLMAuth mode and model switching
- Share your Claude plan with OpenCodeSubscription as a provider
- Run local models with Ollama or LM StudioNo key, no cloud
- Switch every agent at once with profilesSave, list, restore
- Add a custom relay or proxyBase URL, keys, exposed models
How Magpie compares
| Tool | What it does | Local gateway | Read more |
|---|---|---|---|
| Magpie | Menu-bar model switcher plus a gateway that translates OpenAI, Anthropic and Gemini APIs | Yes · :3425 | Guide |
| cc-switch | Switches Claude Code between vendor configs | — | magpie vs cc-switch → |
| LiteLLM | Server-side proxy for teams, runs as a service | Self-hosted | magpie vs LiteLLM → |
| OpenRouter | Hosted routing to many models, billed per call | Cloud | magpie vs OpenRouter → |
Frequently asked questions
Is Magpie free?
Yes. Magpie is free and open source under the MIT licence. The desktop app is under 15 MB; the terminal-only build is about 7 MB. You only pay the model vendors you connect.
Is usemagpie.co the official Magpie website?
No. usemagpie.co is an unofficial third-party guide. Magpie is an open-source project by yetone — the official website is usemagpie.ai and official builds are published on GitHub. Always download from there.
Which coding agents does Magpie support?
29 agents, including Claude Code, Codex, Gemini CLI, OpenCode, Claude Desktop, Cursor CLI, Copilot CLI, Crush, Goose, Cline, Qoder, Kimi Code, Devin and Grok Build. Only agents that are installed or configured show up in the app.
Which model providers can I connect?
26+ presets across vendors, relays and local servers — DeepSeek, Kimi, GLM, Qwen, MiniMax, Anthropic, OpenAI, Gemini, Mistral, xAI, Groq, OpenRouter, Together, Fireworks, SiliconFlow, NVIDIA NIM, ModelScope, AiHubMix, 302.AI, Baidu Qianfan, Tencent Cloud, Huawei Cloud MaaS, Volcengine Ark, Ollama and LM Studio. Any OpenAI- or Anthropic-compatible endpoint works as a custom provider too.
Does Magpie work with Claude Code?
Yes. Magpie edits the provider and model keys in
~/.claude/settings.json and points Claude Code at
http://127.0.0.1:3425/v1, so Claude Code can run on Kimi, GLM,
DeepSeek or GPT while your own comments stay in the file. See the
Claude Code + Kimi guide.
Can I use my existing Claude or ChatGPT subscription?
Yes. If you are signed in to Claude Code, Codex (ChatGPT) or GitHub Copilot, that login becomes a provider inside Magpie, and every other agent can use its models through the gateway — nothing copied, no key pasted.
Does Magpie read my API keys from the shell?
No. Magpie never reads keys from environment variables. What you add in Magpie is what it uses, and agent configs never hold the keys themselves.
Magpie vs cc-switch — which should I use?
Both let you change which model a coding agent runs. Magpie additionally runs a
local gateway on 127.0.0.1:3425 that translates between the OpenAI,
Anthropic and Gemini APIs, so agents can use providers that do not speak their
native protocol. If you only ever swap between Claude-compatible configs,
cc-switch is lighter; if you want one catalog across many agents and vendors,
Magpie covers more ground. Full breakdown:
magpie vs cc-switch.