Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

MCP Servers

Swarmie supports MCP transports over stdio, http, and sse.

Primary sources:

  • MCP config/transport types: crates/mcp/src/config.rs
  • MCP lifecycle manager: crates/mcp/src/manager.rs
  • Config resolution/validation: crates/core/src/config/resolve.rs
  • TUI /mcps flow: crates/tui/src/input/slash.rs, crates/tui/src/app/update/commands.rs, crates/tui/src/app/update/modals.rs
  • Runtime toggle persistence: crates/core/src/submission/op_handlers.rs

Configure servers

[mcp.servers.github]
enabled = true
type = "http"
url = "https://api.githubcopilot.com/mcp/"
headers = { Authorization = "Bearer ${GITHUB_TOKEN}" }
 
[mcp.servers.local_db]
type = "stdio"
command = "npx"
args = ["-y", "@bytebase/dbhub"]
env = { DB_URL = "sqlite:///tmp/app.db" }
 
[mcp.servers.events]
type = "sse"
url = "https://example.com/events"

Validation rules:

  • stdio requires command
  • http requires url
  • sse requires url

Manage MCP servers in TUI

  1. Run /mcps (or /mcp) to open the picker.
  2. Swarmie dispatches Op::McpList and renders grouped Running/Stopped entries.
  3. Press Enter to toggle selected server (Op::McpToggle).
  4. Core starts/stops the server and emits Event::McpServerToggled.

Enabled state is persisted for future sessions via config update when possible.

Troubleshooting checklist

  • cannot toggle MCP server ... MCP is not configured: no [mcp.servers.*] resolved for this session.
  • failed to start/stop MCP server ...: transport init/shutdown failure; verify command/url/headers.
  • Toggle works but restart loses state: config persist warning (mcp.config_persist_failed) indicates a write failure.
  • Tool list empty for a running server: MCP handshake succeeded but list_tools failed or returned no tools.