dsh-plugin-mcp-switch

On-demand MCP with per-session isolation: every MCP starts disconnected so tool schemas cost no context; the agent opens one with mcp_switch_on inside a chat and only that chat (plus its child agents) can see the tools, so other in-progress conversations are unaffected. Closing is symmetric - one chat turning an MCP off does not drop another chat connection; the last owner closing it disconnects for real. Ownership persists across restarts, expensive servers (>100k tokens) require confirmation, and a Settings panel shows connection state, context cost, per-server session visibility, isolation/bridge health, startup policy and group presets. Includes 24 automated tests. Its HTTP routes have no DSH access check, so a web page open in your browser could call them.

Overview

On-demand MCP with per-session isolation: every MCP starts disconnected so tool schemas cost no context; the agent opens one with mcp_switch_on inside a chat and only that chat (plus its child agents) can see the tools, so other in-progress conversations are unaffected. Closing is symmetric - one chat turning an MCP off does not drop another chat connection; the last owner closing it disconnects for real. Ownership persists across restarts, expensive servers (>100k tokens) require confirmation, and a Settings panel shows connection state, context cost, per-server session visibility, isolation/bridge health, startup policy and group presets. Includes 24 automated tests. Its HTTP routes have no DSH access check, so a web page open in your browser could call them.

Installation

Install from npm

dsh plugin --profile web add dsh-plugin-mcp-switch

Resolves a published tarball rather than cloning the repository, and installs without any extra setup. Swap `web` for your profile name if you run another one.

Install from GitHub

dsh plugin --profile web add github:yoyococo1234/dsh-plugin-mcp-switch

Installing from GitHub runs the project's build script, which pnpm blocks until you allowlist it — run the command once and pnpm prints the exact key to add under `allowBuilds` in ~/.dsh/profiles/web/pnpm-workspace.yaml.

Version compatibility

Compatibility is unconfirmed. Check the project documentation for supported versions.