Switchboard

io.github.wkoverfield由 GitHub 账号 wkoverfield 发布v0.2.3更新于 Nov 5, 2026

One firewall and password manager for all your AI coding agents' MCP servers and secrets.

概览

AI 生成的概览

本地 CLI,为 AI 编程代理的 MCP 服务器充当防火墙与密码管理器,限定工具访问范围并把密钥移入系统钥匙串。

可以做什么
  • 扫描仓库,查看代理可访问的 MCP 服务器与令牌,以及绕过管控的路径
  • 把 Claude/Codex 的 MCP 配置导入并合并为一条受管控路由,附备份与回滚命令
  • 把密钥存为具名钥匙串引用,并进行设置、列出、删除与检查
  • 签发、查看与撤销有时限的受限通行证,处理审批并列出可用工具面
  • 以通行证范围的凭据运行允许的提供方命令,并读取本地审计日志或仪表盘
  • 输出仓库权限态势报告,并为 harness 与子代理系统提供带版本的 JSON
适用场景
当仓库中的编程代理已持有明文令牌或直连 MCP 路由,而你希望改用具名钥匙串引用、短时限且限定工具的通行证并保留本地审计记录时适用。也适合需要通行证范围 stdio MCP 端点的 harness。
运行要求
以 npm 包形式本地运行(全局安装或 npx),需要 Node 22 或更高版本。日常使用在 macOS,CI 使用 Linux,Windows 钥匙串后端存在但测试较少。无需账号、托管服务或遥测。
安装前请注意
它不是沙箱:拥有原始 shell 访问、提供方 CLI、浏览器会话或直连 MCP 路由的代理可绕过它。导入产生的备份仍保留旧的明文令牌,迁移后应轮换令牌并妥善保管备份。明文密钥后端需显式设置 SWITCHBOARD_ALLOW_UNSAFE_SECRET_BACKENDS 才启用。导入会改写客户端配置,且软件处于 alpha 阶段,契约虽有版本但可能变化。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Switchboard,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Switchboard

A firewall and password manager for your AI coding agents.

[CI] [npm] [License: MIT]

Switchboard controls what Claude Code and Codex can reach in a repo. It finds the MCP servers and tokens your agents can already touch, gets secrets out of plaintext config and behind named keychain refs, and puts each agent on a scoped pass that expires on its own.

[Switchboard grant: an agent is put on a scoped, expiring pass. It can reach only the named tools, everything else is denied, secrets stay in the keychain, and the pass ends on its own or with switchboard revoke.]

Everything runs locally. No account, no hosted service, no telemetry.

What it does

  • switchboard scan shows which MCP servers and tokens agents can reach in this repo, and which routes bypass Switchboard entirely.
  • switchboard import consolidates scattered Claude/Codex MCP config into one Switchboard route, with timestamped backups and exact rollback commands.
  • Secrets live in your OS keychain as named refs. Config files carry secretRef: "github/ci/token", never the token itself.
  • switchboard grant puts the agent on a pass: named tools reachable, everything else denied, gone in a few hours.
  • switchboard status answers whether a pass is live right now. switchboard revoke ends one early.
  • Every tool call routed through Switchboard lands in a local audit log. switchboard logs reads it.

Install

bash
npm install -g @switchboard-mcp/cli

Or without installing:

bash
npx -y @switchboard-mcp/cli@latest scan

Requires Node 22 or newer. Daily use is on macOS, CI runs on Linux, and a Windows keychain backend exists but gets less exercise.

Quickstart

Start in a repo where your agents already work:

text
$ switchboard scan
This looks like acme-app.
Detected:- Codex Switchboard route missing- Claude Switchboard route missing- Claude direct MCP server "github" detected
Authority bypasses:  high claude:github (github; direct-mcp-server, secret-env-name)
Warnings:- 1 direct MCP bypass finding(s), including 1 high-risk finding(s), were detected.

That high-risk finding is a GitHub token sitting in plaintext in .mcp.json. Move it behind Switchboard:

bash
switchboard import --dry-run          # see the plan firstswitchboard import --write --cleanup-clientswitchboard secrets set <ref>         # store the token; import prints the exact commandswitchboard install claude --write    # route the agent through Switchboard

Import rewrites client config to a single Switchboard route, replaces the plaintext token with a named keychain ref, and leaves a backup plus the exact rollback command. Import never reads secret values itself; the secrets set step is where the token actually enters your keychain. Then scope the agent:

bash
switchboard grant --for 4h

You get the pass above. When you want it gone early:

text
$ switchboard revokeRevoked pass grant-main (main). The agent's scoped access is off now.

switchboard doctor tells you the next thing to fix at any point. If a repo has no MCP config yet, switchboard setup github-ci starts from a safe provider template instead.

What Switchboard does not do

  • It is not a sandbox. Switchboard governs the paths routed through it: Switchboard MCP endpoints and switchboard run. An agent with raw shell access, a provider CLI, a browser session, or a direct MCP route can bypass it. switchboard scan reports those bypass routes so you can clean them up or accept them deliberately.
  • Backups keep your old config exactly as it was. If a token was in plaintext before import, the backup still contains it. Rotate old tokens after migrating, and keep backups private.
  • A pass only binds routed agents. switchboard grant says so itself when no client is wired up yet, and switchboard install <claude|codex> closes the gap.
  • It is alpha software. Local-first workflows, conservative claims, rough edges. The pass and audit contracts are versioned JSON, but expect change.

Commands

CommandWhat it does
switchboard scanShow what agents can reach in this repo, including bypass routes
switchboard importConsolidate Claude/Codex MCP config into one guarded route
switchboard grant / revokeGive the repo's agent an expiring scoped pass, or end it now
switchboard statusIs a pass live right now, and which config is active
switchboard doctorCheck the setup and print the next thing to fix
switchboard setup <preset>Guided setup from a provider safety template (switchboard presets list shows them)
switchboard auth <preset>Store the provider token for a preset in the keychain
switchboard secretsSet, list, remove, and doctor named secret refs
switchboard runRun an allowed provider command with pass-scoped credentials and audit
switchboard install <client>Route Claude Code or Codex through Switchboard (add --scope user for one server across every repo)
switchboard passCreate and inspect task-scoped passes with leases, gates, handoffs
switchboard approvalsReview and decide approval-gated tool calls
switchboard toolsList the tool surface a pass exposes
switchboard logsRead the local audit log
switchboard dashboardLocal read-only dashboard: live passes, denials, audit stream
switchboard auditRepo authority posture report, exportable as JSONL

Commands that report state take --json for scripts and harnesses, with versioned schemas. switchboard <command> --help has the rest.

How it works

Switchboard reads layered YAML config (global, then .switchboard.yaml, then .switchboard.local.yaml). Each profile names an upstream MCP server and the secret refs it needs. At runtime, Switchboard mounts permitted profiles as one MCP endpoint, resolves secret refs from the OS keychain only at launch, and namespaces every tool so a pass can allow github_ci_* and deny everything else. Passes, approvals, and audit entries are plain local files that reference secrets by name, never by value.

Secret storage uses OS keychain backends by default. Plaintext fallbacks exist for dev machines and CI, and require an explicit SWITCHBOARD_ALLOW_UNSAFE_SECRET_BACKENDS=1 opt-in.

For harnesses and subagent systems

switchboard pass create --from github-ci --json returns a workspaceLease.mcpLaunch payload: the exact command to launch a pass-scoped stdio MCP endpoint, plus the pass policy and lease. Switchboard grants and audits authority; your harness owns scheduling, retries, and agent processes. JSON contracts are documented in docs/use-cases/harness-json-contracts.md.

Alternatives

  • Project MCP config alone works, but it is static wiring with tokens in files. Switchboard imports that wiring, moves the tokens, and adds scoped expiring access on top.
  • Docker MCP Gateway and MCP runtimes run and package MCP servers well. Switchboard is the local authority layer above them, deciding which profile, tools, and lease an agent gets for a task. A gateway can be an upstream behind a Switchboard profile.
  • Hosted tool platforms (Composio, Arcade) offer managed OAuth and broad SaaS coverage. Switchboard is local-first for coding-agent repos: local secrets, local audit, no hosted dependency.
  • Just giving the agent a token is fast until the token is broad, live, or copied into the wrong file. That is the failure mode Switchboard exists for.

Development

bash
git clone https://github.com/wkoverfield/switchboard.gitcd switchboardpnpm installpnpm buildpnpm switchboard --helppnpm test

Contributions are welcome; see CONTRIBUTING.md, and report vulnerabilities privately per SECURITY.md.

Smoke tests and fresh-agent evals live in scripts/; CI runs the full set. The top demo is a VHS tape: brew install vhs && pnpm build && vhs examples/switchboard.tape. Deeper docs: quickstart, threat model, provider safety templates, roadmap.

Agents can read these docs over MCP: npx -y @switchboard-mcp/docs-mcp serves list_docs, read_doc, and search_docs, and llms.txt is kept current. The landing and docs site lives in site/ (static build, pnpm --filter @switchboard-mcp/site build).

License

MIT. See LICENSE.

来源:README.md,提交 4893b61

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

2
  1. v0.2.3最新Oct 15, 2026
  2. v0.2.2Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分