Magpie: A Local Gateway That Lets Claude Code Run Kimi and Codex Run DeepSeek
Multi-agent setups are now common enough that managing per-tool config files, separate keys, and subscription lock-in is a real cost. Magpie centralizes model choice, enables failover across accounts without losing prompt cache, and keeps secrets on the machine, which changes how developers run and fund their AI toolchains.
Magpie runs a local gateway on 127.0.0.1:3425 that speaks OpenAI, Anthropic, and Gemini protocols and converts between them, so an agent locked to one protocol can use a model from any vendor. It also edits each agent's configuration file directly, preserving comments and formatting, so switching Claude Code to DeepSeek or Codex to Kimi is a four-command operation with no environment variable juggling.
Beyond basic model swapping, Magpie adds profiles for one-command switching between full setups, routing groups that combine multiple accounts and providers into a single logical model with automatic failover, and intent routing that uses a tiny classifier model to send cheap questions to cheap models and test-writing to stronger ones. A built-in redaction layer replaces keys and personal data with stable placeholder hashes before requests leave the machine, and usage tracking shows where money goes per agent and model.
The project hit 29,000 GitHub stars in roughly six weeks after its repo was created, a sign that multi-agent model management has become a genuine pain point. The tutorial walks through installation, pitfalls like claude.ai logout, and three ready-to-copy configurations for saving money, pooling subscriptions, or auto-routing by task.
Magpie's 29,000 stars in about six weeks shows that the pain of managing multiple agents and providers is no longer niche; tooling that treats models as interchangeable commodities has clear demand.
Intent routing is deliberately simple: a tiny classifier that returns one number, with no embeddings or training, keeps the feature cheap and predictable, and a timeout or error falls back to normal routing instead of blocking.
The redaction design makes a strong privacy claim: placeholders are stable hashes so caches and thinking signatures survive, and the system fails closed rather than risking a plaintext leak.
Cheap routing that accounts for time-of-day pricing, like DeepSeek doubling during peak hours, signals that cost optimization in AI tooling is moving from static choices to real-time arbitrage.
The official warning about Antigravity account bans is a reminder that using subscriptions across agents often sits in a gray zone of vendor terms; the tool being open source doesn't change that risk.