Skip to content

OpenCode → Conductor MCP

Live hub: https://conductor-konstant.hectorsanchez.eu/connect.md
Bootstrap: https://conductor-konstant.hectorsanchez.eu/connect/bootstrap.md
Offline (cloned repo): docs/guides/connect/opencode.md

Agents: use absolute URLs above. Relative ../connecting.md links 401 on the live host.

Recommended path: JSON config with runtime {env:…} interpolation. This never embeds a resolved token at registration time.

Prerequisites

  1. Complete https://conductor-konstant.hectorsanchez.eu/connect/bootstrap.md in the same shell that will launch OpenCode.
  2. Confirm length-only: token present, value never printed.

opencode.json or ~/.config/opencode/opencode.json:

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "conductor": {
      "type": "remote",
      "url": "https://conductor-konstant.hectorsanchez.eu/mcp",
      "headers": {
        "Authorization": "Bearer {env:CONDUCTOR_MCP_AUTH_TOKEN}"
      }
    }
  }
}

OpenCode interpolation is {env:VAR}not ${VAR} and not $env:VAR.

Never replace {env:CONDUCTOR_MCP_AUTH_TOKEN} with a literal token.

Optional: CLI add

If you use the CLI, header format is KEY=VALUE (equals), never Authorization: Bearer … (colon form causes errors that may echo the token).

# Same shell that already exported CONDUCTOR_MCP_AUTH_TOKEN
opencode mcp add conductor \
  --url https://conductor-konstant.hectorsanchez.eu/mcp \
  --header "Authorization=Bearer ${CONDUCTOR_MCP_AUTH_TOKEN}"

Prefer the JSON {env:…} path: CLI registration may embed the resolved token into stored config.

Restart required

Exit any running OpenCode process. Launch a new process from the shell that has CONDUCTOR_MCP_AUTH_TOKEN exported. Config/env changes are not picked up in-session.

Verify

curl -fsS https://conductor-konstant.hectorsanchez.eu/connect/mcp-smoke.sh | bash

After restart, tools/list must include setup. Then:

setup("engineering-lead", "opencode")