Retrieved article excerpt
Open article · Retrieved 2026-11-10T20:22:46.707000+00:00
[magpie](https://usemagpie.ai)
# magpie
### Every agent's model. One place.
**Claude Code on Kimi. Codex on DeepSeek. Gemini CLI on GLM. OpenCode on your ChatGPT plan.**
Switch any of them from the menu bar. One local gateway serves them all,
and when a quota runs out, it quietly moves on to your next account.
[Release](https://github.com/yetone/magpie-releases/releases/latest) [Stars](https://github.com/yetone/magpie/stargazers) [Discord](https://discord.gg/vGSnD3ZKQF) [License](https://github.com/yetone/magpie/blob/main/LICENSE)
[macOS](https://camo.githubusercontent.com/ec796326a5076347bb89dcc58faabc250cdee7be0fd5c63376537fc7f8a19c76/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6d61634f532d3030303030303f6c6f676f3d6170706c65266c6f676f436f6c6f723d7768697465) [Windows](https://camo.githubusercontent.com/73bcf92c38f3cfb6e8e3aa2e5b651f2f85840741d0ec831010184f5b69f3acc1/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f57696e646f77732d3030373844343f6c6f676f3d77696e646f7773266c6f676f436f6c6f723d7768697465) [Linux](https://camo.githubusercontent.com/46afb0e87c45f04b59e69e1651ed89b82472c5dd8737a1d2b85e0af56f63231b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c696e75782d4643433632343f6c6f676f3d6c696e7578266c6f676f436f6c6f723d626c61636b) [Docker](https://camo.githubusercontent.com/4b874cd254b289c13ea335c76183785cb5727464b89fee0fb58fa8fd8134fe6e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446f636b65722d3234393645443f6c6f676f3d646f636b6572266c6f676f436f6c6f723d7768697465) [Termux](https://camo.githubusercontent.com/ce35efed98e25b9d6e48e979a85dafa25fdc37d28980b72f93689be96a74753a/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5465726d75782d3030303030303f6c6f676f3d616e64726f6964266c6f676f436f6c6f723d7768697465)
Thanks to [Kimi](https://usemagpie.ai/go/kimi/readme) for supporting magpie and the open source community.
Sponsors
[APINEBULA](https://usemagpie.ai/go/apinebula/readme) [零词元](https://usemagpie.ai/go/zerotoken/readme) [APIKEY.FAN](https://usemagpie.ai/go/apikeyfan/readme)
[WandAPI](https://usemagpie.ai/go/wandapi/readme) [AIGoCode](https://usemagpie.ai/go/aigocode/readme)
**[Download](https://usemagpie.ai)** · **[Docs](https://usemagpie.ai/docs/start)** · **[Reference](https://github.com/yetone/magpie/blob/main/docs/reference.md)** · **[Plugins](https://github.com/magpie-community/plugins)** · **[Discord](https://discord.gg/vGSnD3ZKQF)** · **English** · [简体中文](https://github.com/yetone/magpie/blob/main/README.zh-CN.md)
magpie's Agents page: Claude Code on Kimi K3, Codex on DeepSeek V4 Pro, Gemini CLI on GLM-5.3, each picked from one list
## Is magpie for you?
Each agent keeps its model in its own file, in its own format, with its own keys and base URLs. A subscription you pay for works in one agent and nowhere else. magpie puts all of that behind one app and one local gateway:
- **Pick any model for any agent** from one list. magpie edits the one key that matters in the agent's own config.
- **Use one provider everywhere**: an API key, a local model, or the Claude, ChatGPT, Copilot, Gemini or Grok plan you're signed in to.
- **Keep going when a quota runs out**: a provider's next account takes over, and a routing group moves on to another model or provider, so the agent never sees the error. With one account and no group there is nothing to move to, and the error reaches the agent.
- **Keep your secrets off the vendor's servers**: once you turn masking on in **Settings → Privacy** (it's off by default), keys, passwords and emails in a prompt are masked on your computer before the request leaves it, and put back in the reply.
It's for you if you use more than one agent, more than one provider, or more than one account. If you use one agent on its vendor's own plan and that's enough, you don't need it.
Runs on macOS, Windows and Linux (menu bar app, window, TUI, web UI and CLI), in Docker, and on Termux.
## Quick start
**1 · Install.** Download the app from **[usemagpie.ai](https://usemagpie.ai)**, or run:
```
curl -fsSL https://usemagpie.ai/install.sh | sh
```
Mac builds are signed and notarised, and every build updates itself. On Linux the script installs the desktop app, and on a desktop without WebKitGTK 4.1 installs it first with your package manager (sudo asks for your password); with no desktop, or no terminal to ask at, it installs the terminal build and says which package to add. `--gui` or `--tui` chooses. Behind a firewall, use `--proxy` or `--mirror`. Or `go install github.com/yetone/magpie@latest`, or the [Docker image](https://usemagpie.ai/docs/docker). Remove magpie with `curl -fsSL https://usemagpie.ai/install.sh | sh -s -- --uninstall`: it puts your agents back as they were, then takes off what the script installed (with magpie deleted already, it downloads one to put them back); your settings in `~/.config/magpie` stay unless you add `--purge`.
**2 · Add a provider.** Open magpie and go to **Providers → Add provider**. Pick a preset and paste a key, or sign in with a subscription.
**3 · Pick a model** for each agent on the **Agents** page. Start a new session and it's on the new model.
Or do it all from the terminal:
```
magpie provider add deepseek sk-… # a preset needs only the key
magpie claude deepseek/deepseek-v4-pro # Claude Code on DeepSeek
magpie codex moonshot/kimi-k2.5 # Codex on Kimi
magpie group add "Opus anywhere" models=claude/claude-opus-5-5,copilot/claude-opus-5.5 routing=smart
magpie claude group/opus-anywhere # fails over between subscriptions
magpie save work && magpie use work # profiles
magpie quota # what's left on every plan
magpie settings set theme dark # every Settings switch, from the terminal
magpie tool generate_image "a magpie, watercolour" -o hero.png # magpie's image, vision and search tools, called directly
magpie tui # the whole thing, in a terminal
```
magpie finds the subscriptions your agents are signed in to by reading their sign-ins (Claude Code's and Codex's files, the Keychain). To keep it from reading them, turn off Settings → Privacy → *Subscription accounts*, or run `magpie accounts discovery off` (`on` turns it back on). `MAGPIE_NO_ACCOUNTS=1` turns it off for one run without changing the saved setting. API-key providers work either way.
## Supported agents
| |
| --- |
| Claude Code · Claude Desktop · Claude Science · Codex · Gemini CLI · Antigravity CLI · OpenCode · OpenChamber · MiMo Code · DevEco Code · Pi · oh-my-pi · StepCode · MothX · PenguinHarness · Aside · OmO · Prime Agent · mu · Goose · Cursor CLI · Cursor Private Inference · Zed · VS Code Chat · VS Code Insiders · VSCodium Chat · Zoo Code · JetBrains Air · Air (JetBrains IDEs) · Copilot (JetBrains) · Copilot CLI · Crush · DeepSeek Harness · Reasonix Studio · Command Code · fx · Devin · Hermes Agent · Mister Morph · Kimi Code · jcode · Qwen Code · Muse Code · Empryo · nanobot · miniQ · Paimon · MiniMax Code · Droid · Cline · Qoder · Qoder CN · Grok Build · Grok App · ZCode · WorkBuddy · WorkBuddy AI · CodeBuddy · Pencil · OpenPencil · OpenBot · Craft Agents · Tuanjie Cowork · NewMax · LiveAgent · Raycast · Kiro Crew · OpenMausBot · T3 Code · OpenHanako · AtomCode · Snow CLI · Alma · Shelley · Cindy · Lody · AionUi · Cherry Studio · Ante · AstrBot · QwenPaw · OpenClaw · Avibe · Kun |
magpie shows only the agents installed on your machine; setup notes for some of them are in the [reference](https://github.com/yetone/magpie/blob/main/docs/reference.md#notes-on-some-agents). Anything else that takes a base URL can use the gateway too:
```
export OPENAI_BASE_URL=http://127.0.0.1:3425/v1 OPENAI_API_KEY=magpie
export ANTHROPIC_BASE_URL=http://127.0.0.1:3425 ANTHROPIC_API_KEY=magpie
export GOOGLE_GEMINI_BASE_URL=http://127.0.0.1:3425 GEMINI_API_KEY=magpie
```
## How it fits together
The gateway at `127.0.0.1:3425` speaks OpenAI Chat, OpenAI Responses, Anthropic Messages and Gemini, and translates between them, streaming, tool calls and reasoning included.
How magpie fits together: your agents send requests to the magpie gateway at 127.0.0.1:3425, which routes them through routing groups and plugins to your API keys, subscriptions and local models.
## What it does
### Any model, any agent
Click a value and a searchable list opens: every model of every provider you added, as `provider/model`. The agent's config is rewritten atomically, and its comments, order and formatting stay as they were. **Profiles** save every agent's setup under one name ("Budget", "Focus") and switch them all back in one move. Each agent can also have its own short list of models; a profile keeps that list too.
| | |
| --- | --- |
| The menu bar panel | The model picker |
### Privacy masking
Agents put what they read into the prompt: an `.env`, a config file, a log with a token in it. With masking on, magpie swaps those values for placeholders on your computer before a request leaves it, and swaps them back in the reply. Your agent and your files keep the real values; the vendor never sees them.
Insights › Masking: 5,812 values kept from vendors in 7 days, flowing from Claude Code and Codex through magpie to OpenAI, Kimi and DeepSeek, and each request's masked values
| | |
| --- | --- |
| **Found two ways** | Rules for what is certain (API keys, private keys, tokens, emails, and card and ID numbers whose checksum adds up), and, if you want it, a model that runs on this computer for the names, addresses and passwords no rule can find (a 1.6 GB download, on the CPU) |
| **Put back everywhere** | A value becomes a placeholder such as `{{API_KEY_k3v9x2mq}}`, and every placeholder in the reply turns back into its value: streamed text and tool-call arguments too, so a command the agent runs has the real key |
| **Nothing breaks** | A value gets the same placeholder every time, so the conversation, the prompt cache and thinking signatures stay valid. A value masked once is masked wherever it shows up later |
| **Never on disk** | Values are held in memory only. The record keeps each value's kind, length and first characters. If masking is on and can't run, the request is held back (503), never sent as written |
| **You can check it** | **Insights › Masking** lists every request it changed, with what the vendor got instead, side by side, and **Try it** in Settings shows what a text would become |
| **Your rules** | Secrets and personal data each on or off, finer kinds (passport, IBAN, MAC, public IP…), your own words and patterns, and whether a value found is masked, only warned about, or held back (**Mask**, **Warn**, **Block**) |
The cost: the model sees `{{API_KEY_…}}`, not the key, so a task about the value itself (why is this token refused?) can't be done on it. Put such values under **Never mask**. Rules can be wrong now and then; the Masking page is where you'd see it. It's off until you turn it on in **Settings → Privacy**. Emails at names kept for examples (`example.com`, `.test`, `.invalid`) are left as written.
### Providers
Pick a preset, paste a key. Model lists come from the vendor, with names and reasoning levels filled in from [models.dev](https://models.dev), so a model released this morning is in your picker on the next refresh.
> **Presets include** Anthropic · OpenAI · Google Gemini · Google Vertex AI · Amazon Bedrock (runtime and Mantle) · DeepSeek · Kimi · Zhipu GLM · MiniMax · StepFun · LongCat · Qwen · Baidu Qianfan · Tencent Cloud · Huawei Cloud MaaS · Volcengine Ark · Mistral · Voyage AI · Groq · Nous Portal · xAI · OpenRouter · Vercel AI Gateway · Together · Fireworks · Fireworks Nexus · SiliconFlow · NVIDIA NIM · ModelScope · Ollama · LM Studio … and any OpenAI- or Anthropic-compatible URL.
**Import** brings in the providers from CC Switch, Claude Code, Codex and Alma. **[A