Docs · MCP router
MCP router
The MCP servers you add in magpie’s Library are normally written into each agent’s own config, one entry per server. With the MCP router on, each agent is given a single server named magpie instead, and magpie passes each call on to the Library server behind it. It is off by default.
- Set up once. A server written once in the Library reaches every agent and app through one entry.
- Run once. A command server (one started as a program, such as
npx …) runs once in magpie, not once in each agent. A server with no calls for 10 minutes is stopped and starts again on the next call. - One address for other apps. Cursor, VS Code, Windsurf or an app on another computer can connect to magpie and use every Library server.
Tools appear in the agent as server__tool. Only tools are served (no resources or prompts), and a tool you turned off in the Library is neither listed nor run.
Turn it on
- Open the pageGo to Library → MCP.
- Switch it onBelow the server list, turn on MCP router. Each agent that has Library servers ticked and can reach a server over HTTP (Streamable HTTP) gets one
magpieentry at/mcp/magpie/hub/<agent>on magpie’s gateway, and those servers’ own entries are taken out of its config. - Restart your agentsAn agent reads the change when it starts again.
Turning it off writes each server’s own entry back, removes only the magpie entry magpie wrote, and stops every server the router started. From the command line:
magpie library mcp router on magpie library mcp router off
magpie library lists which agents are given the router and which keep their own entries, with why.
Other apps
With the router on, the Other apps row shows an address ending in /mcp/magpie/hub, which serves every server in the Library. Connect… opens a sheet with a ready entry to copy for Cursor, VS Code, Windsurf or any app that takes a JSON MCP config; in the app window, Cursor and VS Code also have Add, which opens the app to confirm. An app on another computer needs a gateway key, as every request from your network does (see Remote magpie).
Agents that keep their own entries
These agents keep each server’s own entry, and the Library page says which and why:
- No remote servers. The agent can’t reach an MCP server over HTTP, such as Claude Desktop.
- A server named magpie. One of your Library servers is itself called
magpie, so the names would clash. - Its own magpie entry. The agent already has an entry called
magpiethat magpie didn’t write; it is left as it is.
When to use it
- Turn it on when you use several agents with the same servers, when command servers start many copies of themselves, or when you want editors and other computers to use your Library.
- Leave it off if you use one agent, if you want each agent to talk to its servers directly, or if you’d rather nothing else on your network can reach your command servers. Every call goes through magpie, so magpie needs to be running.