Skip to content

OpenCode ​

See MCP overview for what the server does. The examples run PBrokkR from the source code in C:\Tools\PBRGenerator (replace it with your folder). With the downloaded program, the command is pbrokkr-cli (pbrokkr-cli.exe on Windows) with the argument mcp, and no PYTHONPATH: see the command an agent must start.

With the command ​

Run it in the project that should use the server:

powershell
opencode mcp add pbrokkr --env PYTHONPATH=C:\Tools\PBRGenerator -- C:\Tools\PBRGenerator\.venv\Scripts\python.exe -m pbrgen mcp
sh
opencode mcp add pbrokkr --env PYTHONPATH=/opt/PBRGenerator -- /opt/PBRGenerator/.venv/bin/python -m pbrgen mcp

Add --global to have it in every project. Check it:

sh
opencode mcp list

As a file ​

opencode.json (or opencode.jsonc) in the project, with the server under mcp.servers:

json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "servers": {
      "pbrokkr": {
        "type": "local",
        "command": ["C:\\Tools\\PBRGenerator\\.venv\\Scripts\\python.exe", "-m", "pbrgen", "mcp"],
        "environment": { "PYTHONPATH": "C:\\Tools\\PBRGenerator" }
      }
    }
  }
}

Two things differ from other agents: the command and its arguments are one list, and the variables go under environment.

Older OpenCode versions

Before version 2 of the configuration, the server name went directly under mcp ("mcp": { "pbrokkr": { ... } }). If your version refuses servers, use that form.

Inside OpenCode, /mcps shows the server and lets you connect or disconnect it.

Try it ​

With pbrokkr, generate the proc_ropes preset at 1024 with the Godot profile.