Switchboard
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Start, monitor and steer Claude Code and Codex sessions on your Mac from your phone, through the Claude app, using the Model Context Protocol.
Voice mode · Quick start · Tools · Configuration · Security
"Start a Claude session in my app and have it fix the failing tests." "What are my sessions doing?" "What does it want to approve? … OK, approve it." "Tell me when it's done."
Switchboard is a small MCP server that runs on your Mac. It launches agents in Ghostty windows, keeps track of what each one is doing, and lets any MCP client — including the Claude mobile app in voice mode — read their output, answer their questions and give them new work.
✨ Features
Start agents anywhere you're allowed: Claude Code or Codex, in a project you name out loud ("my app", "feature x"), with an optional first prompt.
Live status for every session:
working,needs_approval,waiting_input, orexited, from agent hooks combined with screen detection.Safe approvals: reads the actual on-screen menu and moves to the option you asked for. No blind key presses that could pick "No, exit".
"Tell me when it's done": waits for a turn to finish, an approval request, or an exit, then summarises it.
Sessions outlive windows: every agent runs in its own tmux session; Ghostty just displays it. Close the window and it keeps working.
Private by default: binds to
127.0.0.1, reachable from outside only through your Cloudflare Tunnel, behind OAuth with a passphrase-gated consent page.
Related MCP server: claude-tools-gateway
🧭 How it works
flowchart LR
A["Claude app<br/>(voice or text)"] -->|HTTPS| B["claude.ai<br/>MCP connector"]
B -->|OAuth bearer| C["Cloudflare Tunnel"]
C --> D["Switchboard<br/>127.0.0.1:8787"]
D -->|send-keys / capture-pane| E["tmux session<br/>sb-<id>"]
D -->|AppleScript| F["Ghostty window"]
F -. attached to .- E
E --> G["claude / codex"]
G -->|hooks / notify| H["~/.switchboard/events"]
H --> DPiece | Role |
tmux | Source of truth. Typing into and reading from sessions works with or without a window. |
Ghostty (AppleScript) | Opens, focuses and closes the window attached to each session. |
Claude hooks / Codex | Report prompts, tool use, notifications and finished turns, plus the agent's latest reply. |
Screen detection | Recognises approval dialogs, trust prompts, and "working" vs idle states; tested against real captures. |
🎙 Voice mode
Switchboard is built to be used hands-free from the Claude app's voice mode. Claude does the listening and talking; Switchboard gives it the tools to act on your Mac. Tool replies are kept short so they read well aloud.
Set it up once
Complete the remote setup below, so Switchboard is connected to your claude.ai account as a custom connector.
In the Claude app on iOS or Android, start a new chat and turn on switchboard in the tools menu.
Tap the voice button and talk.
When Claude first uses a tool it may ask permission. Choose Always allow for the read-only tools
(list_sessions, get_summary, read_output, wait_for_change) so conversations flow without interruptions.
Keeping the approval for respond and kill_session is a good idea.
Things to say
You say | What happens |
"What projects can you see?" |
|
"Start a Codex session in my app and ask it to add input validation." |
|
"Call it validation." | Sessions can have a spoken label, so you can say "How's validation doing?" later |
"What are my sessions doing?" |
|
"What does it want?" |
|
"Approve it." / "Approve and don't ask again." / "Deny it." |
|
"Tell it to also update the tests." |
|
"Tell me when it's done." |
|
"Stop it." |
|
"What did it change?" |
|
"Close the window but keep it running." |
|
Tips for voice
Use labels. "The validation session" is much easier to say than
a3f9.Say "tell me when it's done" again if a task runs long. Each wait lasts up to about a minute, and Claude can keep checking.
Keep your Mac awake while you're away (System Settings → Energy → Prevent automatic sleeping). Switchboard runs on your Mac, so a sleeping Mac can't answer.
Approvals are read back before acting. The server tells Claude to describe what an agent wants and to wait for your go-ahead before calling
respond.
🚀 Quick start
Requirements
macOS with Ghostty 1.3+ (for its AppleScript support)
tmux (
brew install tmux) and Node.js 20+claude(Claude Code) and/orcodexon yourPATHFor remote use: a domain on Cloudflare (the free plan is fine) and
cloudflared
Install
git clone https://github.com/David-Feldt/switchboard.git
cd switchboard
npm install && npm run build
cp .env.example .env # then edit it (see Configuration)Local: Claude Code on the same Mac
No tunnel or sign-in needed:
claude mcp add switchboard -- node "$PWD/dist/server.js" --stdioRemote: Claude app / claude.ai
Create a tunnel on your domain: see
scripts/setup-tunnel.md.Set
SB_PUBLIC_URLand a longSB_PASSPHRASEin.env.Install the background services (they start at login and restart on failure):
scripts/install-launchd.sh <tunnel-name>Add the connector: claude.ai → Settings → Connectors → Add custom connector →
https://<your-host>/mcp.Sign in: a consent page opens; enter your passphrase.
The first time a window opens, macOS asks whether Switchboard may control Ghostty. Click Allow.
🧰 Tools
Tool | Description |
| Folders that sessions can be started in |
| Every session with its status, last activity, pending question, and latest reply |
| Launch |
| Type a message and press Enter. Refuses while a dialog is open, so text can't answer it by accident |
|
|
| Escape, or Ctrl-C with |
| The current screen, or |
| A short, read-aloud summary of one session |
| Block until a session finishes its turn, needs approval, or exits (up to 55 s per call) |
| Open or focus a session's Ghostty window, or close it without stopping the session |
| End a session for good |
Sessions can be referred to by id (a3f9), label ("validation"), or project name.
Each session's screen is also exposed as an MCP resource at session://<id>/screen.
⚙️ Configuration
Settings are read from .env in the project folder (or ~/.switchboard/.env); real environment variables take
precedence.
Variable | Default | Description |
| (none) | Public URL served by your tunnel. Required for HTTP mode |
| (none) | Passphrase for the consent page. At least 12 characters; make it long and random |
|
| Comma-separated folders. Each folder and its subfolders can host sessions |
|
| Local port (always bound to |
|
| Allow |
|
| Binary locations |
Folders inside a root are found by spoken name, as are folders one level deeper (for example git worktrees). New folders show up automatically; adding a new root needs a server restart:
launchctl kickstart -k gui/$(id -u)/com.switchboard.server🔒 Security
Switchboard gives whoever is signed in control over coding agents on your machine. Treat access like an SSH key.
Local-only listener. The server binds to
127.0.0.1; your Cloudflare Tunnel is the only way in.Hostheaders are checked againstSB_PUBLIC_URL.OAuth 2.1 with PKCE.
/mcprequires a bearer token. Tokens are issued only after the passphrase is entered on the consent page (five wrong attempts lock it for a minute). Access tokens last one hour, refresh tokens seven days, and both are stored hashed. To revoke all access, delete~/.switchboard/oauth.json.No arbitrary shell. The server starts only
claudeorcodex, only insideSB_PROJECT_ROOTS. Agents keep their own permission modes, andskip_permissionsis refused unless you enable it.Prompt injection is possible. Agent output is passed back to Claude, and text an agent read on the web or in a file could try to steer it. Keep
respondbehind a confirmation in the Claude app.
Recommended hardening (free on Cloudflare):
Put Cloudflare Access in front of
/authorizeand/consent, so only your email can reach the sign-in page.Add a WAF rule that allows
/mcp,/tokenand/registeronly from Anthropic's published IP ranges.Use a random subdomain rather than
mcp.orclaude..
🩺 Troubleshooting
Symptom | Fix |
No Ghostty window appears | System Settings → Privacy & Security → Automation: allow it to control Ghostty |
"Folder … does not exist" or "outside the allowed folders" | Check |
Claude says it can't reach the tools |
|
A session is stuck on a dialog | Ask "What does it want?" and answer it, or attach with |
Unreachable while you're away | Your Mac is probably asleep; prevent automatic sleeping |
🛠 Development
npm run dev # tsc --watch
npm test # vitest: screen detection, menu navigation, project resolution
tmux ls # sb-* sessions
tmux attach -t sb-<id>
tail -f ~/.switchboard/events/*.jsonl # hook events as they arriveState lives in ~/.switchboard/: sessions.json, events/, oauth.json, windows.json, logs/.
src/
├── server.ts HTTP (Streamable HTTP + OAuth) and stdio entry point
├── auth.ts single-user OAuth provider and consent page
├── tools.ts MCP tool definitions
├── sessions.ts session registry, status, turn tracking
├── status.ts screen classification and menu parsing
├── tmux.ts tmux wrapper
├── ghostty.ts Ghostty AppleScript wrapper
├── projects.ts project roots and spoken-name resolution
├── hook-relay.ts called by agent hooks; appends events
└── agents/ launch commands and transcript reading for claude / codex📄 License
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Use your Mac, Windows or Linux computer from ChatGPT, Claude or Codex: files, commands, documents.
Your AI apps as one team: hand work to Codex or Claude Code on your Mac, with a shared logbook.
Connect ChatGPT and Claude to your Mac, Windows or Linux with secure MCP remote access.
Source-checked CLI guides and model-aware planning for Claude Code, Codex, and Grok Build.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables Claude Code to send prompts to Claude Desktop using macOS automation and AppleScript. Supports conversation management and configurable response polling, though reading responses back is limited by Electron's accessibility APIs.21MIT
- FlicenseAqualityDmaintenanceEnables web ChatGPT to drive durable, sandboxed Claude Code sessions on a local Mac, with controlled read, modify, verify, and recover operations via six session control tools.6-
- AlicenseNot gradedqualityBmaintenanceEnables driving macOS apps from Claude Code — screenshots, accessibility trees, clicks, typing and keys — by borrowing the Computer Use eyes and hands from OpenAI's ChatGPT/Codex desktop app, with persistent JavaScript scripting, text-targeted batching, diff output and macros that collapse many actions into one call without consuming Codex quota or calling a model.2MIT
- AlicenseNot gradedqualityBmaintenanceEnables voice assistants to start, monitor, message, and approve local Claude Code sessions on your computer, including sessions already open in a terminal. It exposes session management, recaps, approvals, and history search as MCP tools.7GPL 3.0