MCP Switchboard
<p align="center">
<img src="assets/logo.svg" alt="MCP Switchboard Logo" width="96" height="96" />
</p>
<h1 align="center">MCP Switchboard</h1>
<p align="center">
<strong>Stop hand-editing JSON & TOML files every time your MCP toolbelt bloats your context window.</strong><br/>
One-click MCP server profiles, context-token budgeting, dry-run config diffs, automatic rollback backups, and cross-agent sync for <strong>Antigravity</strong>, <strong>Claude Code</strong>, <strong>Cursor</strong>, and <strong>Codex</strong>.
</p>
<p align="center">
<a href="https://github.com/oguzhan-yildirim/mcp-switchboard/actions"><img src="https://img.shields.io/badge/CI-passing-22c55e?style=flat-square" alt="CI Status" /></a>
<a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-6366f1?style=flat-square" alt="MIT License" /></a>
<img src="https://img.shields.io/badge/MCP_App-SEP--1865-f59e0b?style=flat-square" alt="MCP App" />
<img src="https://img.shields.io/badge/Node-%3E%3D20-34d399?style=flat-square" alt="Node 20+" />
</p>
---
## Why MCP Switchboard?
Every MCP server you leave enabled injects its tool schemas into every single LLM turn. Keep 12 servers turned on across GitHub, Playwright, Supabase, Figma, Stripe, Docker, and Slack, and you burn **25,000+ context tokens** before you even type a prompt — while juggling four incompatible config formats across your editors.
Disabling a server manually usually means deleting JSON blocks and hoping you remember the exact `command`, `args`, and `env` keys next week.
**MCP Switchboard** gives your AI coding stack a tactile, non-destructive control panel:
- **Unified Multi-Agent Discovery & Local Library (`0600`)** — Automatically discovers existing MCP server definitions across:
- **Antigravity**: `~/.gemini/config/mcp_config.json` *(never touches `~/.gemini/config/config.json`)*
- **Claude Code**: `~/.claude.json` *(preserves all non-MCP keys safely)*
- **Cursor**: `~/.cursor/mcp.json`
- **Codex**: `~/.codex/config.toml` *(clean `[mcp_servers.<name>]` TOML section sync)*
- Every discovered server is stored in Switchboard's local `library.json` (`0600`), so toggling a server **OFF** never loses its configuration.
- **Smart Profiles & Context Budgeting** — Ships with auto-tagged starter templates (**Minimal / Fast**, **Frontend Web**, **Backend & Data**, **Full Stack**) plus unlimited custom profiles with estimated context-token overhead per server and profile.
- **Dry-Run Diff Preview Before Every Write** — Computes an exact per-agent diff (`+ added`, `- disabled`, `~ updated`, `= unchanged`) and net context-token delta before modifying a single byte on disk.
- **Atomic Apply & One-Click Rollback** — Creates a timestamped snapshot of every modified agent config inside `${PLUGIN_DATA}/backups/` before writing atomically, with one-click Restore (which itself takes a pre-rollback safety snapshot).
- **Zero Secret Leakage** — Automatically masks sensitive env vars and headers in UI badges, diffs, and LLM tool outputs (`API_KEY=••••1234`), while preserving real values locally on disk during apply and sync.
- **Interactive Hardware-Inspired MCP App UI** — Opens inside Antigravity as an inline card, side pane (`+` menu), or full-page sidebar console with automatic host light/dark theming.
---
## Architecture
```mermaid
flowchart LR
Host["Antigravity / Claude / Cursor / Codex"] <-->|MCP stdio| Server["MCP Switchboard Server"]
Host <-->|ui://mcp-switchboard/app.html| UI["Tactile React MCP App"]
UI <-->|app.callServerTool| Server
Server --> Inventory["Multi-Agent Inventory & Secret Masker"]
Server --> Profiles["Profiles, Diff Preview & Atomic Sync Engine"]
Inventory <--> Library["Local Server Library\n(library.json, mode 0600)"]
Profiles --> Backups["Timestamped Rollback Snapshots\n(backups/)"]
Profiles <--> AGY["~/.gemini/config/mcp_config.json"]
Profiles <--> CLAUDE["~/.claude.json (safe merge)"]
Profiles <--> CURSOR["~/.cursor/mcp.json"]
Profiles <--> CODEX["~/.codex/config.toml (TOML sync)"]
```
---
## Quick Start
### 1. Google Antigravity Plugin (Full Interactive MCP App UI)
```bash
git clone https://github.com/oguzhan-yildirim/mcp-switchboard.git
cd mcp-switchboard
npm install
npm run build
npm run install:antigravity
```
Antigravity discovers the plugin automatically — no restart required:
- Open **MCP Switchboard** from the left **Sidebar** or side pane **`+`** menu.
- Or ask in chat: *"Open MCP Switchboard and preview switching to Minimal / Fast."*
### 2. Claude Code / Cursor / Codex (Universal MCP Server)
Add `mcp-switchboard` to your MCP config:
**Claude Code (`~/.claude.json`) / Cursor (`~/.cursor/mcp.json`):**
```json
{
"mcpServers": {
"mcp-switchboard": {
"command": "npx",
"args": ["-y", "github:oguzhan-yildirim/mcp-switchboard"]
}
}
}
```
**Codex (`~/.codex/config.toml`):**
```toml
[mcp_servers.mcp-switchboard]
command = "npx"
args = ["-y", "github:oguzhan-yildirim/mcp-switchboard"]
```
Or point directly to your local build:
```json
{
"mcpServers": {
"mcp-switchboard": {
"command": "node",
"args": ["/absolute/path/to/mcp-switchboard/dist/server.js"]
}
}
}
```
### 3. Standalone CLI
```bash
# Inspect live inventory across Antigravity, Claude Code, Cursor, and Codex
node dist/server.js status
# List all profiles and estimated token weights
node dist/server.js profiles
# Dry-run diff preview before changing anything on disk
node dist/server.js preview minimal-fast --targets=antigravity,claude
# Atomically apply a profile (automatically creates a rollback backup first)
node dist/server.js apply frontend-web --targets=antigravity,cursor,codex
# List timestamped rollback snapshots (or restore one)
node dist/server.js backups
node dist/server.js backups restore <backup-id>
```
---
## MCP Tools Reference
| Tool | Description |
| :--- | :--- |
| `open_mcp_switchboard` | Launches the interactive Switchboard MCP App UI (inline, side pane, or full-page sidebar). |
| `list_mcp_profiles` | Lists profiles, discovered library servers (secrets masked), active servers per agent, and token estimates. |
| `preview_profile_switch` | Runs a dry-run diff preview (`+ added`, `- disabled`, `~ updated`, `= unchanged`) and estimates token-overhead delta. |
| `apply_mcp_profile` | Atomically applies a profile or custom server list to selected agents with automatic timestamped rollback backup. |
| `sync_mcp_across_agents` | Mirrors a source agent, syncs the union, or applies an explicit server set across Antigravity, Claude Code, Cursor, and Codex. |
---
## Safety & Privacy Guarantees
- **Strict Antigravity Boundary**: Only reads and writes `~/.gemini/config/mcp_config.json`. Hard-guarded against ever touching `~/.gemini/config/config.json`.
- **Non-Destructive Merges**:
- Preserves all non-`mcpServers` fields in `~/.claude.json` (`projects`, `oauthAccount`, preferences, etc.).
- Preserves all non-`[mcp_servers.*]` sections, top-level settings, and comments in `~/.codex/config.toml`.
- **Masked Secrets**: Sensitive env vars (`*_KEY`, `*_TOKEN`, `*_SECRET`, `*_PASSWORD`, JWTs, Bearer headers, `sk-*`, `ghp_*`, etc.) are masked as `••••1234` in every UI response, diff, and LLM tool output, while remaining intact locally inside `library.json` (`0600`).
- **Atomic Writes + Automatic Backups**: Every file write uses temp-file + atomic rename after saving a verbatim pre-change backup snapshot.
---
## Development
```bash
npm install
npm run typecheck
npm run build
npm test
```
For fast UI iteration inside Antigravity without rebuilding the server, point `MCP_SWITCHBOARD_APP_HTML` to your built HTML file and reopen the view.
---
## Agent Toolkit Suite
Explore the companion open-source MCP Apps & plugins for AI coding agents:
- [**find-my-skill**](https://github.com/oguzhan-yildirim/find-my-skill) — Discover, security-audit, preview, and one-click install `SKILL.md` agent skills from GitHub.
- [**mcp-xray**](https://github.com/oguzhan-yildirim/mcp-xray) — Inspect live MCP servers, audit tool schemas, measure context-token cost, and benchmark latency.
- [**agent-blackbox**](https://github.com/oguzhan-yildirim/agent-blackbox) — Flight recorder and replay debugger for AI agent tool calls, prompts, and file mutations.
- [**skill-doctor**](https://github.com/oguzhan-yildirim/skill-doctor) — Lint, benchmark, security-check, and optimize `SKILL.md` files across Antigravity, Claude, Cursor, and Codex.
- [**mcp-switchboard**](https://github.com/oguzhan-yildirim/mcp-switchboard) *(this repo)* — One-click MCP server profiles, dry-run diffs, rollback backups, and cross-agent sync.
---
## License
MIT © 2026 [Oğuzhan Yıldırım](https://github.com/oguzhan-yildirim)
TDQS
Scored across 13 tools
The set ships two parallel surfaces (user-facing and app_*), producing duplicated purposes: list_mcp_profiles vs app_refresh_inventory/app_get_state, preview_profile_switch vs app_preview_apply, and apply_mcp_profile vs app_apply_profile vs sync_mcp_across_agents. An agent cannot reliably tell which variant of 'scan configs', 'preview diff', or 'apply profile' to pick.
All names are snake_case and readable, but ordering is inconsistent: preview_profile_switch is noun_verb while apply_mcp_profile and sync_mcp_across_agents are verb-first. The app_ prefix split is systematic but adds a second naming scheme alongside the plain tools.
13 tools is a reasonable size for a config-management server, and most map to real operations (list, preview, apply, sync, backup, profile CRUD). The count is slightly inflated by the parallel app_* duplicates rather than by genuinely distinct capabilities.
The lifecycle is largely covered: inventory, profile create/edit/delete, dry-run preview, atomic apply, cross-agent sync, and rollback backups. Minor gaps: no server-removal/delete-from-library tool (only app_add_server) and no explicit toggle tool despite 'toggling servers' being a headline capability.