Using with OpenCode
OpenCode reads MCP servers from <project>/opencode.json. The OpenCode
schema nests servers under a top-level mcp key with a type: "local"
discriminator. codehub setup writes the correct shape for you.
Wire the MCP server
Section titled “Wire the MCP server”codehub setup --editors opencodeThe writer merges a codehub entry into the existing mcp object.
Prerequisite: codehub must be on your PATH — run
mise run cli:link from a checkout, or mise run cli:install-global
to install the packed tarball. See
Install.
The entry looks like:
{ "mcp": { "codehub": { "type": "local", "command": ["codehub", "mcp"], "enabled": true } }}Reload OpenCode after the first write. The server runs over stdio for the session.
Multi-editor setup
Section titled “Multi-editor setup”--editors accepts any comma-separated subset of
claude-code,cursor,codex,windsurf,opencode. The default is all five.
codehub setup --editors opencode,claude-codeReverting
Section titled “Reverting”codehub setup --editors opencode --undo--undo removes only the codehub entry from opencode.json. Other
MCP servers configured there are left alone.
- MCP tools — the catalogue of 29 tools OpenCode will see.