opencode-mcp-bridge
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| OPENCODE_MCP_HOME | No | Location of the config file | |
| OPENCODE_MCP_LOCK | No | Locked fields, comma-separated, or 'all'. Options: model, agent, permissionMode. | |
| OPENCODE_MCP_PORT | No | Port for the spawned server | |
| OPENCODE_MCP_AGENT | No | OpenCode agent | |
| OPENCODE_MCP_MODEL | No | Default model as provider/model | |
| OPENCODE_MCP_DIRECTORY | No | Default working directory | |
| OPENCODE_MCP_SERVER_URL | No | Use an existing OpenCode server instead of spawning one | |
| OPENCODE_MCP_PERMISSION_MODE | No | Permission mode: auto / readonly / strict |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| opencode_healthA | Starts a local opencode server if needed (or attaches to a running one) and reports its version and the current settings. |
| opencode_agentsA | Lists the agents configured in opencode with their mode and description, for use as the 'agent' parameter of a dispatch. |
| opencode_modelsA | Lists the providers and models configured in opencode as 'provider/model' IDs. Use 'filter' to narrow the list. Never returns API keys. |
| opencode_set_modelA | Persists which model, agent and permission mode future opencode tasks use. Every field is optional; only the fields you pass are changed. |
| opencode_dispatchA | Creates a temporary opencode session and hands it the task. Returns IMMEDIATELY with a runId, without waiting for the result. Afterwards call 'opencode_wait' with the runId until the run is finished. The task must be described completely and self-contained, because the session knows nothing about this conversation. |
| opencode_follow_upA | Sends a follow-up instruction into the session of an earlier run, so the subagent keeps everything it already worked out. Requires that the earlier run was dispatched with keepSession: true. Returns a new runId to wait on. |
| opencode_waitA | Waits up to 'maxSeconds' for a run to finish. If it is done, the full result comes back. If it is still running, a progress report comes back — then simply call again. Never blocks indefinitely, and never shortens the run itself: the task keeps going between calls no matter how long it takes. Returns the moment opencode reports the session idle — there is no polling delay. While waiting it emits notifications/progress with the live tool activity, so a client that sets resetTimeoutOnProgress can raise maxSeconds well past its own default timeout. Pass 'runIds' instead of 'runId' to wait for whichever of several parallel runs finishes first. |
| opencode_answerA | Answers the question a run is parked on. Only reachable when autoAnswerQuestions is disabled in the configuration; otherwise questions are rejected automatically so a headless run can never hang. 'answers' holds one array of chosen labels per question, in order. |
| opencode_messagesA | Returns the complete conversation of a run's session — every message with its tool calls. Use this to audit what the subagent actually did when the summary is not enough. |
| opencode_diffA | Returns the actual patch per file for a run, not just the file names. Relies on opencode's workspace snapshots, so it is empty outside a git repository — opencode_result still lists the touched files in that case. |
| opencode_todosA | Returns the subagent's own todo list for a run — the most informative view of a long task while it is still working. |
| opencode_statusA | Returns the current state of a run immediately, without waiting. |
| opencode_resultA | Returns the final result of a finished run (reply text, changed files, cost). |
| opencode_cancelA | Aborts a running opencode run and cleans up the temporary session. |
| opencode_runsA | Lists every run of this MCP session with its status and duration. |
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/teodorgross/opencode-mcp-bridge'
If you have feedback or need assistance with the MCP directory API, please join our Discord server