MCP automation works while Schaltwerk is running and the project is open. Make sure the relevant agent CLI (Claude Code, Codex, OpenCode, or Gemini) is installed and authenticated before enabling MCP.
Enable the Bundled MCP Server (Recommended)
1
Open Settings
Click the gear icon in the top bar to open the Settings modal.
2
Select Agent Configuration
In the left sidebar choose Agent Configuration, then pick the agent you want to automate (Claude Code, Codex, OpenCode, or Gemini).
3
Enable the MCP toggle
In the MCP Server Configuration panel, turn on Enable MCP. Schaltwerk writes the necessary
.mcp.json entry using the embedded server binary.- If the agent CLI is missing, install it first (for example
brew install claude-code). - When the toggle succeeds you’ll see the server status marked as 📦 Embedded and configuration ✅ Configured.
4
Restart the agent
Restart your orchestrator terminal or the external agent CLI so it loads the new MCP configuration.
5
Verify
In your agent (e.g., Claude Code) run a query such as “List my Schaltwerk sessions.” You should see the active sessions from this project.
Troubleshooting
CLI not detected
CLI not detected
Symptom: MCP panel shows ⚠️ Not found for the agent CLI.Fix: Install the CLI and restart Settings:
brew install claude-code, npm install -g @statelyai/stately-cli (Codex), etc.Agent still says MCP server missing
Agent still says MCP server missing
Symptom: After enabling, the agent reports “no MCP servers configured.”Fix:
- Disable and re-enable the MCP toggle.
- Restart the agent CLI (e.g.,
claude --resetor relaunch Codex). - In Settings, click the reset button in the orchestrator terminal to reload configuration.
Need to remove MCP configuration
Need to remove MCP configuration
Turn off the Enable MCP toggle. Schaltwerk removes the entry from
.mcp.json (or the agent’s global config).Available Tools
Once MCP is enabled, agents can call these tools:Create Sessions
schaltwerk_create — Create new specs or running sessionsList Sessions
schaltwerk_list — Retrieve sessions with status infoBrowse Specs
schaltwerk_spec_list — See spec names, sizes, and timestampsschaltwerk_spec_read — Fetch full markdown for a single specCancel Sessions
schaltwerk_cancel — Remove sessions after they merge (deletes worktree & branch; spec moves to Archives)Unsure what a tool does? Ask your agent to show the MCP documentation, or inspect the source in
mcp-server/src/tools.Security & Safety
The MCP server can create, modify, and delete git worktrees. Only enable it for agents you trust and keep your project under version control.
- ✅ Canceling after merge is routine cleanup—it deletes the session worktree/branch and reclaims disk while keeping the spec in Archives
- ❌ Canceling before merge or without tests risks losing uncommitted work; use
schaltwerk_pauseif you’re unsure - ⚠️
schaltwerk_cancel(and the UI’s cancel action) removes the session worktree & branch immediately. Any uncommitted changes vanish. The spec content is archived in Settings → Archives for recovery.
Looking to automate more workflows? Continue with MCP Integration to see what agents can do once the server is active.

