← Back to Leaderboard
Myetone

yetone/magpie

#20

A local API gateway that pools model subscriptions across coding agents

Open-Source AI AppQuickstart ↓
Engineering Health (Methodology)
A+ · 98/100
Maintenance Activity
● Updated today
Latest Release
v0.1.5580
Commercial License Check
MIT · Commercial Friendly

Automated SPDX check for reference only — not legal advice. Disclaimer

Maintenance35/35
Fork Adoption23/25
Release Cadence20/20
License Clarity20/20
DockerSelf-HostedCLIAPI1 README badge views (30d)
Total Stars
★ 45,472
24h Growth
+278
7d Growth
+2,923
Forks
4,184

GitHub Star History

Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.

yetone/magpie Star History (2026-09-22 - 2026-12-04) ALL-TIME STAR HISTORY (2026-09 – 2026-12) +45.5k in 73d · avg +623/day 48k 24k 0 2026-09-22: ★ 12026-10-03: ★ 4,3792026-10-10: ★ 8,4712026-10-17: ★ 14,9672026-10-24: ★ 20,5512026-10-31: ★ 26,7252026-11-05: ★ 30,4282026-11-10: ★ 33,8882026-11-15: ★ 37,0232026-11-20: ★ 39,4362026-11-25: ★ 41,6122026-11-30: ★ 43,9442026-12-04: ★ 45,472 ★ 45.5k 09-22 10-28 12-04

Evidence-Backed Technical Brief

AI Deep Review

Architecture & 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).

Protocol bridge: One local endpoint handles OpenAI Chat, OpenAI Responses, Anthropic Messages, and Gemini, including streaming and tool calls.
Quota routing: Five routing modes, nested groups, and account affinity balance failover against prompt-cache reuse.
Agent configuration: Atomic edits preserve comments, order, and formatting, while named profiles restore settings across agents.
MCP library: Distributes instructions, MCP servers, skills, and subagents in each agent's format and removes only the entries it wrote.
Local masking: Optional rules and CPU-based detection redact outgoing values, restore placeholders in streamed replies and tool arguments, and return 503 if enabled masking cannot run.
Observability and sharing: OTLP export, account- and key-level billing views, and named LAN keys with token and cost limits.
Best For

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.

Skip If

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.

Reviewed on 2026-12-03 · Grounded in GitHub README, root file tree & releases · Newer release v0.1.5580 (2026-12-04) shipped after this reviewMethodology

Quick Start & Installation

DockerSelf-HostedCLIAPI
curl -fsSL https://usemagpie.ai/install.sh | sh

Comparison vs. Top Coding, Skills & MCP Alternatives

Full comparison →
RepositoryStars7d TrendStackLicenseCore Positioning
magpie ★45.5k+2.9kGoMITA local API gateway that pools model subscriptions across coding agents
cc-switch159.1k+1.7kRustMITTauri desktop manager for AI coding providers, local routing, and MCP config
herdr54.1k+871RustApache-2.0Rust terminal multiplexer for persistent, multi-machine coding-agent workspaces
claude-code-router38.5k+101TypeScriptMITLocal 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.

Raw .md ↗
curl -sL https://repoforai.com/repo/yetone/magpie.md

Embed Star History Chart & Badges in README.md

Full-history Star History SVGs and velocity cards on GitHub Camo: drop-in replacement for OSSInsight and Star History widgets.

yetone/magpie Star History on RepoForAI

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?

Point a client that supports a configurable base URL at the gateway and use the endpoint for its native protocol: OpenAI Chat or Responses, Anthropic Messages, or Gemini. For supported agents installed on the machine, Magpie can update the agent's configuration directly. Start a new session after changing its model.

Do I need a GPU, and what drives resource usage?

A GPU is not a prerequisite for routing requests to hosted models. Size the gateway for concurrent streams and any subprocesses it launches, such as MCP servers or provider tools. The optional local masking model runs on the CPU and requires a 1.6 GB download; that figure is not a RAM estimate. If you use a local inference backend, size its memory and compute separately.

Can a company self-host Magpie and share its subscriptions?

Magpie's MIT license permits commercial use and self-hosting, subject to its license terms. It does not grant rights to reuse or share an upstream subscription. Before sharing a gateway, check the applicable provider terms and data-handling requirements, assess installed plugins and MCP servers, and set per-client limits. Self-hosting the gateway does not make upstream inference local.

When is Magpie a better fit than a native client or an API-only gateway?

Use the vendor's native client if one plan is enough and first-party behavior matters most. An API-only gateway may be enough for applications that already manage their own provider keys and client configuration. Magpie is the stronger fit when you also need to configure installed agents and route across multiple eligible subscriptions or accounts.

Upstream README & Documentation

This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.

Maintaining yetone/magpie? Pin to Homepage + competitor /alternatives pages with a custom Cloud/Demo CTA.Feature yetone/magpie on Homepage & Alternatives ($19)
WEEKLY BREAKOUT DIGEST

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

Saved in your browser · Export Markdown RFC tables or jump into /vs compare