Add a remote MCP server

mcp & integrations

// what it does

A "remote" MCP server is reached over HTTP: set type:"remote", its url, and optional headers for auth. For servers behind OAuth, authenticate with opencode mcp auth instead of hardcoding a token, and check status with opencode mcp list.

// shell

$ { "mcp": { "my-remote": { "type": "remote", "url": "https://mcp.example.com", "enabled": true, "headers": { "Authorization": "Bearer {env:MCP_TOKEN}" } } } }
$ opencode mcp auth my-remote

// gotcha

Put the token in an env reference ({env:MCP_TOKEN}), not a literal, so it never lands in a committed config. If the handshake fails, opencode mcp debug shows why.

// resources