Set up SocratiCode with OpenCode

Add SocratiCode to an OpenCode 1.x project, confirm the MCP server, index the project, and verify a first search.

What you need

This setup uses the OpenCode 1.x configuration format.

Add the MCP server

At the project root, add SocratiCode to opencode.json. Create the file if it is absent and preserve any existing settings:

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "socraticode": {
      "type": "local",
      "command": ["npx", "-y", "--prefer-online", "socraticode@latest"],
      "enabled": true
    }
  }
}

Restart OpenCode and run opencode mcp list to confirm socraticode is connected. In the project session, request codebase_status.

Index and verify one project

Ask OpenCode to run codebase_index for the project. Check codebase_status until indexing completes, then use codebase_search for a known function or feature.

Open one returned source location and confirm it belongs to the expected project. The default watcher handles later file changes while the MCP process is running.

Update the connection

After a SocratiCode release, restart OpenCode so npx checks the current package.

For sensitive projects, review source-code boundaries before indexing. For a system spread across repositories, read cross-repository context.

Request beta access →

Prefer the open-source route? View source guide →