Magpie is a desktop app and local gateway for people who use more than one coding agent, provider or account. Each agent normally keeps its model, keys and base URL in its own config format; Magpie puts them behind one app and a gateway at 127.0.0.1:3425 that speaks OpenAI Chat, OpenAI Responses, Anthropic Messages and Gemini and translates between them, including streaming, tool calls and reasoning. That lets Codex, which only speaks the Responses API, run on DeepSeek, or Claude Code run on Kimi or GLM.
From the menu bar or the Agents page you pick a provider/model for each agent and Magpie rewrites only the relevant key in that agent's own config; profiles switch every agent at once. The README lists dozens of supported agents, including Claude Code, Codex, Gemini CLI, OpenCode, Cursor CLI, Copilot CLI, Zed, Goose, Cline, Droid, Qwen Code and T3 Code, and anything that accepts an OpenAI, Anthropic or Gemini base URL can use the gateway. Providers come from presets (Anthropic, OpenAI, Gemini, Bedrock, DeepSeek, Kimi, GLM, MiniMax, Qwen, OpenRouter, Ollama, LM Studio and more) or any compatible URL.
Magpie can also reuse the Claude, ChatGPT, Copilot, Gemini or Grok plan an agent is signed in to by reading that agent's sign-in files (this discovery can be turned off), and routing groups move to the next account or model when one runs out, using strategies such as smart, in order or least used. Plugins running on Bun add providers or act as gateway middleware, and optional OpenTelemetry export sends metrics to your own collector.
Magpie is free and MIT-licensed and runs on macOS, Windows and Linux (menu bar app, window, TUI, web UI and CLI), in Docker and on Termux. Once a day a running instance sends one anonymous event to PostHog with a random install id, version, OS, and the ids of connected agents, providers and models; the agents/providers/models part can be turned off in Settings → Privacy. Check each model provider's terms before routing a subscription through a third-party gateway.
