Client Setup: OpenCode

References

Status

  • Confidence: Medium (official docs found, verify MCP option details against current version before release).

Integration notes

  • Add MCP server config under OpenCode config schema (mcp.<name> with "type": "local" and a command array).

Example (~/.opencode/opencode.json or project opencode.json)

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "reasonkit-think": {
      "type": "local",
      "command": ["/ABSOLUTE/PATH/TO/reasonkit-think-mcp"],
      "enabled": true,
      "environment": { "TMPDIR": "/tmp" }
    }
  }
}
  • Config paths (important): OpenCode merges multiple layers (see Config). A file named opencode.json in your home directory (~/opencode.json) is easy to confuse with the user/global file OpenCode tends to ship with installs: ~/.opencode/opencode.json. If you only edit ~/opencode.json, the UI may still load MCP from ~/.opencode/opencode.json unless you point OPENCODE_CONFIG at your preferred file or duplicate entries there.
  • Project repos: Working inside a Git repo usually picks up opencode.json in that project root (highest precedence for standard file-based config). Add reasonkit-think under mcp there too when you develop in a repo that defines its own mcp block.
  • Validate tool invocation and output rendering.

Multi-client reference: root README.md.

Verification checklist

  • server starts
  • tools list loads
  • prompt/resource fetch works