MCP server bridging OpenCode SDK to Claude Code — fast AI coding agents with full repo access
Server provides 12 tools with explicit Zod schemas and descriptions. Most tools have clear action enums and parameter types. However, descriptions are often verbose (200+ chars) and lack actionable guidance for LLM selection. Parameter descriptions are present but generic. Output schemas are not documented, responses are JSON stringified without field-level documentation. Error handling returns isError flag but lacks recovery guidance. No tool annotations (readOnlyHint/destructiveHint). Composition is reasonable: tools are single-purpose, but some (opencode_session) combine many actions into one tool, reducing composability.
Set provider authentication. Action: set (configure API key for a provider)
Manage OpenCode configuration. Actions: get (full config), providers (list providers and default models), update (modify config)
Check what files the OpenCode agent changed. Use 'status' AFTER a prompt to see which files were created/modified (like git status). Use 'read' to inspect specific file contents. Use 'list' to browse directories. This is your primary review tool — always check status after the agent writes code.
Search the codebase through OpenCode. Use 'text' to grep file contents, 'files' to find files by name, 'symbols' to find code symbols (functions, classes, etc). Useful for understanding the codebase before sending tasks to the agent.
Get the full OpenCode MCP workflow guide and tool reference. Call this when you need a refresher on how to use the OpenCode tools, the recommended workflow, or best practices. No parameters needed.
opencode_session combines 21 actions into one tool (create, prompt, shell, diff, fork, permission, etc.). This violates single-responsibility principle and forces LLM to reason about which action to invoke. Should split into separate tools: create_session, send_prompt, run_shell, get_diff, fork_session, etc.
No output schemas documented. Tools return JSON.stringify(result) without field-level documentation. LLMs cannot plan downstream calls or extract specific fields. E.g., opencode_message.list returns what fields? Does it include message_id, timestamp, content? Unknown.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | D | 55 | 2026-07-28+ | v2 |
Manage MCP servers within OpenCode. Actions: status (all server statuses), add (register new server), connect (connect to server), disconnect (disconnect from server), auth_remove (remove auth), auth_start (start auth flow), auth_callback (complete auth with code), auth_authenticate (authenticate with server).
Read the conversation history from an OpenCode session. Use 'list' AFTER a prompt completes to see what the agent did — its reasoning, tool calls, and code changes. Use 'get' for a specific message. Essential for reviewing the agent's work before accepting changes.
Get project info and available agents/commands. Actions: current (current project), list (all projects), agents (list available agents — use to know what agent names to pass to prompt/shell), commands (list available slash commands for session command action), vcs (git/VCS info — branch, status, etc.)
Manage AI providers. Actions: list (all providers with models and connection status), auth (get auth methods per provider), authorize (start OAuth flow), callback (complete OAuth flow with authorization code).
Manage terminal (PTY) sessions. Actions: list (all PTY sessions), create (new terminal with command/args/cwd), get (session by ID), update (resize or rename), remove (close session). Skip 'connect' — it's a WebSocket upgrade.
Manage OpenCode coding agent sessions. START HERE: use action 'create' to get a session ID, then 'prompt' to send coding tasks. The agent has full file access (read/write/edit/bash). Use 'model' and 'provider' params on prompt/shell/command to switch models on the fly. Actions: create, get, list, status (overall status), children, update, delete, init, abort, share, unshare, summarize, revert (undo changes, pass messageId), unrevert, prompt (send task), promptAsync (send task, return immediately), command (run agent command), shell (run shell command), diff (get code diff, optional messageId), fork (fork session at a message), todo (get session todo list), permission (respond to tool permission requests — once/always/reject). Always reuse session IDs for related work.
Discover available tools in OpenCode. Actions: ids (list all tool IDs), list (get tools with JSON schema for a specific provider/model).
Error handling returns {content: [{type: 'text', text: 'Error: ...'}], isError: true} but provides no recovery guidance. E.g., 'Error: Provider required for list' does not tell LLM what to do next. Should include actionable hints like 'Call opencode_project.providers() first to list available providers.'
No tool annotations (readOnlyHint, destructiveHint, idempotentHint). LLMs cannot distinguish safe read-only tools from destructive ones. opencode_session.delete, opencode_config.update, opencode_auth.set should be marked destructive; opencode_message.list, opencode_file.read should be marked readOnly.
Parameter descriptions are generic and lack format/constraint guidance. E.g., 'model' param described as 'Model ID to use (e.g. gpt-oss-120b, zai-glm-4.7, llama3.1-8b)' includes example values that LLMs may reuse literally. Should use enum or pattern constraint instead, or state 'Call opencode_project.agents() to list valid model IDs.'