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 acommandarray).
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.jsonin 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.jsonunless you pointOPENCODE_CONFIGat your preferred file or duplicate entries there. - Project repos: Working inside a Git repo usually picks up
opencode.jsonin that project root (highest precedence for standard file-based config). Addreasonkit-thinkundermcpthere too when you develop in a repo that defines its ownmcpblock. - Validate tool invocation and output rendering.
Multi-client reference: root README.md.
Verification checklist
- server starts
- tools list loads
- prompt/resource fetch works