opencode-delegator
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| OPENCODE_MODE | No | spawn or persistent | spawn |
| OPENCODE_PATH | No | OpenCode executable path | opencode |
| OPENCODE_TIMEOUT | No | Timeout in ms | 120000 |
| OPENCODE_PROJECTS | No | JSON format multi-project configuration | |
| OPENCODE_WHITELIST | No | Enable command whitelist | false |
| OPENCODE_DEFAULT_PROJECT | No | Default project absolute path |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| resources | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| write_codeA | Create or overwrite a file with code. Use this to write new files or completely replace file contents. |
| edit_codeA | Edit an existing file using OpenCode. Delegates all edits to OpenCode for lint/typecheck safety. |
| read_fileC | Read the contents of a file. |
| search_codeB | Search for patterns in the codebase using ripgrep. |
| run_commandB | Execute a shell command in the project directory. Use for builds, installs, scripts, etc. |
| run_testsC | Run the project test suite with configurable options. |
| git_statusA | Get git status (branch, staged/unstaged changes). |
| git_diffB | View git diff (unstaged, staged, or specific commit). |
| git_commitC | Stage all changes and create a git commit. |
| git_logB | View recent git commits. |
| planA | Use OpenCode in plan mode to analyze, design, and plan without executing. Safe for exploration. |
| execute_planB | Execute a previously generated plan. OpenCode will implement the plan step by step. |
| list_projectsB | List all registered projects. |
| add_projectC | Register a new project directory. |
| list_sessionsB | List active OpenCode sessions (persistent mode only). |
| resume_sessionB | Resume a previous OpenCode session (persistent mode only). |
| ask_opencodeA | Send an arbitrary prompt to OpenCode in a project context. General-purpose delegation tool. |
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
- 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/S0ra-ai/OpenCode_MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server