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.

MIT licensed Under 15 MB 29 agents 26+ providers macOS · Windows · Linux

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

  • Claude Codesettings.json
  • Codexconfig.toml
  • Gemini CLIsettings.json
  • OpenCodeopencode.json
  • Claude DesktopconfigLibrary
  • OpenChamberpreferences.json
  • MiMo Codemimocode.json
  • Pisettings.json
  • OmOsettings.json
  • Gooseconfig.yaml
  • Cursor CLIcli-config.json
  • Copilot CLIsettings.json
  • Crushcrush.json
  • DeepSeek Harnessconfig.yaml
  • Command Codesettings.json
  • fxsettings.json
  • ompconfig.yml
  • Devinconfig.json
  • Hermes Agentconfig.yaml
  • Kimi Codeconfig.toml
  • Droidsettings.json
  • Cline CLIproviders.json
  • Qodersettings.json
  • Qoder CNsettings.json
  • Grok Buildconfig.toml
  • ZCodeconfig.json
  • WorkBuddymodels.json
  • OpenHanakoprovider-catalog.json
  • Almalocal API :23001

The config file behind each agent, and the fields Magpie sets in it, are listed in the configuration guide.

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 — see adding a provider.

  • DeepSeekvendor
  • Kimimoonshot
  • GLMzhipu
  • Qwenvendor
  • MiniMaxvendor
  • StepFunvendor
  • Anthropicvendor
  • OpenAIvendor
  • Geminivendor
  • Mistralvendor
  • xAIvendor
  • Groqvendor
  • OpenRouterrelay
  • Togetherrelay
  • Fireworksrelay
  • SiliconFlowrelay
  • AiHubMixrelay
  • 302.AIrelay
  • NVIDIA NIMrelay
  • ModelScoperelay
  • Baidu Qianfantoken plan
  • Tencent Cloudtoken plan
  • Huawei Cloud MaaSvendor
  • Volcengine Arkvendor
  • Ollamalocal
  • LM Studiolocal
Popular pairings and the command for each
AgentModel you wantCommand
Claude CodeKimi K3magpie claude moonshot/kimi-k3
Claude CodeGLMmagpie claude zhipu/glm-5.3
Claude CodeDeepSeekmagpie claude deepseek/deepseek-flash
CodexDeepSeekmagpie codex deepseek/deepseek-v4-pro
Gemini CLIGLMmagpie gemini zhipu/glm-5.3
Any agentLocal Ollama modelmagpie provider add ollama
Any agentYour Claude planSign in to Claude Code once and it becomes a provider

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.

Tutorials and setup guides

The setups people ask about most, which we are writing up in this order. Each guide will list 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

Until they are up, the configuration guide has every agent's config file and all the everyday commands.

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 Coming soon
OpenRouter Hosted routing to many models, billed per call Cloud Coming soon

cc-switch vs Magpie and other alternatives →

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. The install guide walks through it step by step.

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.