wellworn

opencode

The mcp block in opencode.json, with type remote and the enabled switch.

opencode reads opencode.json or opencode.jsonc from the project root. MCP servers go under the mcp key, and a remote one is "type": "remote".

Without a key

opencode.json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "wellworn": {
      "type": "remote",
      "url": "https://mcp.wellworn.dev/mcp",
      "enabled": true
    }
  }
}

With a key

opencode.json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "wellworn": {
      "type": "remote",
      "url": "https://mcp.wellworn.dev/mcp",
      "enabled": true,
      "headers": {
        "Authorization": "Bearer ww_your_key"
      }
    }
  }
}

opencode.json usually lives in the repository, so put the key in a personal global config rather than the project file if the project is shared.

Confirm it works

opencode mcp list prints the servers and their status. Once connected, the eight tools are offered to the model alongside opencode's built-in ones with no further step.

What breaks

"enabled": false keeps the entry but stops opencode connecting at startup. It is the quickest way to rule the server out while debugging something else, and the quickest way to leave it switched off by accident.

The type value is remote, not http or streamableHttp. opencode's other value is local, which takes a command array.

Verified 2026-09-08 against opencode.ai