/docs/raycast says how magpie puts its models in Raycast AI (Raycast Pro, Mac and Windows): the entry, id magpie, magpie adds to the providers list of ~/.config/raycast/ai/providers.yaml with the gateway's OpenAI-compatible address, a key of Raycast's own and magpie's models; Raycast picking the file up with no restart; the picker listing the models picked for Raycast on the Agents page; each model's abilities spelled out (tools on, vision, reasoning effort, temperature off where refused); Windows' Reveal Providers Config folder; the user's other providers, tools block, comments and own keys kept; and switching back removing the entry, the list and an empty file. Each claim is from internal/agent/raycast.go and the CLI's first-field handling in internal/cli/main.go. Linked from each language's Crush page; in the sitemap, llms.txt and llms-full.txt. Run: the three pages' JSON-LD parsed with node; llms-full.mjs rebuilt; node --test worker.test.mjs install.test.mjs on the WSL box (magpie-desktop, wsl-run; mote has refused SSH this session): 71 pass, 0 fail. Not tried: Raycast itself on magpie for this page; it names only what magpie's source says.
90 lines
14 KiB
Plaintext
90 lines
14 KiB
Plaintext
# magpie
|
|
|
|
> magpie is a free, open-source (MIT) desktop app for macOS, Windows and Linux that lets every AI coding agent use every model. Add a provider once (DeepSeek, Kimi, GLM, Qwen, MiniMax, OpenRouter, Ollama, or the Claude and ChatGPT subscriptions you already pay for), then pick it in Codex, Claude Code, Gemini CLI or any other agent. It runs a local gateway that speaks the OpenAI, Anthropic and Gemini APIs and translates between them, with streaming, tool calls and reasoning intact.
|
|
|
|
magpie lives in the menu bar (tray on Windows and Linux), with a full window, a TUI and a CLI. The Mac download is about 15 MB, built on the system WebView (no Electron). It is signed and notarised on macOS and updates itself.
|
|
|
|
Key facts:
|
|
|
|
- Website: https://usemagpie.ai/ (English), https://usemagpie.ai/zh/ (中文), https://usemagpie.ai/ja/ (日本語), https://usemagpie.ai/de/ (Deutsch)
|
|
- Source code: https://github.com/yetone/magpie
|
|
- Downloads: https://github.com/yetone/magpie-releases/releases/latest
|
|
- Install from a terminal (macOS, Linux): `curl -fsSL https://usemagpie.ai/install.sh | sh`
|
|
- Community: Discord, linked from the website
|
|
- Price: free
|
|
- Full text of every docs page in one file: https://usemagpie.ai/llms-full.txt
|
|
|
|
## What it does
|
|
|
|
- **One model switcher for every agent.** Each agent can use a different provider's model: Codex on DeepSeek, Claude Code on Kimi, Gemini CLI on GLM. magpie edits only the one setting it changes in each agent's config (settings.json, config.toml, config.yaml), keeping comments, order and indentation, and restores it when you pick the agent's own model again.
|
|
- **A local gateway at 127.0.0.1:3425.** It speaks OpenAI Chat Completions, OpenAI Responses, Anthropic Messages and Google Gemini, and translates in both directions, so Codex (Responses only) and Claude Code (Messages only) can use any vendor's model. Any client that can set a base URL can use it: `OPENAI_BASE_URL`, `ANTHROPIC_BASE_URL`, `GOOGLE_GEMINI_BASE_URL`.
|
|
- **Subscription sharing.** A sign-in you made in one agent becomes a provider every other agent can use: a Claude Pro/Max sign-in in OpenCode, Pi or Goose; a ChatGPT Plus/Pro sign-in in Claude Code; a GitHub Copilot seat in any agent.
|
|
- **Routing.** Put several keys and subscriptions behind one model name. magpie picks the account for each request (by intent, in order, round robin, least used first, or by which quota resets first), skips rate-limited and out-of-credit accounts for as long as the vendor says, and fails over to the next account before the agent sees an error. Intent routing asks a small fast model which of your rules a turn belongs to.
|
|
- **Privacy masking.** Before a request leaves the computer, magpie replaces API keys, private keys, tokens, email addresses, and card and ID numbers with placeholders, and puts the real values back in replies and tool calls. An optional local model also finds names, addresses and passwords. Values are never written to disk.
|
|
- **Usage per agent.** Tokens, cache hits and cost for every agent and model that goes through the gateway.
|
|
- **Library.** Instructions, MCP servers, skills, hooks and subagents written once for every agent, and an MCP router.
|
|
- **Remote and Docker.** Share one magpie on the network, or run it in Docker on a server or NAS (`ghcr.io/yetone/magpie`).
|
|
- **Plugins.** OpenCode plugins add providers and subscriptions.
|
|
|
|
## Supported agents
|
|
|
|
Claude Code, Claude Desktop (chat, Code and Cowork), Codex, Gemini CLI, OpenCode, Pi, Goose, Cursor CLI, GitHub Copilot CLI, VS Code, Crush, Droid, Kimi Code, Grok Build, Hermes Agent, Devin, MiniMax Code, MiMo Code, DevEco Code, Command Code, ZCode, Snow CLI, Alma, Cherry Studio and more.
|
|
|
|
## Supported providers
|
|
|
|
DeepSeek, Kimi (Moonshot), GLM (Zhipu), Qwen, MiniMax, Anthropic (Claude), OpenAI, Google Gemini, Mistral, xAI, Groq, OpenRouter, AiHubMix, Ollama and other local servers, any OpenAI- or Anthropic-compatible endpoint, plus Claude, ChatGPT and GitHub Copilot subscriptions.
|
|
|
|
## Docs
|
|
|
|
- [Get started](https://usemagpie.ai/docs/start): how magpie fits together; add providers, pick a model for each agent, route one model over several accounts.
|
|
- [Models in Claude Code](https://usemagpie.ai/docs/claude-code-models): run Claude Code on DeepSeek, Kimi, GLM, Qwen, MiniMax or a ChatGPT plan's GPT models; how the opus, sonnet and haiku tiers map and what changes in settings.json.
|
|
- [Models in Codex](https://usemagpie.ai/docs/codex-models): run Codex on DeepSeek, Kimi, GLM, Qwen or a Claude subscription; the /model list with reasoning efforts and what changes in config.toml.
|
|
- [Models in Gemini CLI](https://usemagpie.ai/docs/gemini-cli-models): run Gemini CLI on DeepSeek, Kimi, GLM, Qwen or a Claude or ChatGPT subscription; what changes in ~/.gemini/.env and settings.json, and how to switch back.
|
|
- [Subscriptions in any agent](https://usemagpie.ai/docs/subscriptions): sign in to Claude, ChatGPT, GitHub Copilot, Gemini Code Assist or Antigravity in magpie and use its models in Claude Code, Codex, Gemini CLI or OpenCode, with several accounts and failover.
|
|
- [ChatGPT in Claude Code](https://usemagpie.ai/docs/claude-code-chatgpt): use a ChatGPT Plus or Pro subscription in Claude Code with no API key; signing in, picking a GPT model, how the opus, sonnet and haiku tiers map, reasoning effort, usage limits, several accounts and switching back.
|
|
- [Local models in Claude Code and Codex](https://usemagpie.ai/docs/local-models): run Claude Code and Codex on Ollama, LM Studio, oMLX, MLX-Serve, vLLM or llama.cpp; default addresses, which API each server speaks, context window and masking.
|
|
- [Models in OpenCode](https://usemagpie.ai/docs/opencode-models): run OpenCode on DeepSeek, Kimi, GLM, Qwen or a Claude, ChatGPT or Copilot subscription; what magpie writes in opencode.json, reasoning variants and cost, and how to switch back.
|
|
- [magpie vs CC Switch vs Claude Code Router](https://usemagpie.ai/docs/alternatives): a fair comparison of the three: agents, config rewrite or local proxy, protocol translation, subscription sign-ins, routing and failover, GUI and CLI, platforms and license, and which one fits.
|
|
- [DeepSeek in every agent](https://usemagpie.ai/docs/deepseek): use DeepSeek V4 in Claude Code, Codex, Gemini CLI and OpenCode; the API key, endpoints, thinking on tool turns, reasoning effort, prompt cache and balance.
|
|
- [Kimi K2 and Kimi Code in every agent](https://usemagpie.ai/docs/kimi): Kimi API or Kimi Code membership keys, global and China endpoints, in Claude Code, Codex, Gemini CLI and OpenCode; usage windows and web search.
|
|
- [GLM Coding Plan in every agent](https://usemagpie.ai/docs/glm): Zhipu GLM and Z.ai, pay as you go or Coding Plan, each plan's endpoints, the 1113 "insufficient balance" fix, thinking and plan windows.
|
|
- [Qwen in every agent](https://usemagpie.ai/docs/qwen): Alibaba Cloud Model Studio (DashScope), Bailian, the Qwen and Bailian Token Plans and Qwen Cloud in Claude Code, Codex, Gemini CLI and OpenCode; which endpoint each key works on, thinking and images.
|
|
- [MiniMax and the Coding Plan in every agent](https://usemagpie.ai/docs/minimax): MiniMax M3 and M2.7, pay as you go or Coding Plan keys, global and China endpoints, interleaved thinking, effort and the plan's usage windows.
|
|
- [OpenRouter in every agent](https://usemagpie.ai/docs/openrouter): one OpenRouter key for Claude Code, Codex, Gemini CLI and OpenCode; which endpoint each agent's requests use, the model list, reasoning, Claude's prompt cache, cost and credits, several keys and free models.
|
|
- [GitHub Copilot in every agent](https://usemagpie.ai/docs/copilot): a Copilot seat's models in Claude Code, Codex, Gemini CLI and OpenCode; signing in (editors, Copilot CLI, GHE.com), Copilot Auto, premium requests, several accounts and errors.
|
|
- [Gemini in every agent](https://usemagpie.ai/docs/gemini): a Google AI Studio key (or Vertex AI) in Claude Code, Codex, Gemini CLI and OpenCode; endpoints, thinking levels, thought signatures across tool calls, tool schemas, search and rate limits.
|
|
- [Grok in every agent](https://usemagpie.ai/docs/grok): an xAI API key in Claude Code, Codex, Gemini CLI and OpenCode; which API each agent's requests use, what magpie fixes for xAI, reasoning effort, web search, prompt cache and several keys.
|
|
- [Mistral in every agent](https://usemagpie.ai/docs/mistral): a Mistral API key in Claude Code, Codex, Gemini CLI and OpenCode; the model list, what magpie fixes for Mistral (thinking parts, refused fields), effort, search, cache and the plan card.
|
|
- [Ollama in every agent](https://usemagpie.ai/docs/ollama): local Ollama, Ollama on another computer and Ollama Cloud in Claude Code, Codex, Gemini CLI and OpenCode; addresses, model list, context window, reasoning, tools, masking, pricing, and magpie as an Ollama server.
|
|
- [Anthropic in every agent](https://usemagpie.ai/docs/anthropic): an Anthropic API key in Claude Code, Codex, Gemini CLI and OpenCode; endpoints, the model list and 1M context, prompt cache marks (5-minute and 1-hour), adaptive thinking and effort, web search, cost and workspaces.
|
|
- [OpenAI in every agent](https://usemagpie.ai/docs/openai): an OpenAI API key (or Azure OpenAI) in Claude Code, Codex, Gemini CLI and OpenCode; Responses vs Chat Completions, prompt_cache_key, reasoning effort and Fast (priority tier), web search, cost and several keys.
|
|
- [Intent routing](https://usemagpie.ai/docs/intent): how a turn is routed by what the user asks for.
|
|
- [Privacy masking](https://usemagpie.ai/docs/masking): what is masked before a request leaves the computer and how values come back.
|
|
- [Claude Desktop on any model](https://usemagpie.ai/docs/claude-desktop): run Claude Desktop's chat, Code and Cowork tabs on DeepSeek, Kimi, GLM, Qwen, GPT or a ChatGPT subscription through its third-party gateway mode, no Anthropic sign-in; model list, Code tab tiers, chats, the separate Claude Magpie app on a Mac and switching back.
|
|
- [OpenClaw on any model](https://usemagpie.ai/docs/openclaw): run OpenClaw (the personal assistant on WhatsApp, Telegram and Discord) on DeepSeek, Kimi, GLM, Qwen, GPT or a ChatGPT subscription; what magpie writes in openclaw.json, the model refs, chats that keep a model (/model default), profiles and switching back.
|
|
- [Hermes Agent on any model](https://usemagpie.ai/docs/hermes): run Nous Research's Hermes Agent and each of its bots on DeepSeek, Kimi, GLM, Qwen, GPT or a ChatGPT subscription; what magpie writes in config.yaml, model and reasoning effort, profiles, WSL and switching back.
|
|
- [Cline on any model](https://usemagpie.ai/docs/cline): run Cline's CLI, VS Code extension and desktop app on DeepSeek, Kimi, GLM, Qwen, GPT or a ChatGPT subscription through Cline's built-in OpenAI-compatible provider; model and reasoning effort, new sessions, VS Code's reload and switching back.
|
|
- [Goose on any model](https://usemagpie.ai/docs/goose): run Block's Goose, its CLI and desktop app, on DeepSeek, Kimi, GLM, Qwen, GPT or a ChatGPT subscription through a custom provider magpie adds; context windows, thinking effort, restarting Goose and switching back.
|
|
- [Droid on any model](https://usemagpie.ai/docs/droid): run Factory's Droid CLI on DeepSeek, Kimi, GLM, Qwen, GPT or a ChatGPT subscription through custom models magpie adds to settings.json; the /model picker, thinking levels, your own BYOK models kept, restarting droid and switching back.
|
|
- [Zed on any model](https://usemagpie.ai/docs/zed): run the Zed editor's agent panel on DeepSeek, Kimi, GLM, Qwen, GPT or a ChatGPT subscription through an OpenAI-compatible provider magpie adds to settings.json; the key in the system credential store, context windows, thinking levels and switching back.
|
|
- [Crush on any model](https://usemagpie.ai/docs/crush): run Charm's Crush on DeepSeek, Kimi, GLM, Qwen, GPT or a ChatGPT subscription through a provider magpie adds to crush.json; the large and small models, reasoning effort, Crush's data file and switching back.
|
|
- [Raycast on any model](https://usemagpie.ai/docs/raycast): use DeepSeek, Kimi, GLM, Qwen, GPT or a ChatGPT subscription in Raycast AI's Quick AI, AI Chat and AI Commands through a custom provider magpie adds to providers.yaml (Raycast Pro); which models the picker lists, tools, vision and reasoning, and switching back.
|
|
- [Cherry Studio](https://usemagpie.ai/docs/cherry-studio): add magpie to Cherry Studio as one OpenAI-compatible provider in one click, confirmed in Cherry Studio, and use every magpie model there, Claude, ChatGPT and Copilot subscriptions included; model list, status and usage.
|
|
- [Fixing common errors](https://usemagpie.ai/docs/troubleshooting): what the gateway's errors mean and the fix: 401 and 403, 429 and rest periods, 502 and 504, model not found, an agent that doesn't show a model, port 3425 in use, agents in WSL, use from another computer and subscriptions moved to plugins.
|
|
- [Library](https://usemagpie.ai/docs/library): instructions, MCP servers, skills, hooks and subagents for each agent.
|
|
- [MCP router](https://usemagpie.ai/docs/mcp-router): one magpie MCP server per agent.
|
|
- [Remote magpie](https://usemagpie.ai/docs/remote): use one magpie from several computers.
|
|
- [Docker](https://usemagpie.ai/docs/docker): run magpie on a server or NAS.
|
|
- [Add to magpie](https://usemagpie.ai/docs/import): import links that add a provider and its models in one click.
|
|
- [Integrate your app](https://usemagpie.ai/docs/integrate): how an AI app or agent works with magpie's gateway.
|
|
- [Writing plugins](https://usemagpie.ai/docs/plugins): OpenCode plugins that add a provider.
|
|
- [Privacy](https://usemagpie.ai/docs/privacy): what magpie sends on its own, and every switch that turns it off.
|
|
|
|
## Common questions
|
|
|
|
- **How do I use DeepSeek, Kimi or GLM in Claude Code?** Add the provider's key in magpie, then pick its model for Claude Code. magpie points Claude Code at its gateway and translates Anthropic Messages to the provider's API.
|
|
- **How do I use a model other than OpenAI's in Codex?** Add the provider in magpie and pick the model for Codex; it appears in Codex's /model list with matching reasoning efforts.
|
|
- **Can I use my ChatGPT or Claude subscription in other agents?** Yes: sign in once in magpie and the subscription's models appear in every agent's picker.
|
|
- **Is it a CC Switch or claude-code-router alternative?** It covers much of the same ground for every agent at once: switching providers, a translating gateway, routing and failover. See the comparison: https://usemagpie.ai/docs/alternatives
|
|
- **Does magpie read API keys from my shell?** No. It never reads keys from environment variables; it uses only what you add.
|