OpenCode Integration

Add OpenContext MCP to your OpenCode configuration.

Configuration

Add OpenContext MCP to your .opencode.json configuration:

.opencode.json
{
  "mcp": {
    "opencontext": {
      "type": "local",
      "command": ["npx", "-y", "opencontext-mcp"],
      "enabled": true
    }
  }
}

Steps

1

Open your OpenCode config

Open .opencode.json in your project root.

2

Add MCP configuration

Add the mcp section as shown above.

3

Restart OpenCode

Restart OpenCode to load the MCP server.

Verify

After restarting, your agent can use OpenContext. Try asking:

example
"List all available context topics"
"Save our coding conventions under topic coding_rules"