Back to services

Magpie

Magpie is a model switcher and local gateway for AI coding agents that runs on your machine. Add a model provider once, and you can pick a model from any vendor with one click in agents such as Codex, Claude Code, and Gemini CLI.

View alternatives to Magpie
Contributor:
einverne
Suggest edit
Recent reviews

Alternatives

Website preview

Tech stack

No tech stack added yet. Sign in to suggest some

Magpie runs a gateway on your machine (default address 127.0.0.1:3425) that translates in both directions between the OpenAI Chat/Responses, Anthropic Messages, and Google Gemini APIs, with support for streaming output, tool calls, and reasoning content. For example, Codex only supports OpenAI Responses, and Claude Code only supports Anthropic Messages. Through Magpie, both can use models from other vendors such as DeepSeek, Kimi, GLM, and Qwen.

Key features

  • Unified switching from the menu bar: See at a glance which model each agent is currently using, and change it with a click. Magpie only changes the one key that needs modifying in the relevant config, and the change takes effect in the next session. When you switch back to the native model, the previous configuration is restored.
  • Profiles: Save setups such as "Save money" or "Focus" and switch all agents at once.
  • Privacy redaction: Before a request is sent, Magpie replaces sensitive values on your machine with placeholders, including API keys, private keys, tokens, email addresses, and bank card and national ID numbers with valid check digits, then swaps the real values back in when the response arrives. Vendors never see these values. You can also opt in to a local model to catch things that rules struggle to cover, such as names and addresses. Redacted values are kept in memory only, and if redaction can't run, the request is blocked rather than sent as is. The Insights page lists every request that was rewritten.
  • Subscription sharing: Accounts you're already signed in to, such as Claude Pro/Max, ChatGPT Plus/Pro, and GitHub Copilot, become a provider, and their models appear in the model lists of your other agents, with no copying or pasting of keys.
  • Smart routing: Route different types of requests (such as "quick questions" or "write tests") to different models based on intent. You can add multiple accounts or keys, and the routing strategies are smart (prefers the account whose quota resets soonest), in order, round-robin, and least used first. When a quota runs out, a rate limit is hit, or an account errors, Magpie automatically retries with the next account, so the agent never sees the error.
  • Provider presets: About 20 presets are included, covering vendors, relay services, and local services, such as DeepSeek, Kimi, GLM, Qwen, MiniMax, OpenRouter, and Ollama. Paste in a key to finish setup; model lists are fetched dynamically from the vendor's API.
  • Usage statistics: Tokens, cache hits, and costs, broken down by agent and model.
  • TUI and CLI: In addition to the graphical interface, there is a command line and a terminal UI, for example magpie codex deepseek/deepseek-v4-pro, magpie claude moonshot/kimi-k3, and magpie save work && magpie use work.

Supported agents

The official website lists dozens, including Claude Code, Codex, Gemini CLI, OpenCode, Goose, Cursor CLI, Copilot CLI, VS Code, Crush, and Devin. Any client that supports a custom base URL can connect, such as OPENAI_BASE_URL, ANTHROPIC_BASE_URL, and GOOGLE_GEMINI_BASE_URL.

Target users and strengths

It suits developers who use several AI coding agents at once, want to power them with cheaper or better-suited models, or have multiple subscriptions or keys and want them scheduled automatically. It is built on the system webview with no Electron, and the Mac installer is about 15 MB. The project is released under the MIT license and is free and open source. Magpie doesn't read API keys from environment variables; it only uses the keys you add to it, and it never lets agents see those keys. When editing configs, it preserves comments, ordering, and indentation in settings.json, config.toml, and config.yaml, and writes atomically.

Installation and requirements

  • macOS 11/12 or later (Apple Silicon and Intel), Windows 10 or later (x64, ARM), and Linux (requires GTK 3 and WebKitGTK 4.1, x86-64 and ARM64).
  • You can download the installer from the official website, or run curl -fsSL https://usemagpie.ai/install.sh | sh in a terminal, which installs the magpie command to ~/.local/bin.
  • The app downloads updates in the background automatically and installs them after a restart.

Notes

  • After redaction, the model sees placeholders. If a task needs to work with a particular value, add it to "Never mask".
  • The official website states that it is unrelated to the Apache Magpie project.

Discover more

Claude Relay Service

Claude Relay Service (CRS) is a self-hosted, open-source AI API relay service. It brings Claude, OpenAI (Codex), Gemini, Droid and other accounts together in one place, supports rotation across multiple accounts, assigns each user an independent API Key, and provides usage statistics and a web admin dashboard.

API Relay
Claude Code
+6

Cindy

Cindy is an open-source AI agent app that connects your computer and phone, so you can use agent frameworks such as Claude Code, Codex and Pi, along with a wide range of models, all in one place. It supports cross-device access to tasks, files and models, as well as remote desktop takeover, with no need to set up your own server.

AI Agent
Open Source
+6

Ovis

Ovis is the free, open-source client for herdr (formerly the herdr web UI). From your phone, a desktop app, or any browser, you can view and reply to coding agents such as Claude Code and Codex, either as a chat or in a live terminal.

AI Coding Agents
herdr
+6

cc-switch

CC Switch is a free, open-source desktop app for managing multiple AI coding tools, including Claude Code, Codex, and Gemini CLI, in one place. It offers provider configuration switching, local routing, MCP, Skills, session management, and usage statistics.

AI Coding Tools
Vendor Switching
+6

Ego lite Browser

ego lite is a browser shared by users and AI agents. Agents such as Claude Code and Codex run web automation tasks in separate Spaces, so they never take over your own tabs, and they can reuse the logged-in state of your browser.

Browser Automation
AI Agent
+6

PowerContext

PowerContext is OceanBase's open-source context service for AI agents. It keeps long-lived information such as decisions, constraints, evidence, and progress outside any single conversation. The next session, the next agent, or the next person can pick up from the current state without rereading chat history.

Agent Memory
Long-Term Memory
+6