yetone/magpie

Every agent's model. One place. Codex on DeepSeek, Claude Code on Kimi, from the menu bar.

Go

10,219

2,832 commits

updated Oct 12, 2026

See the code

See what people are saying

SourceMessageScoreDate

https://t.co/OQtaoEjsEO https://t.co/CQC2GheAHB curl -fsSL https://t.co/dAAwrpPBX3 | sh

1

Oct 12, 2026

@G_Z_Y 这个例子很具体,谢谢。我记成了 issue:https://t.co/IMCa2ObODT 难点在「效果变差」靠什么判断,比如重试次数、同一处来回改几轮、工具调用失败率。得先拿真实会话看看哪些信号靠得住,再决定怎么给建议。

2

Oct 12, 2026

Magpie's Oct 10 gateway patch preserves Gemini's thoughtSignature on the tool call it signed. Previously, that path substituted a skip value. The author reports passing regression tests, but no test with a real account. https://t.co/RfWhEcuXKi

1

Oct 12, 2026

同时用好几个编程 Agent,配置可以只管一处:yetone 开源 magpie 🐦 本地网关统一转换 OpenAI、Anthropic、Gemini 协议,Claude Code 跑 Kimi、Codex 跑 DeepSeek,菜单栏一键切。额度用完自动换下一个账号,token 和花费按美元或人民币统计。MIT,9.2k⭐ https://t.co/H1i3T85wU9

1

Oct 12, 2026

CCSwitch 迎来了史上最强对手:magpie yetone 开源,9.2k star,MIT:https://t.co/0JTir3ACwK 菜单栏常驻,40+ agent(Claude Code/Codex/Gemini CLI)一键换模型 本地网关做协议翻译:Codex 跑 DeepSeek,Claude Code 跑 Kimi 只做单 agent 账号切换的时代,过去了 https://t.co/P1TKgLIhqB https://t.co/6FQDRyRxZ9

10

Oct 11, 2026

@ThirteenYizuka @yetone 你自己指的出问题嘛?搞笑,你牛逼你就提交issue说一下问题在哪,他的agent自动就给修复了。你看我怎么做的: https://t.co/yCUD82oWqQ 你不能光说不行,你得摆出具体的证据,说明你花了时间看。 你批判可以,但是你首先得自己能做到某件事你才有资格批评别人。

16

Oct 11, 2026

冷知识,moejs的作者也在 newapi,且和这位推主颇有渊源 https://t.co/jY8pXjooRq https://t.co/Ek9WoBGRR6

2

Oct 11, 2026

Magpie 比 CC Switch 好用太多了。 CC Switch代码里之前还硬编码了 Codex Cli Version,导致我在Gpt6发布的第三天还没办法用上,最后花了三小时改了下代码发了个包才搞定。 他的Agent,路由,网关等等概念划分的很好理解,推荐大家学习 https://t.co/IN7Hm48YWc

1

Oct 11, 2026

https://t.co/loMCV69L3P 给magpie增加了stepcode的支持 个人感觉stepcode还是好用的

2

Oct 11, 2026

magpie 让每个 Agent 都能用上每一个模型 不愧是yetone大佬,设计的真好 官网:https://t.co/UBFs0SjkvR Github:https://t.co/G7WSHnxpxV https://t.co/vweJlmtXG8

3

Oct 11, 2026

README

magpie

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 the next account.

Release Stars Discord License
macOS Windows Linux Docker Termux

Download  ·  Docs  ·  Reference  ·  Plugins  ·  Discord  ·  English · 简体中文


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 routing group moves to the next account or model, and the agent never sees the error.

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, or run:

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

Mac builds are signed and notarised, and every build updates itself. Behind a firewall, use --proxy or --mirror. Or go install github.com/yetone/magpie@latest, or the Docker image.

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 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 · Codex · Gemini CLI · Antigravity CLI · OpenCode · OpenChamber · MiMo Code · Pi · oh-my-pi · Aside · OmO · Prime Agent · Goose · Cursor CLI · Cursor Private Inference · Zed · VS Code Chat · VS Code Insiders · VSCodium Chat · JetBrains Air · 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 · MiniMax Code · Droid · Cline · Qoder · Qoder CN · Grok Build · Grok App · ZCode · WorkBuddy · WorkBuddy AI · CodeBuddy Code · Pencil · T3 Code · OpenHanako · AtomCode · Snow CLI · Alma · Cindy

magpie shows only the agents installed on your machine; setup notes for some of them are in the reference. 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.

flowchart LR
  subgraph A["Your agents"]
    direction TB
    a1["Claude Code"]
    a2["Codex"]
    a3["Gemini CLI"]
    a4["OpenCode · Zed · Cursor CLI · 40+ more"]
  end
  subgraph M["magpie · 127.0.0.1:3425"]
    direction TB
    g["Gateway<br/>Chat · Responses · Messages · Gemini"]
    r["Routing groups<br/>fail-over · smart · pace"]
    p["Plugins & middleware"]
    g --> r --> p
  end
  subgraph P["Your providers"]
    direction TB
    p1["API keys<br/>DeepSeek · Kimi · GLM · OpenRouter …"]
    p2["Subscriptions<br/>Claude · ChatGPT · Copilot · Gemini · Grok"]
    p3["Local models<br/>Ollama · LM Studio"]
  end
  A --> M --> P

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

Providers

Pick a preset, paste a key. Model lists come from the vendor, with names and reasoning levels filled in from 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 · DeepSeek · Kimi · Zhipu GLM · MiniMax · StepFun · Qwen · Baidu Qianfan · Tencent Cloud · Huawei Cloud MaaS · Volcengine Ark · Mistral · Groq · xAI · OpenRouter · Together · Fireworks · 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. Add to magpie links let a provider's website hand its config to magpie in one click. Each key and each account can go through a proxy of its own.

Add provider: subscriptions to sign in to, vendors, relays and local servers

Subscriptions

An agent you're signed in to is a subscription with models behind it, so magpie offers it as a provider to every other agent. Add several accounts per subscription and magpie fails over between them.

  • Claude: drives the real local claude binary and bridges your agent's tools over MCP
  • Codex / ChatGPT: your ChatGPT plan's models, in every other agent
  • GitHub Copilot, Gemini (Code Assist), Antigravity, Grok (SuperGrok) and more
  • Any OpenCode auth plugin or pi package from npm

Daily warm-up starts each Claude and ChatGPT account's 5-hour window at the times you choose, or the moment the last one resets.

Routing groups

A routing group is several models an agent picks as one, such as group/daily-coding. The gateway spreads requests over every member's keys and accounts:

ModeWhat it does
smartOf the subscriptions with quota left, use the one that renews soonest, so less is wasted at the reset
orderUse the first model until it can't answer, then the next
rotateMove to the next member on each turn
usageUse the least-used member first
paceUse the account with the most of its week left per hour until it resets

A conversation stays with the account that answered it while the vendor's prompt cache is worth keeping. Groups can contain groups. Intent routing has a small model of your choice read each new turn, so tests go to the strong model and quick questions to the cheap one. The Routing view shows every decision live.

The Routing view: four agents through magpie to seven providers, live
An intent-routed turn, explained step by step A routing group inside a routing group

Plugins

magpie plugin add opencode-gemini-auth   # an OpenCode plugin from npm
magpie plugin add pi-antigravity         # a pi package, the same way
magpie plugin login google-plugin        # its own sign-in flow, in magpie

Plugins run on Bun, downloaded the first time one needs it. A plugin signs in, lists its models and makes each request; agents use those models like any other provider's. Browse magpie-community/plugins, or write your own.

A plugin can also be gateway middleware: JavaScript that sees what every agent sends and gets back. onRequest can rewrite a request or turn it away, onEvent sees each streamed event, onResponse the whole reply. A hook that throws or runs too long leaves the request as it was.

// alias.middleware.js — magpie plugin add ./alias.middleware.js
export function onRequest(body, ctx) {
  if (body.model === "fast") return { ...body, model: "deepseek/deepseek-chat" };
}
Ready-made middleware, most of it what New API does for its channels, with the same JSON
PackageWhat it does
param-overrideNew API's param_override: set, delete, move or rewrite request fields, under conditions, or turn a request away
model-mapNew API's model_mapping: send a model under another name; replies keep the name asked for
system-promptYour system prompt on every request, or some agents' or models'
word-guardNew API's sensitive-word filter: turn away or mask words in what users send, and in replies
think-tagsTake <think>…</think> out of replies, or put reasoning_content into them
magpie plugin add @magpie-community/middleware-model-map
magpie plugin options model-map '{"mapping": {"fast": "deepseek/deepseek-chat"}}'

Find them under Plugins › Discover › Gateway middleware. See Gateway middleware.

Usage and cost

The Usage page: balances, tokens, cache hit rate and cost
Tokens and costTokens, cache reads and writes, reasoning and calls, with cost at list price in dollars or yuan; set your own price for any model
QuotaBalances and quota windows for every key, plan and account (magpie quota), and a reminder before a window renews with much of it unused
SessionsEvery agent conversation with its cost and title, reopened in your terminal with one click
ContextHow full each request's context window is, how much came from the cache, and what fills it
BillsBy account and by upstream key, and OTLP export to your own observability stack

Sharing

Local networkTurn on Share on local network and give each client a named gateway key with its own daily, weekly or monthly token and cost limit
Remote magpieA laptop uses the providers, accounts and groups of the magpie on your desktop, and still wires its own agents
DockerRun ghcr.io/yetone/magpie on a server or a NAS and manage it from the web UI
SyncBack up to a file, or sync machines over WebDAV (Nutstore, Nextcloud…) or S3

Also

  • Library: write instructions, MCP servers and skills once; magpie writes them into each agent's files in its format, and removes only what it wrote.
  • Images and video: an image tool for any agent over MCP, with the model you choose, and videos with a Grok subscription.
  • Agents kept current: the Agents page shows each CLI's version, updates it the way it was installed, and gives the commands for the ones you don't have.
  • WSL: on Windows, agents inside WSL distros are wired too, and their sessions counted.
  • Keep awake, light and dark, and your theme's look on Omarchy.

Documentation

Get startedThe guided tour
ReferenceEvery agent, provider option, gateway endpoint, CLI command and file
PluginsUse plugins and write your own
Intent routingRoute each turn by what it asks for
Import links"Add to magpie" buttons for provider websites
Remote magpieUse one magpie's providers and groups from your other computers
DockerRun magpie on a server or a NAS

Privacy

Your prompts, replies, keys and accounts go only to the providers you use. Once a day a released magpie tells us it is in use: a random id, its version and system, and which agents, providers and models it is used with, by magpie's own ids (a provider you added yourself is only custom), and for each partner listed first in the add sheet, how many times a day it was shown, opened and added (counts only). No names, URLs, accounts, keys, prompts or usage. Turn part or all of it off in Settings → Privacy, or with DO_NOT_TRACK=1. A partner's website and key links go through usemagpie.ai/go/…, which counts the click, and usemagpie.ai counts fetches of the partner list; the server sees these whatever the settings, and keeps no id or address. Icons named by a plugin, an import link or the library are fetched through usemagpie.ai/api/icon, so their hosts see Cloudflare's address, not yours; the server only passes the picture on, and counts and keeps nothing. What is sent, exactly.

Community

Questions, ideas, or a model that won't show up? Tell us on Discord. That is where feedback goes.

This repository doesn't take pull requests. Only maintainers can open them. If you'd like a fix or a feature, describe it on Discord and we'll build it.

If magpie saved you from editing one more config file, a ⭐ helps others find it.

Star history

License

MIT

claude-code
codex
deepseek
gemini-cli
llm
macos

yetone/magpie

Every agent's model. One place. Codex on DeepSeek, Claude Code on Kimi, from the menu bar.

Go

10,219

2,832 commits

updated Oct 12, 2026

See the code

See what people are saying

SourceMessageScoreDate

https://t.co/OQtaoEjsEO https://t.co/CQC2GheAHB curl -fsSL https://t.co/dAAwrpPBX3 | sh

1

Oct 12, 2026

@G_Z_Y 这个例子很具体,谢谢。我记成了 issue:https://t.co/IMCa2ObODT 难点在「效果变差」靠什么判断,比如重试次数、同一处来回改几轮、工具调用失败率。得先拿真实会话看看哪些信号靠得住,再决定怎么给建议。

2

Oct 12, 2026

Magpie's Oct 10 gateway patch preserves Gemini's thoughtSignature on the tool call it signed. Previously, that path substituted a skip value. The author reports passing regression tests, but no test with a real account. https://t.co/RfWhEcuXKi

1

Oct 12, 2026

同时用好几个编程 Agent,配置可以只管一处:yetone 开源 magpie 🐦 本地网关统一转换 OpenAI、Anthropic、Gemini 协议,Claude Code 跑 Kimi、Codex 跑 DeepSeek,菜单栏一键切。额度用完自动换下一个账号,token 和花费按美元或人民币统计。MIT,9.2k⭐ https://t.co/H1i3T85wU9

1

Oct 12, 2026

CCSwitch 迎来了史上最强对手:magpie yetone 开源,9.2k star,MIT:https://t.co/0JTir3ACwK 菜单栏常驻,40+ agent(Claude Code/Codex/Gemini CLI)一键换模型 本地网关做协议翻译:Codex 跑 DeepSeek,Claude Code 跑 Kimi 只做单 agent 账号切换的时代,过去了 https://t.co/P1TKgLIhqB https://t.co/6FQDRyRxZ9

10

Oct 11, 2026

@ThirteenYizuka @yetone 你自己指的出问题嘛?搞笑,你牛逼你就提交issue说一下问题在哪,他的agent自动就给修复了。你看我怎么做的: https://t.co/yCUD82oWqQ 你不能光说不行,你得摆出具体的证据,说明你花了时间看。 你批判可以,但是你首先得自己能做到某件事你才有资格批评别人。

16

Oct 11, 2026

冷知识,moejs的作者也在 newapi,且和这位推主颇有渊源 https://t.co/jY8pXjooRq https://t.co/Ek9WoBGRR6

2

Oct 11, 2026

Magpie 比 CC Switch 好用太多了。 CC Switch代码里之前还硬编码了 Codex Cli Version,导致我在Gpt6发布的第三天还没办法用上,最后花了三小时改了下代码发了个包才搞定。 他的Agent,路由,网关等等概念划分的很好理解,推荐大家学习 https://t.co/IN7Hm48YWc

1

Oct 11, 2026

https://t.co/loMCV69L3P 给magpie增加了stepcode的支持 个人感觉stepcode还是好用的

2

Oct 11, 2026

magpie 让每个 Agent 都能用上每一个模型 不愧是yetone大佬,设计的真好 官网:https://t.co/UBFs0SjkvR Github:https://t.co/G7WSHnxpxV https://t.co/vweJlmtXG8

3

Oct 11, 2026

README

magpie

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 the next account.

Release Stars Discord License
macOS Windows Linux Docker Termux

Download  ·  Docs  ·  Reference  ·  Plugins  ·  Discord  ·  English · 简体中文


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 routing group moves to the next account or model, and the agent never sees the error.

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, or run:

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

Mac builds are signed and notarised, and every build updates itself. Behind a firewall, use --proxy or --mirror. Or go install github.com/yetone/magpie@latest, or the Docker image.

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 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 · Codex · Gemini CLI · Antigravity CLI · OpenCode · OpenChamber · MiMo Code · Pi · oh-my-pi · Aside · OmO · Prime Agent · Goose · Cursor CLI · Cursor Private Inference · Zed · VS Code Chat · VS Code Insiders · VSCodium Chat · JetBrains Air · 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 · MiniMax Code · Droid · Cline · Qoder · Qoder CN · Grok Build · Grok App · ZCode · WorkBuddy · WorkBuddy AI · CodeBuddy Code · Pencil · T3 Code · OpenHanako · AtomCode · Snow CLI · Alma · Cindy

magpie shows only the agents installed on your machine; setup notes for some of them are in the reference. 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.

flowchart LR
  subgraph A["Your agents"]
    direction TB
    a1["Claude Code"]
    a2["Codex"]
    a3["Gemini CLI"]
    a4["OpenCode · Zed · Cursor CLI · 40+ more"]
  end
  subgraph M["magpie · 127.0.0.1:3425"]
    direction TB
    g["Gateway<br/>Chat · Responses · Messages · Gemini"]
    r["Routing groups<br/>fail-over · smart · pace"]
    p["Plugins & middleware"]
    g --> r --> p
  end
  subgraph P["Your providers"]
    direction TB
    p1["API keys<br/>DeepSeek · Kimi · GLM · OpenRouter …"]
    p2["Subscriptions<br/>Claude · ChatGPT · Copilot · Gemini · Grok"]
    p3["Local models<br/>Ollama · LM Studio"]
  end
  A --> M --> P

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

Providers

Pick a preset, paste a key. Model lists come from the vendor, with names and reasoning levels filled in from 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 · DeepSeek · Kimi · Zhipu GLM · MiniMax · StepFun · Qwen · Baidu Qianfan · Tencent Cloud · Huawei Cloud MaaS · Volcengine Ark · Mistral · Groq · xAI · OpenRouter · Together · Fireworks · 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. Add to magpie links let a provider's website hand its config to magpie in one click. Each key and each account can go through a proxy of its own.

Add provider: subscriptions to sign in to, vendors, relays and local servers

Subscriptions

An agent you're signed in to is a subscription with models behind it, so magpie offers it as a provider to every other agent. Add several accounts per subscription and magpie fails over between them.

  • Claude: drives the real local claude binary and bridges your agent's tools over MCP
  • Codex / ChatGPT: your ChatGPT plan's models, in every other agent
  • GitHub Copilot, Gemini (Code Assist), Antigravity, Grok (SuperGrok) and more
  • Any OpenCode auth plugin or pi package from npm

Daily warm-up starts each Claude and ChatGPT account's 5-hour window at the times you choose, or the moment the last one resets.

Routing groups

A routing group is several models an agent picks as one, such as group/daily-coding. The gateway spreads requests over every member's keys and accounts:

ModeWhat it does
smartOf the subscriptions with quota left, use the one that renews soonest, so less is wasted at the reset
orderUse the first model until it can't answer, then the next
rotateMove to the next member on each turn
usageUse the least-used member first
paceUse the account with the most of its week left per hour until it resets

A conversation stays with the account that answered it while the vendor's prompt cache is worth keeping. Groups can contain groups. Intent routing has a small model of your choice read each new turn, so tests go to the strong model and quick questions to the cheap one. The Routing view shows every decision live.

The Routing view: four agents through magpie to seven providers, live
An intent-routed turn, explained step by step A routing group inside a routing group

Plugins

magpie plugin add opencode-gemini-auth   # an OpenCode plugin from npm
magpie plugin add pi-antigravity         # a pi package, the same way
magpie plugin login google-plugin        # its own sign-in flow, in magpie

Plugins run on Bun, downloaded the first time one needs it. A plugin signs in, lists its models and makes each request; agents use those models like any other provider's. Browse magpie-community/plugins, or write your own.

A plugin can also be gateway middleware: JavaScript that sees what every agent sends and gets back. onRequest can rewrite a request or turn it away, onEvent sees each streamed event, onResponse the whole reply. A hook that throws or runs too long leaves the request as it was.

// alias.middleware.js — magpie plugin add ./alias.middleware.js
export function onRequest(body, ctx) {
  if (body.model === "fast") return { ...body, model: "deepseek/deepseek-chat" };
}
Ready-made middleware, most of it what New API does for its channels, with the same JSON
PackageWhat it does
param-overrideNew API's param_override: set, delete, move or rewrite request fields, under conditions, or turn a request away
model-mapNew API's model_mapping: send a model under another name; replies keep the name asked for
system-promptYour system prompt on every request, or some agents' or models'
word-guardNew API's sensitive-word filter: turn away or mask words in what users send, and in replies
think-tagsTake <think>…</think> out of replies, or put reasoning_content into them
magpie plugin add @magpie-community/middleware-model-map
magpie plugin options model-map '{"mapping": {"fast": "deepseek/deepseek-chat"}}'

Find them under Plugins › Discover › Gateway middleware. See Gateway middleware.

Usage and cost

The Usage page: balances, tokens, cache hit rate and cost
Tokens and costTokens, cache reads and writes, reasoning and calls, with cost at list price in dollars or yuan; set your own price for any model
QuotaBalances and quota windows for every key, plan and account (magpie quota), and a reminder before a window renews with much of it unused
SessionsEvery agent conversation with its cost and title, reopened in your terminal with one click
ContextHow full each request's context window is, how much came from the cache, and what fills it
BillsBy account and by upstream key, and OTLP export to your own observability stack

Sharing

Local networkTurn on Share on local network and give each client a named gateway key with its own daily, weekly or monthly token and cost limit
Remote magpieA laptop uses the providers, accounts and groups of the magpie on your desktop, and still wires its own agents
DockerRun ghcr.io/yetone/magpie on a server or a NAS and manage it from the web UI
SyncBack up to a file, or sync machines over WebDAV (Nutstore, Nextcloud…) or S3

Also

  • Library: write instructions, MCP servers and skills once; magpie writes them into each agent's files in its format, and removes only what it wrote.
  • Images and video: an image tool for any agent over MCP, with the model you choose, and videos with a Grok subscription.
  • Agents kept current: the Agents page shows each CLI's version, updates it the way it was installed, and gives the commands for the ones you don't have.
  • WSL: on Windows, agents inside WSL distros are wired too, and their sessions counted.
  • Keep awake, light and dark, and your theme's look on Omarchy.

Documentation

Get startedThe guided tour
ReferenceEvery agent, provider option, gateway endpoint, CLI command and file
PluginsUse plugins and write your own
Intent routingRoute each turn by what it asks for
Import links"Add to magpie" buttons for provider websites
Remote magpieUse one magpie's providers and groups from your other computers
DockerRun magpie on a server or a NAS

Privacy

Your prompts, replies, keys and accounts go only to the providers you use. Once a day a released magpie tells us it is in use: a random id, its version and system, and which agents, providers and models it is used with, by magpie's own ids (a provider you added yourself is only custom), and for each partner listed first in the add sheet, how many times a day it was shown, opened and added (counts only). No names, URLs, accounts, keys, prompts or usage. Turn part or all of it off in Settings → Privacy, or with DO_NOT_TRACK=1. A partner's website and key links go through usemagpie.ai/go/…, which counts the click, and usemagpie.ai counts fetches of the partner list; the server sees these whatever the settings, and keeps no id or address. Icons named by a plugin, an import link or the library are fetched through usemagpie.ai/api/icon, so their hosts see Cloudflare's address, not yours; the server only passes the picture on, and counts and keeps nothing. What is sent, exactly.

Community

Questions, ideas, or a model that won't show up? Tell us on Discord. That is where feedback goes.

This repository doesn't take pull requests. Only maintainers can open them. If you'd like a fix or a feature, describe it on Discord and we'll build it.

If magpie saved you from editing one more config file, a ⭐ helps others find it.

Star history

License

MIT

claude-code
codex
deepseek
gemini-cli
llm
macos

Project health

Latest release

v0.1.1198 · Oct 11, 2026

Releases this year

1,199

Significant stargazers

(top 24 of 46)

yihong

6,595 followers · starred Sep 2026

JounQin

673 followers · starred Sep 2026

Yuan-Man

579 followers · starred Oct 2026

luo jiyin

335 followers · starred Sep 2026