Skip to content

This page focuses on the MCP-specific commands and tools exposed by the Swytchcode CLI.

Use it alongside the MCP Server setup guide for editor configuration and connection walkthroughs.

Commands below are shown with swy, the shorter alias for swytchcode (e.g. swy mcp serve is the same as swytchcode mcp serve).


MCP tools reference

The Swytchcode MCP server exposes tools under two profiles, selected with swy mcp serve --profile agent|full (agent is the default).

Agent profile (7 tools)

Focused set for AI agents at task-execution time - no setup/management tools.

MCP ToolCLI EquivalentPurpose
swytchcode_discoverswy discoverFind API capabilities by natural-language intent. Start here when you don’t know which tool to call.
swytchcode_infoswy infoGet the input/output schema for a tool by canonical ID.
swytchcode_execswy execExecute a tool by canonical ID. Supports dry_run, demo, and explain modes.
swytchcode_listswy listList locally available tools and integrations. No registry calls.
swytchcode_searchswy searchSearch the remote registry for integrations and published workflows.
swytchcode_addswy add methodEnable an already-installed tool by canonical ID.
swytchcode_policyswy policy listList configured execution guard policies (read-only).

Full profile (14 tools)

Everything in the agent profile, plus setup and management tools for developers and power users.

MCP ToolCLI EquivalentPurpose
swytchcode_initswy initInitialize Swytchcode in this project: creates .swytchcode/, tooling.json, and editor-specific config.
swytchcode_bootstrapswy bootstrapFetch all integrations declared in tooling.json that aren’t already installed.
swytchcode_versionswy -vGet the current Swytchcode version.
swytchcode_getswy getFetch and install integration bundles (methods only) for a project.
swytchcode_add_workflowswy add workflowInstall a published workflow by canonical ID, auto-fetching missing integrations.
swytchcode_doctorswy doctorRun local diagnostics: tooling, bundles, manifest, base URLs, and auth posture. CI-friendly.
swytchcode_planswy planShow the ordered steps for a workflow by canonical ID.

These MCP tools mirror the same CLI execution engine used by the terminal workflow. swytchcode_add, swytchcode_discover, swytchcode_exec, and swytchcode_info are registered in both profiles with profile-appropriate descriptions.


MCP server management commands

The CLI exposes these lifecycle commands for the MCP server.

CommandPurpose
swy mcp serveStart the MCP server in the foreground over stdio (default transport).
swy mcp serve --profile fullStart with all 14 tools instead of the default 7-tool agent profile.
swy mcp serve --transport http --port 5476Start the MCP server over HTTP/SSE at http://127.0.0.1:<port>/sse, localhost-only.
swy mcp serve -d --transport httpStart the MCP server as a background daemon (daemon mode requires HTTP transport).
swy mcp serve --claudeRegister this server with Claude Code automatically via claude mcp add (requires the claude CLI on PATH; stdio transport only).
swy mcp statusCheck whether the daemon is running.
swy mcp stopStop the daemon.
swy mcp token [--rotate]Print the MCP HTTP bearer token (required for HTTP transport only; stdio needs no token). Stored at ~/.swytchcode/mcp_token.

You can also pair these commands with the editor initialization workflow, which registers the server (stdio transport) automatically:

Terminal window
swy init --editor=cursor --mode=sandbox
swy init --editor=claude --mode=sandbox
swy init --editor=codex --mode=sandbox
swy init --editor=copilot --mode=sandbox
swy init --editor=gemini --mode=sandbox
swy init --editor=hermes --mode=sandbox
swy init --editor=openclaw --mode=sandbox
swy init --editor=windsurf --mode=sandbox

Each editor writes its own config file/format (see the init section of the command reference for the full per-editor breakdown). Claude Code is the one exception that isn’t a plain file merge - it’s registered by shelling out to the claude CLI itself, since Claude Code’s own config format/location isn’t meant to be hand-written.


MCP architecture

End-to-end flow diagram

┌───────────────────────────────────────────────────────────────────────┐
│ AI Client / IDE │
│ e.g. Cursor, Claude Code, Codex, Copilot, Gemini, Hermes, OpenClaw, │
│ Windsurf │
└───────────────────────┬───────────────────────────────────────────────┘
│ MCP request
┌───────────────────────────────────────────────────────────────────────┐
│ Swytchcode MCP Server │
│ Exposes tools such as swytchcode_list, swytchcode_get, and │
│ swytchcode_exec │
└───────────────────────┬───────────────────────────────────────────────┘
│ CLI call / structured execution
┌───────────────────────────────────────────────────────────────────────┐
│ Swytchcode CLI │
│ Resolves project state, tool schemas, auth, and policies │
└───────────────────────┬───────────────────────────────────────────────┘
│ Approved API call
┌───────────────────────────────────────────────────────────────────────┐
│ External APIs / Integration Providers │
│ Stripe, GitHub, and other supported integrations │
└───────────────────────────────────────────────────────────────────────┘

This keeps the AI client decoupled from direct API logic while preserving a single secure execution path across all supported editors.