AM

asashiki/mcp-switch

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

23 stars 1 forks 品質 79 トレンド 18MIT

Self-hosted gateway that aggregates local stdio and remote HTTP MCP servers behind one OAuth endpoint — connect once, reach all your tools from any AI.

概要

Web/app AIs can only connect to MCP servers, and most of them give you just custom connector slot. Meanwhile half the useful MCP servers are (npx/uvx stdio processes) that only Claude Desktop / a CLI can reach. - any number of MCP servers — remote (URL) or local (stdio, hosted on your box) — into one endpoint. - Your AI sees a single connector; behind it are all your tools. - — add servers, group tools, scope which agent sees what, watch an audit log. - — supported browser agents can inspect the gateway, open App Lab diagnostics, and prepare review-only connection drafts in the same signed-in page. - MCP Switch ships no tools of its own; it forwards tools, schemas, results and even MCP-Apps UI widgets transparently. No separate backend, no inter-service HTTP — the gateway talks to upstream servers directly and aggregates them. - Health: curl http://127.0.0.1:4577/health - Console: open http://127.0.0.

README

以下は原文 README の抜粋です。原文を見る。


Why

Web/app AIs can only connect to remote MCP servers, and most of them give you just one custom connector slot. Meanwhile half the useful MCP servers are local (npx/uvx stdio processes) that only Claude Desktop / a CLI can reach.

MCP Switch sits in the middle:

   local stdio MCP  ─┐
                     ┼──►  MCP Switch  ──►  one OAuth URL  ──►  claude.ai / ChatGPT / …
   yet another MCP  ─┘     (your VPS)
  • Aggregate any number of MCP servers — remote (URL) or local (stdio, hosted on your box) — into one endpoint.
  • Connect once. Your AI sees a single connector; behind it are all your tools.
  • Manage from a console — add servers, group tools, scope which agent sees what, watch an audit log.
  • Work with the console through WebMCP — supported browser agents can inspect the gateway, open App Lab diagnostics, and prepare review-only connection drafts in the same signed-in page.
  • Pure relay. MCP Switch ships no tools of its own; it forwards tools, schemas, results and even MCP-Apps UI widgets transparently.

Architecture

A single service (:4577) + a console SPA it serves:

Part Role
MCP gateway Public MCP endpoint (/mcp), OAuth 2.1, management console (/console)
Registry Connects to upstream MCP servers in-process — remote (HTTP) and local (stdio)
Store One SQLite file: agents, OAuth, audit, the skill registry, and the server registry

No separate backend, no inter-service HTTP — the gateway talks to upstream servers directly and aggregates them.

Quick start (Docker)

git clone https://github.com/asashiki/mcp-switch.git
cd mcp-switch
cp .env.example .env
# edit .env → set MCP_PUBLIC_URL to enable OAuth + the console (leave empty for local)

docker compose -f infra/docker/compose.yaml --env-file .env up -d --build

Then:

  • Health: curl http://127.0.0.1:4577/health
  • Console: open http://127.0.0.1:4577/console (set a password first — see below)

Behind a reverse proxy on the same VPS? Set MCP_PUBLIC_URL; keep the host-side port bound to 127.0.0.1.

Set the console password

docker compose -f infra/docker/compose.yaml exec mcp-switch \
  node dist/cli/console-admin.js set admin "your-password"

Quick start (local dev)

pnpm install
cp .env.example .env          # leave MCP_PUBLIC_URL empty for an anonymous local /mcp
pnpm dev                      # gateway :4577 + console :5173
GitHub で README 全文を見る

インストール

npx -y steam-mcp-server
MCP 初心者?mcpskill.org のガイドから始めましょう →

設定

{ "mcpServers": { "context7": { "serverUrl": "https://mcp.context7.com/mcp", "headers": { "CONTEXT7_API_KEY": "..." } }}}