Expose opencode (opencode serve) as an MCP server. Async tools that always answer within 55s, so MCP clients with a 60s timeout can drive a full coding agent + shell.
Quick Install
Copy the config for your editor. Some servers may need additional setup — check the README.
Claude Desktop
Claude Code
Cursor
Add to claude_desktop_config.json:
{
"mcpServers": {
"opencode-mcp-bridge": {
"command": "npx",
"args": [
"-y",
"nmt3325/opencode-mcp-bridge"
]
}
}
}
📋 Copy
Run in terminal:
claude mcp add opencode-mcp-bridge npx -y nmt3325/opencode-mcp-bridge
📋 Copy
Add to .cursor/mcp.json:
{
"mcpServers": {
"opencode-mcp-bridge": {
"command": "npx",
"args": [
"-y",
"nmt3325/opencode-mcp-bridge"
]
}
}
}
📋 Copy
README Excerpt
MCP しか接続できない AI チャット(tool calling API を直接使えないクライアント)から、opencode のコーディングエージェントとシェルをフル機能で操作するために作りました。 > **設計上の最重要ポイント**: すべての MCP ツールは **必ず 55 秒以内にレスポンスを返します**。 > 60 秒でタイムアウトする MCP クライアントでも「呼び出し失敗」にならないよう、長時間処理は必ず > 「開始 → ジョブ ID を返す → ポーリング」の非同期パターンに分解しています。 | 課題 | 素の opencode | 本ブリッジ | | --- | --- | --- |
Tools (20)
OPENCODE_API_TOKEN OPENCODE_BASE_URL OPENCODE_MCP_ALLOW_PATTERNS OPENCODE_MCP_DENY_PATTERNS OPENCODE_MCP_MAX_OUTPUT_CHARS OPENCODE_MCP_POLL_INTERVAL_MS OPENCODE_MCP_PTY_BUFFER_CHARS OPENCODE_MCP_PTY_SHELL OPENCODE_MCP_REQUEST_TIMEOUT_MS OPENCODE_MCP_SHELL_BACKEND OPENCODE_MCP_SHELL_TIMEOUT_SECONDS OPENCODE_MCP_TOKEN OPENCODE_MCP_WAIT_MAX_SECONDS opencode_abort opencode_diff opencode_find_file opencode_grep opencode_health opencode_permission_reply opencode_permissions_pending