GlobalCanadaEuropeAsia-Pacific
Sign in

Back to Open Source

mcp-patchbay

One MCP server that hosts all your others as child processes, and lets the agent switch them on and off in the middle of a session, with a person approving the risky ones. Every connected MCP server costs context and a running process, whether or not the session needs it. With the patchbay, you configure all your servers once, and only the ones a task needs are running and visible.

Quick start

  1. registerclaude mcp add --scope user patchbay -- npx -y mcp-patchbayAdds it to Claude Code as patchbay. Its first run creates an empty, private config file.
  2. importnpx -y mcp-patchbay import --from ~/.claude.json --out ~/.config/mcp-patchbay/servers.jsonReplaces that file with your user-level Claude Code servers, after backing up the old one; merge back by hand anything you added there.
  3. checknpx -y mcp-patchbay doctor --allValidates the file and briefly starts each server, the confirm ones included. Once each one starts, remove them from Claude Code, or they run twice, and reconnect the patchbay: it reads its config once, at startup.

The README's opening commands, without the version they pin. Its Quick start writes the config by hand instead, and covers Claude Desktop. Run each step in your own terminal, not through an agent.

What it does with your servers

Only the servers a task needs

The agent sees five small tools: servers, enable, disable, restart and info. When it enables a server, the patchbay starts it and the server's tools appear straight away; when it disables one, they disappear the same way. The patchbay tells the client each time, so the client refreshes its tool list.

A person approves the risky ones

Each server is marked allow, which the agent may switch on; confirm, which needs a person's yes for each enable; or deny, which can never be switched on. The yes comes from a form in the client or, in the config import writes, from the client's own permission prompt, which is only as strong as your rules: never pre-approve enable_confirm or the patchbay as a whole. A client that cannot ask cannot switch on a confirm server: the patchbay fails closed. Once a server is on, allow its tools one by one.

The config is trusted, the agent is not

The agent can only pick a name from your config file: it cannot add a server or change a command, and no tool runs anything else. On macOS and Linux, the patchbay refuses a config file that others can write to. One server's environment never reaches another, a crash marks only that server failed, and errors and logs are redacted. It collects no data and sends nothing to Distronode or anyone else.

Licence
Apache-2.0
Built with
JavaScript, on Node.js
Needs
Node.js 22 or later, and an MCP client that refreshes its tool list when told to and can ask the person a question (elicitation)
Install
npm, a Claude Code plugin, or a Claude Desktop extension bundle attached to each release
From Claude Code
Its import command copies your Claude Code servers into its config, and never changes Claude Code's own
Limits
Tools only: the resources and prompts of hosted servers do not pass through
Status
Released on npm with a provenance attestation, which npm audit signatures checks

mcp-patchbay on npm

Releases on GitHub

mcp-patchbay on GitHub

Get involved

Issues and pull requests are welcome on GitHub. Report a vulnerability privately, as the security policy describes, and not in a public issue.

Contributing guide
CONTRIBUTING.md
Security policy
SECURITY.md
Changelog
CHANGELOG.md