- Get Started

Extending: MCP Servers

Model Context Protocol (MCP) servers are external tools that expose a standard interface for agents to invoke. They are ideal for capabilities already packaged as services: GitHub API, file operations, database queries, or custom internal APIs.

MCP Server Configuration

FieldTypeDescription
namestringHuman-readable name referenced in agent prompts and registry entries.
commandstringCommand to start the MCP server (e.g. npx -y @anthropic-ai/mcp-server-fetch).
argsarrayArguments passed to the command.
envobjectEnvironment variables for the MCP server process.
timeout_msintHow long to wait for the MCP server to respond before failing.
permissionsarrayOptional allow-list of tools the agent may invoke.

MCP credentials live in the environment

MCP server configuration can reference environment variables with the { env.VAR_NAME } syntax. The orchestrator substitutes these values when starting the MCP server. The values are not written to registry.json. Worker workspaces still never see the credentials; MCP servers run in the orchestrator or in a dedicated sidecar workspace, not inside the worker.

Per-Agent MCP Override

The top-level mcps array defines globally available servers. Each agent can override with its own mcps array under agents.[role]. If both are present, the agent-specific list takes precedence - it does not merge.

Coder Dashboard MCP registration

You can also register MCP servers centrally in the Coder dashboard (AI Settings → MCP Servers). Both methods coexist; registry.json takes precedence per-agent.