OpenCode
OpenCode uses a single opencode.json file in the project root for all configuration, including MCP servers.
Quick setup
Section titled “Quick setup”cce init # Auto-detects OpenCode if opencode.json existscce init --agent all # Explicitly includes OpenCodeFiles created
Section titled “Files created”opencode.json
Section titled “opencode.json”CCE adds its MCP server entry to the existing opencode.json (or creates one if it does not exist).
{ "mcp": { "context-engine": { "type": "local", "command": ["cce", "serve", "--project-dir", "/path/to/your/project"] } }}Note: OpenCode uses "mcp" as the servers key, with "type": "local" and "command" as an array (not a string with separate "args").
No instruction file
Section titled “No instruction file”OpenCode does not use a separate instruction file. The MCP server registration is sufficient for OpenCode to discover and use CCE’s tools.
Verify it’s working
Section titled “Verify it’s working”- Start an OpenCode session after running
cce init - The
context_searchtool should be available - Ask a code question and check the tool output for
context_searchcalls - Run
cce savingsto check if queries are being tracked
Troubleshooting
Section titled “Troubleshooting”OpenCode doesn’t detect the MCP server
Section titled “OpenCode doesn’t detect the MCP server”Check that opencode.json exists in your project root and contains the context-engine entry. If you have an existing opencode.jsonc (with comments), CCE merges into that file.
”cce: command not found”
Section titled “”cce: command not found””Ensure cce is on your PATH. If installed with uv tool install, add ~/.local/bin to your shell profile.