🩺 Troubleshooting
Common issues and fixes when running mcp-opencode.
🔌 Server not showing in the MCP list
- Ensure opencode is installed:
which opencode. - Check your Node.js version:
node --version(must be ≥ 20). - Try running the server manually:
npx @kud/mcp-opencode.
🚫 "failed to create session" error
- Make sure opencode is installed and at least one provider is configured.
- Run
opencode modelsto verify your setup.
⚠️ "The requested model is not supported" error
- The model ID exists in opencode's registry but isn't supported by the provider's API.
- Use
list_modelsand pick a working model — e.g.github-copilot/gpt-4.1instead ofgithub-copilot/claude-sonnet-4.
📋 Model not in the list
- The model list reflects your opencode configuration, not the full marketplace.
- Run
opencode modelsin your terminal to see the same list the server exposes.
🔎 Inspecting tools manually
For testing tools without a full AI client, the MCP Inspector runs against the built server:
npm run inspectIt opens an interactive UI at http://localhost:5173.
🗂️ list_sessions doesn't show my TUI session
- The MCP talks to opencode's background service. Check it is up with
opencode service status; a window started with--standaloneruns its own private server and is not visible. - Send a first message in the window: opencode creates the session only then.
- If
MCP_OPENCODE_URLis set, discovery is off and only that server is used.
⏳ send says "still running"
- The reply took longer than
timeout_seconds(default 600). opencode is still working on it; callreadwith the same session ID to fetch the answer.