opencode-mcp-bridge
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| opencode_startA | Spawns a new OpenCode CLI session and starts the initial task. Returns session_id and events_log_path. After starting, use a persistent background notification watcher on to receive events (running, idle, waiting_input, done, stale, contract_violated). Call opencode_read when notified, then opencode_kill when done. |
| opencode_readB | Returns the last 200 lines of buffered output and current session status. |
| opencode_sendB | Sends raw text or keystrokes to the PTY. Supports , , , , , , , , . |
| opencode_commandC | Sends a command or text to OpenCode and submits it with Enter. |
| opencode_statusA | Returns the current status of a session: running, idle, waiting_input, stale, done, error, contract_violated, or starting. |
| opencode_killC | Terminates a session and frees all its resources. |
| opencode_listB | Lists all tracked OpenCode sessions with their IDs, tasks, statuses, and active status. |
| opencode_switchC | Switches the active session to the specified session ID. |
| opencode_activeB | Returns the ID and status of the currently active session. |
| opencode_set_modelA | Dynamically switches the AI model on an active or idle session for subsequent prompts. |
| opencode_healthB | Returns a full health report for a session: status, uptime, last activity, output line count, recovery attempts, contract violations, file change count, and operation log count. |
| opencode_contextA | Returns the operation log and file changes tracked for this session. |
| opencode_diffC | Returns change metadata for a specific file tracked during the session. |
| opencode_interruptC | Sends Ctrl+C to interrupt the task, returns the final output buffer and reason. |
| opencode_checkpointB | Saves a checkpoint snapshot of session state WITHOUT interrupting it. |
| opencode_retryB | Loads a saved checkpoint and spawns a new session continuing from that state. |
| opencode_list_checkpointsA | Lists all saved checkpoints sorted by recency. |
| opencode_usageC | Queries OpenCode model and statistics information. |
| opencode_classifyB | Classifies a task to decide whether to delegate to OpenCode, recommended model, and strategy. |
| opencode_batchB | Starts up to 3 parallel OpenCode sessions with dependency support. |
| opencode_batch_statusC | Returns status for a batch of session IDs. |
| opencode_logsC | Returns recent bridge log entries. |
| opencode_modeC | Gets or sets the delegation toggle ('on' | 'off'). |
| opencode_configC | Gets or updates configuration options (effort_level, default_model, default_agent). |
| opencode_setupA | One-time setup: writes OpenCode subagent guidelines to local workspace and user home profile directory. |
| opencode_server_healthA | Reports the state of the underlying opencode serve process itself (pid, port, alive, HTTP-healthy, whether an automatic recovery is in progress) — distinct from opencode_health, which reports a single session's state. |
| opencode_server_restartA | Forcibly restarts the underlying opencode serve process. Disruptive: every in-flight session on that process is interrupted. Normally unnecessary — the bridge restarts automatically when it detects a wedged or failed session — use this only to force a clean process explicitly (e.g. right after fixing provider auth). |
| opencode_guideA | Returns the complete behavioral guide for using opencode-mcp-bridge correctly — when to delegate, model selection, the async event-driven workflow, batch/dependency orchestration, guardrails, and how to diagnose a failed session. Call this first before delegating a task through OpenCode. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 28 tools
Each tool clearly targets a distinct aspect of session or server management: health vs status vs context vs diff serve different query depths, send vs command vs interrupt handle different input methods, and checkpoint/retry/list_checkpoints form a clear lifecycle. The only near-overlap (health vs server_health) is explicitly disambiguated in the description.
All tools share the opencode_ prefix and use snake_case, providing a consistent style. However, the pattern mixes bare nouns (health, status, context) with verb-first forms (set_model, list_checkpoints, server_restart), so it is not a strict verb_noun pattern throughout.
28 tools is on the heavy side, straddling the 'too many' threshold. The breadth is justified by the complex session-lifecycle and server-management domain, but the count exceeds the typical well-scoped range and may introduce selection overhead for agents.
The surface covers the full session lifecycle (start, read, interrupt, kill), checkpointing (save, list, retry), batch operations, configuration, and server health. No obvious dead ends or missing operations for the stated purpose of bridging to OpenCode.