Unofficial setup guide

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.

3.4k+ GitHub stars MIT licensed Under 15 MB 29 agents 26+ providers macOS · Windows · Linux

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.

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.

Popular pairings and where to set them up
AgentModel you wantGuide
Claude CodeKimi K3Configure →
Claude CodeGLMConfigure →
CodexDeepSeekConfigure →
Gemini CLIGLMConfigure →
OpenCodeYour Claude planConfigure →
GooseOpenRouterConfigure →
Any agentLocal Ollama modelConfigure →

Quick start: three steps

  1. Install Magpie

    Grab the desktop app for your platform, or use the terminal installer.

    curl -fsSL https://usemagpie.ai/install.sh | sh

    The installer puts the magpie command in ~/.local/bin and the app in /Applications on macOS. Full walkthrough: install guide.

  2. 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
  3. 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

One gateway, every API OpenAI Chat, OpenAI Responses and Anthropic Messages, translated in both directions with streaming and tool calls.
Your subscriptions, shared Signed in to Claude Code, Codex or Copilot? That login becomes a provider every other agent can use.
Small and native Under 15 MB with the desktop app, 7 MB for the terminal-only build. No Electron, no bundled runtime.
Surgical config edits Comments, ordering and indentation in settings.json, config.toml or config.yaml survive. Writes are atomic.
Real model lists Magpie asks each vendor which models it serves, so a model released this morning is in the picker on the next refresh.
Profiles Snapshot every agent's setup under a name — “Budget”, “Focus” — and switch all of them back in one move.

How Magpie compares

ToolWhat it doesLocal gatewayRead 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.