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 | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Dheerax/opencode_mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server