Skip to main content
Connect local or remote tools to Step Code through MCP. Once a server connects, the model can call its registered tools as needed.

Connection methods

Legacy SSE transport is not a substitute for Streamable HTTP. Plugins can also declare MCP servers; see Plugins.

Configuration

Declare servers under [mcp_servers.<name>] in global ~/.stepcode/config.toml. Project-level MCP servers are overlaid from installed plugins’ mcpServers manifests.
Replace the paths and endpoint with your service. Choose Bearer or OAuth as required; you do not need both.

Authentication

Read Bearer tokens from the environment running Step Code:
For OAuth services:
OAuth uses dynamic client registration, PKCE, and a local callback. Tokens are stored atomically in ~/.stepcode/.credentials.json with 0600 permissions, keyed by server name followed by a vertical bar (<name>|). Model-platform login and MCP authorization use separate credentials.

Command-line management

--url and a local command are mutually exclusive. --bearer-token-env-var is HTTP-only. --env sets stdio subprocess variables, not HTTP headers.

Viewing servers interactively

Use /mcp for server status and loaded tool counts. States include connecting, connected, and failed. Servers with enabled = false do not appear in the list. If connection fails, check the command, environment variables, endpoint reachability, and authorization.

Tool names and filtering

Names use <server>__<tool>, with invalid characters converted to underscores. enabled_tools and disabled_tools filter tools before registration. When an allowlist is set, other tools are unavailable to the model. This differs from a prompt asking the model not to use a tool: an unregistered tool is absent from its callable tool list.

Security

Connect only to trusted servers. stdio servers execute local processes; remote MCP services receive call arguments, and returned content may enter model context. Bypass skips individual approval for ordinary MCP calls. Use Ask and disable unneeded tools for data transfer, writes, or administrative operations. Built-in command rules cannot infer every side effect of an external MCP service.

Next steps