opencode-mcp-bridge
by nmt3325
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| OPENCODE_BASE_URL | No | URL of the opencode server | http://127.0.0.1:4096 |
| OPENCODE_MCP_HOST | No | Host address for the bridge to listen on | 127.0.0.1 |
| OPENCODE_MCP_PORT | No | Port for the bridge to listen on | 8787 |
| OPENCODE_API_TOKEN | No | Bearer token to send to the opencode server | |
| OPENCODE_MCP_TOKEN | No | If set, requires Authorization: Bearer or x-mcp-token | |
| OPENCODE_MCP_PTY_SHELL | No | Shell executable used in PTY backend | bash |
| OPENCODE_SERVER_PASSWORD | No | Password for Basic authentication with the opencode server | |
| OPENCODE_SERVER_USERNAME | No | Username for Basic authentication with the opencode server | |
| OPENCODE_MCP_DEFAULT_AGENT | No | Default agent | |
| OPENCODE_MCP_DEFAULT_MODEL | No | Default model | |
| OPENCODE_MCP_DENY_PATTERNS | No | Additional deny patterns (comma-separated, wildcards allowed) | rm -rf /, rm -rf /*, rm -rf ~, mkfs*, dd if=* of=/dev/*, shutdown*, reboot*, halt*, chmod -R 777 /* |
| OPENCODE_MCP_SHELL_BACKEND | No | Shell backend to use: auto, pty, v2, or legacy | auto |
| OPENCODE_MCP_ALLOW_PATTERNS | No | If set, acts as a whitelist for allowed patterns (comma-separated, wildcards allowed) | |
| OPENCODE_MCP_MAX_OUTPUT_CHARS | No | Maximum characters in one response; excess is truncated and retrievable via cursor | 20000 |
| OPENCODE_MCP_POLL_INTERVAL_MS | No | Polling interval in milliseconds | 1000 |
| OPENCODE_MCP_PTY_BUFFER_CHARS | No | Maximum characters kept per PTY output buffer | 1000000 |
| OPENCODE_MCP_WAIT_MAX_SECONDS | No | Maximum seconds a tool call will wait (max 50) | 45 |
| OPENCODE_MCP_DEFAULT_DIRECTORY | No | Default working directory | |
| OPENCODE_MCP_REQUEST_TIMEOUT_MS | No | Timeout in milliseconds for requests to opencode | 20000 |
| OPENCODE_MCP_SHELL_TIMEOUT_SECONDS | No | Default timeout in seconds for shell jobs | 120 |
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
Server capabilities have not been inspected yet.
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
No tools | |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |