# magpie

> A local gateway and desktop app that lets any coding agent use any model or provider, with routing and failover.

magpie is an open-source app by yetone that gives coding agents such as Claude Code, Codex and Gemini CLI a single place to choose models and providers. It runs a local gateway on 127.0.0.1:3425 and edits each agent's own config so that the chosen model is used in the next session. The latest release listed is v0.1.1201, and it is MIT-licensed.

## What It Is

magpie is a model and provider manager for AI coding agents. Each agent normally keeps its model in its own file and format, with its own keys and base URLs. magpie centralizes this: add a provider once (an API key, a local model, or a subscription you are signed in to) and pick it for any supported agent from one list.

It is available as a menu bar app, window, TUI, web UI and CLI on macOS, Windows and Linux, and also runs in Docker and on Termux.

## How the Gateway Works

Codex speaks OpenAI Responses, while Claude Code speaks Anthropic Messages. The local gateway speaks OpenAI Chat, OpenAI Responses, Anthropic Messages and Gemini and translates between them, including streaming, tool calls and reasoning. This lets, for example, Claude Code run on Kimi or Codex on DeepSeek. Any client with a base-URL setting can also use the gateway through environment variables such as OPENAI_BASE_URL or ANTHROPIC_BASE_URL.

## Providers and Subscriptions

Providers are added from presets (including DeepSeek, Kimi, GLM, Qwen, MiniMax, OpenRouter, Mistral, Groq, xAI, Ollama and LM Studio) or any OpenAI- or Anthropic-compatible URL. Model lists come from the vendor. Agents you are signed in to, such as Claude, ChatGPT, GitHub Copilot, Gemini and Grok, can be offered as providers to other agents. magpie also supports importing providers from CC Switch, Claude Code, Codex and Alma.

## Routing, Profiles and Usage

- Routing groups combine several models or accounts as one, with modes smart, order, rotate, usage and pace, and fail over when a quota or credit runs out.
- Intent routing has a small model classify each new turn so it goes to the model suited to it.
- Profiles save every agent's setup under one name and switch them together.
- The Usage view reports tokens, cache hits, cost and quota per agent and model.
- Plugins and gateway middleware, running on Bun, extend sign-in flows and can rewrite requests or responses.
- Sharing options include local-network gateway keys with limits, remote magpie, Docker, and sync over WebDAV or S3.

## Setup Path

Install from the website, with `curl -fsSL https://usemagpie.ai/install.sh | sh`, with go install, or with Docker. Then add a provider and pick a model for each agent. The same steps are available through commands such as `magpie provider add` and `magpie claude <provider/model>`.

## Features
- Pick any model for any supported agent from one list
- Local gateway translating OpenAI Chat, Responses, Anthropic Messages and Gemini APIs
- Subscription sharing across agents (Claude, ChatGPT, Copilot, Gemini, Grok)
- Routing groups with smart, order, rotate, usage and pace modes
- Automatic failover across keys and accounts
- Intent routing by a small classifier model
- Profiles to switch all agents at once
- Surgical, atomic config edits that preserve comments and formatting
- Usage, token and cost tracking with quota views
- Plugins and gateway middleware
- Menu bar app, TUI, web UI and CLI
- Local network sharing with per-client keys and limits
- Docker and remote magpie support
- Backup and sync via file, WebDAV or S3

## Integrations
Claude Code, Codex, Gemini CLI, OpenCode, Goose, Cursor CLI, Copilot CLI, VS Code, DeepSeek, Kimi, GLM, Qwen, MiniMax, OpenRouter, Ollama, LM Studio, Anthropic, OpenAI, Google Gemini, GitHub Copilot, Mistral, Groq, xAI, models.dev

## Platforms
WINDOWS, MACOS, LINUX, ANDROID, WEB, API, VSC_EXTENSION, JETBRAINS_PLUGIN, CLI

## Pricing
Open Source

## Version
0.1.1201

## Links
- Website: https://usemagpie.ai
- Documentation: https://usemagpie.ai/docs/start
- Repository: https://github.com/yetone/magpie
- EveryDev.ai: https://www.everydev.ai/tools/magpie
