Toolin.ai
magpie

magpie

Officially listed

A local multi-model API gateway that lets any coding agent use any model.

views 26favorites 0Free

magpie

magpie is a multi-model API gateway + coding agent model switcher that runs locally (GitHub yetone/magpie, MIT-licensed, written in Go). It solves a specific pain point: Codex only speaks the OpenAI Responses protocol, Claude Code only speaks Anthropic Messages, and Gemini CLI speaks the Google format—magpie starts a local gateway at 127.0.0.1:3425 that accepts all three protocols and translates between them bidirectionally (including streaming, tool calls, and reasoning), letting any agent call any vendor's models.

Core Capabilities

  • Protocol-Translating Gateway: Exposes standard paths such as /v1/chat/completions, /v1/responses, /v1/messages, /v1/messages/count_tokens, /v1beta/models/{model}:generateContent, and /v1/models; any client supporting a custom base URL can connect (OPENAI_BASE_URL / ANTHROPIC_BASE_URL / GOOGLE_GEMINI_BASE_URL, gateway key can be any value)
  • Surgical Agent Config Rewriting: Changes only the key the user modified, preserving comments, key order, and indentation with atomic writes; covers ~/.claude/settings.json, ~/.codex/config.toml, opencode, goose, and more; restores precisely when switching back to native models
  • Subscription Reuse: Uses logged-in Claude Code (Pro/Max/Team), Codex (ChatGPT Plus/Pro/Business), Copilot, Grok, Cursor, and Devin sessions as providers, whose models appear with claude/…, codex/…, copilot/… prefixes in other agents' model selectors, no key copying needed
  • Vendor Presets and Dynamic Model Lists: About 20 built-in presets (Anthropic, OpenAI, Gemini, DeepSeek, Kimi, GLM, MiniMax, Qwen, Mistral, Groq, xAI, OpenRouter, Together, Fireworks, SiliconFlow, AiHubMix, 302.AI, Ollama, LM Studio, and more); with a key it pulls model lists from vendors in real time, supplemented by the models.dev directory for names and reasoning levels
  • Routing Groups and Smart Routing: Merges multiple accounts/keys into one group/<id> with intent-based routing (a small-model classifier decides), sequential, round-robin, and least-used-first strategies, plus rate-limit awareness (per-vendor Retry-After), balance exhaustion, and failover
  • Profiles Config Snapshots: Saves each agent's settings as named profiles (like "Budget," "Focus") and switches them wholesale in one click
  • Multi-Entry and Lightweight: Menu bar desktop app (Wails + system WebView, not Electron), TUI (magpie tui), and CLI; supports macOS / Windows / Linux; desktop builds under 15 MB, terminal builds about 7 MB
  • Secondary Capabilities: magpie://import import links (parameters sit in the URL fragment, never sent to the server by the browser), usage stats (tokens / cache hits / cost), self-update, and encrypted backups

Use Cases Suited to local developers who run two or more AI coding agents at once (Claude Code + Codex + Gemini CLI, etc.) and want unified model switching plus reuse of existing subscriptions, especially macOS users. Users with a single agent, or enterprise teams highly sensitive to compliance and credential security, will gain little.

Name Disambiguation (Important): This entry is yetone/magpie (usemagpie.ai), not Blinue/Magpie (the Windows screen magnifier), nor magpie.im, magpie.report, AMD Magpie, or various same-named Magpie projects in Postgres / data tooling.

Risk Warnings: (1) It reads other agents' credential files and reuses subscription logins across agents, and "warms up" accounts per reset windows; the README itself advises "use an account you can afford to lose," carrying a risk of violating vendor terms and getting banned; (2) the site's /terms and /privacy are both 404—no terms of service or privacy policy; (3) the project is extremely early (repo created 2026-09-23, version 0.1.x, iterating from v0.1.218 to v0.1.223 within a day); (4) single-maintainer (author yetone with 401 commits, the other 11 contributors with 1–8 each), no company entity or support commitments; (5) curl | sh install with silent auto-updates, and Windows/Linux builds are unsigned. On the plus side: it is genuinely complete MIT Go source, the gateway listens on loopback only, keys are stored locally with 0600 permissions, the README mentions no telemetry, and community reception is positive (1,242 stars / 69 forks).

Pricing

### 💰 定价模式:完全免费 + 开源(MIT) **起步价**:免费(MIT 开源,无付费层级、无账号体系、无托管云版本) #### 主要方案 - **开源版(本机)**:免费 —— MIT 许可,Go 源码完整公开于 `yetone/magpie`,二进制发布在 `yetone/magpie-releases`。无 per-request 费、无座位上限、无企业规模门槛 - **无托管 / SaaS 版本**:官方**不提供**任何托管代理服务,也没有账号体系,不存在付费档位 - **实际成本**:仅在模型厂商侧——用户自带 API Key,或复用自己已付费的 Claude / ChatGPT / Copilot / Grok 等订阅额度 #### 计费要点 - 官网与文档中**不存在** pricing / plans 页面,也无 Terms / Privacy 页面 - 安装方式完全免费:官网下载、`curl -fsSL https://usemagpie.ai/install.sh | sh`,或 `go install github.com/yetone/magpie@latest` - 第三方来源口径一致:myaiexp 称「magpie itself is free: MIT licensed, open source, no account」,claudeers.com 标注「License MIT, Pricing open-source」 > ⚠️ 已实测 `https://usemagpie.ai/pricing`、`/plans`、`/terms`、`/privacy`、`/sitemap.xml` **全部返回真实 HTTP 404**(非 SPA 软 404,返回空响应体),故 pricing_url 为 null——这是「开源免费、本就没有定价页」,不是抓取失败。

FAQ

What is magpie?

magpie is a multi-model API gateway plus coding agent model switcher that runs on your own machine. It starts a local gateway at 127.0.0.1:3425, bidirectionally translating between the OpenAI, Anthropic, and Google Gemini API protocols so you can switch the models used by Codex, Claude Code, Gemini CLI, and other agents from one interface.

How is it different from OpenRouter and LiteLLM?

OpenRouter is a cloud aggregation service (traffic and keys pass through its servers), and LiteLLM leans toward server-side SDK/proxy deployment; magpie is a desktop program running on your machine, with the gateway listening only on loopback and keys stored locally. It additionally offers surgical rewriting of agent config files, reuse of logged-in subscriptions, and a menu bar GUI—oriented toward local developers rather than server deployment.

Which protocols and vendors are supported?

On the protocol side it supports bidirectional translation between OpenAI Chat/Responses, Anthropic Messages, and Google Gemini (including streaming, tool calls, and reasoning), exposing standard paths like /v1/chat/completions, /v1/responses, /v1/messages, and /v1beta/models/{model}:generateContent. On the vendor side it ships about 20 presets covering Anthropic, OpenAI, Gemini, DeepSeek, Kimi, GLM, MiniMax, Qwen, Mistral, Groq, xAI, OpenRouter, SiliconFlow, Ollama, LM Studio, and more.

Is it really completely free?

Yes. magpie itself is completely free and MIT open source, with no paid tiers, no account system, and no official hosted cloud version; /pricing, /plans, and similar paths are genuine 404s. Your only cost is what the model vendors charge—bring your own API key or reuse a subscription you already pay for.

Will my API keys be uploaded?

Per the README, the gateway listens only on loopback (127.0.0.1:3425), keys are stored locally with 0600 permissions, it does not read shell environment variables, and no telemetry upload is mentioned. However, it does read other agents' credential files to enable subscription reuse—that is its design—so evaluate for yourself whether you accept that behavior.

Is reusing Claude / ChatGPT subscriptions safe?

There are clear risks. magpie reuses your subscription logins across agents and "warms up" accounts per reset windows; the README itself warns to "use an account you can afford to lose," meaning it may violate vendor terms of service and lead to account bans. The official site also has no terms of service or privacy policy to fall back on.

Which systems are supported and how do I install it?

macOS, Windows, and Linux are supported. Three install options: download from the official site, run curl -fsSL https://usemagpie.ai/install.sh | sh, or go install github.com/yetone/magpie@latest. macOS builds are signed and notarized; Windows/Linux builds are unsigned and may trigger SmartScreen warnings.

Why is the version number still so low?

The project is very early: the GitHub repo was created on 2026-09-23, only 5 days before research time, versions are 0.1.x, and it went from v0.1.218 to v0.1.223 within a single day; it is currently maintained mainly by the solo author yetone (401 commits, other contributors with 1-8 each). Fine for individuals to try; teams should pin versions and assess compliance risk first.