Skip to content

Connect OpenCode

Wire OpenCode to Chartbuddy Hub over local stdio MCP.

OpenCode config uses a top-level mcp key (not mcpServers). Local servers are type: "local" with the binary and args in one command array.

Prefer the global config so the absolute Chartbuddy path is not committed to a repo:

  • Global: ~/.config/opencode/opencode.json (or .jsonc)
  • Project: opencode.json / opencode.jsonc in the repo root (avoid for Chartbuddy Hub — machine-specific path)

Config

Add a chartbuddy entry under mcp:

json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "chartbuddy": {
      "type": "local",
      "command": [
        "C:\\Users\\YOUR_USER\\AppData\\Local\\Programs\\Chartbuddy\\chartbuddy.exe",
        "--mcp"
      ],
      "enabled": true
    }
  }
}
json
{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "chartbuddy": {
      "type": "local",
      "command": [
        "/Applications/Chartbuddy.app/Contents/MacOS/chartbuddy",
        "--mcp"
      ],
      "enabled": true
    }
  }
}

Windows install

A public Windows Chartbuddy Hub build is not shipping yet. Use the macOS tab until it does, then replace YOUR_USER (or use the path shown after install).

Keep Chartbuddy Hub running, restart OpenCode (or reload config), and start a new session if tools do not appear.

Verify

powershell
& "$env:LOCALAPPDATA\Programs\Chartbuddy\chartbuddy.exe" --mcp-status
bash
/Applications/Chartbuddy.app/Contents/MacOS/chartbuddy --mcp-status

Exit 0 = Chartbuddy Hub bridge up.

Handoff

Optional context for a chat that will use the tools:

text
Chartbuddy MCP is configured (stdio → chartbuddy --mcp → Chartbuddy Hub).
Transport: newline JSON-RPC or Content-Length framed MCP — not HTTP docs.
Open charts: list_charts (chart-* refs). get_active_chart skips menus/popovers.
Missing tools usually mean the chartbuddy MCP server is off for the chat, or a new chat is needed.

Chartbuddy Hub documentation · Desktop app · Help Center