Skip to content

# OpenCode

OpenCode uses a single `opencode.json` file in the project root for all configuration, including MCP servers.

## Quick setup

Section titled “Quick setup”
Terminal window

    cce init              # Auto-detects OpenCode if opencode.json existscce init --agent all  # Explicitly includes OpenCode

## Files 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).

    {  "mcpServers": {    "context-engine": {      "command": "cce",      "args": ["serve"]    }  }}

## 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.

## Auto-detection

Section titled “Auto-detection”

CCE detects OpenCode when an `opencode.json` file exists in your project root. No explicit `--agent` flag is needed.