yetone/magpie
#20A local API gateway that pools model subscriptions across coding agents
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
Magpie is a Go end-user app that combines agent configuration management with a local inference gateway at 127.0.0.1:3425. It detects installed agents and writes model selections into their native configuration files. At runtime the gateway routes requests to the selected provider or group and translates among OpenAI Chat, OpenAI Responses, Anthropic Messages, and Gemini, including streaming, tool calls, and reasoning. The root entrypoint is main.go; go.mod specifies Go 1.26.8 and includes Bubble Tea for the terminal interface and Wails v3 beta for the desktop stack.
Provider paths differ: the Claude subscription integration drives the local claude executable and bridges the calling agent's tools over MCP. Bun-backed plugins can handle provider sign-in, list models, and make requests. JavaScript gateway middleware can inspect or rewrite requests, observe streamed events, and handle complete responses. A hook that errors or times out leaves the request unchanged, so middleware should not be the sole enforcement point for a policy that must fail closed.
Key Capabilities & Differentiators
The provider pool combines signed-in subscriptions such as Claude, ChatGPT, Copilot, and Gemini Code Assist with key-based plans such as GLM and Kimi Code, pay-as-you-go API keys, and local models. Routing groups can be nested and support smart, order, rotate, usage, and pace policies. Smart prioritizes available quota that resets soonest; pace favors the account with the most weekly quota remaining per hour until reset. Conversation affinity preserves useful prompt-cache reuse, and optional intent routing uses a separate model to classify new turns.
Named profiles restore per-agent model selections and shortlists. The library writes shared instructions, MCP servers, skills, and subagents into each client's format and removes only what it wrote. Search, page fetching, and image generation can be exposed over MCP. Usage views report tokens, cache activity, estimated costs, and quota windows; billing can be broken down by account and upstream key, with OTLP export for external observability.
Trade-offs & Limitations
Compared with direct use of a vendor's agent, Magpie adds a gateway and may change the agent's local configuration, but makes it possible to switch providers without manually managing each client's settings. Compared with an API-only gateway, its differentiators are installed-agent configuration, subscription adapters, and quota-aware routing. Protocol translation does not guarantee feature parity across every client and model. Failover also needs a usable destination: with one account and no routing group, the upstream error reaches the agent.
Masking is off by default. When enabled, it replaces detected values before forwarding, restores them in streamed output and tool-call arguments, and returns 503 if masking cannot run. Rules can miss or misidentify values, and a masked model cannot reason about the original value. The gateway is a trust boundary: review middleware and MCP packages, and control who can use shared keys. The MIT license covers Magpie itself, not whether an upstream plan permits cross-client use or sharing.
Hardware & Deployment Guide
Magpie runs on macOS, Windows, and Linux, and supports Termux and Docker. Source builds target Go 1.26.8. On Linux the installer can select a desktop build using WebKitGTK 4.1 or a terminal build; --gui and --tui override that choice. For a server or NAS, ghcr.io/yetone/magpie offers web administration. The Dockerfile builds without CGO using nogui and grpcnotrace, creates /config/home, /config/cache, /config/data, and /config/state, and sources Node/npm and uv tooling for MCP subprocesses.
Gateway-only use with hosted models has no GPU prerequisite; size for concurrent streams and whichever plugins and MCP tools you run. Bun is downloaded on first use by plugins that need it, and uvx can fetch Python on first use, so restricted hosts should plan for those downloads. Recent releases added selection of agents from other synced computers in the Library (v0.1.5448) and improved Linux and Windows path handling for skill and MCP backups (v0.1.5446).
Developers or small teams using several coding agents and eligible provider accounts who want coordinated model settings, quota-aware fallback, and a shared MCP library.
One vendor's native client and plan already meet your needs, or you cannot approve a gateway that handles prompts and credentials and updates local agent configuration.
Quick Start & Installation
curl -fsSL https://usemagpie.ai/install.sh | sh
Comparison vs. Top Coding, Skills & MCP Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| magpie ★ | 45.5k | +2.9k | Go | MIT | A local API gateway that pools model subscriptions across coding agents |
| cc-switch | 159.1k | +1.7k | Rust | MIT | Tauri desktop manager for AI coding providers, local routing, and MCP config |
| herdr | 54.1k | +871 | Rust | Apache-2.0 | Rust terminal multiplexer for persistent, multi-machine coding-agent workspaces |
| claude-code-router | 38.5k | +101 | TypeScript | MIT | Local model gateway for routing coding agents across providers |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/yetone/magpie.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about magpie
How do I connect a coding agent to Magpie?
Do I need a GPU, and what drives resource usage?
Can a company self-host Magpie and share its subscriptions?
When is Magpie a better fit than a native client or an API-only gateway?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy