Skip to main content
Glama
mryesiller

opencode-delegate-mcp

by mryesiller

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
OPENCODE_DELEGATE_CONFIGNoOverride path to the config file (default: ~/.config/opencode-delegate/config.json)

Capabilities

Features and capabilities supported by this server

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
delegate_taskA

Hand off self-contained, high-volume "grunt work" to a cheaper model running through OpenCode, so the primary agent can stay focused on architecture and critical decisions.

The subagent runs non-interactively in a real working directory and CAN read, write, and edit files and run shell commands there (auto-approved by default). Give it a complete, self-contained brief — it does not see your conversation.

Good for: writing repetitive/boilerplate code, mechanical refactors, generating tests, fixing lint/type errors, updating call sites, docstrings, simple migrations. Avoid for: architecture, security-sensitive logic, ambiguous specs, or anything where a wrong edit is costly.

Args:

  • task (string, required — alias: scope, accepted for parity with delegate_tests; provide one): Complete instructions for the subagent, including acceptance criteria.

  • directory (string): Absolute path of the repo/dir to work in. Defaults to the server's cwd or config.default_directory.

  • model (string): Override provider/model, e.g. "minimax-coding-plan/MiniMax-M2.5-highspeed". Defaults to config.default_model.

  • agent (string): OpenCode agent name to run as.

  • variant (string): Reasoning-effort variant, e.g. "high" | "minimal".

  • profile (string): Named preset from config (model/agent/variant/auto_approve).

  • files (string[]): Paths to attach as context.

  • session (string): Session id to continue a prior delegation (returned as session_id).

  • continue_session (boolean): Continue the last session instead of a specific id.

  • auto_approve (boolean): Auto-approve tool permissions (default from config, usually true).

  • response_format ('markdown' | 'json'): Output format (default 'markdown').

See also: delegate_tests — same shape, dedicated to test-writing; its required field is named scope instead of task.

Returns structured content: { ok, model, session_id, directory, result, error?, usage{tokens,cost}, actions[], duration_ms }.

delegate_testsA

Test-focused wrapper around delegate_task. The subagent writes (and optionally runs) tests for the given scope while avoiding changes to production code unless strictly required to make tests pass.

Args:

  • scope (string, required — alias: task, accepted for parity with delegate_task; provide one): What to test — module, files, behaviors, edge cases.

  • directory (string): Absolute repo path. Defaults to config.default_directory or server cwd.

  • framework (string): Optional testing framework/runner hint (e.g. "vitest", "pytest").

  • run_tests (boolean): Ask the subagent to run the suite and report pass/fail (default true).

  • model / agent / variant / profile / files / session / continue_session / auto_approve: same as delegate_task.

  • response_format ('markdown' | 'json'): Output format (default 'markdown').

See also: delegate_task — same shape, general-purpose; its required field is named task instead of scope.

Returns the same structured content shape as delegate_task.

list_modelsA

List provider/model ids that OpenCode can use, in "provider/model" form (e.g. "minimax-coding-plan/MiniMax-M2.5-highspeed"). Optionally filter to a single provider. Use these ids for the model argument of delegate_task or as default_model in set_delegate_config.

Args:

  • provider (string): Optional provider id to filter by (e.g. "minimax-coding-plan", "openrouter").

  • contains (string): Optional case-insensitive substring filter.

  • limit (number): Max ids to return (default 200).

  • response_format ('markdown' | 'json'): Output format (default 'markdown').

get_delegate_configA

Return the current delegate configuration (default model/provider, agent, variant, auto-approve, timeout, default directory, and named profiles) plus the config file path. Read-only.

set_delegate_configA

Change the active delegation settings at runtime — this is how you dynamically switch the cheap model or provider without reinstalling. Only the fields you pass are updated. Returns the updated config.

Args (all optional):

  • default_model (string): provider/model used when a call omits one, e.g. "openrouter/minimax/minimax-m2.5".

  • default_agent (string): default OpenCode agent.

  • default_variant (string): default reasoning-effort variant.

  • auto_approve (boolean): auto-approve tool permissions for delegations.

  • timeout_ms (number): per-delegation timeout in milliseconds.

  • default_directory (string): default working directory.

  • opencode_bin (string): path/name of the opencode binary.

  • profiles (object): map of name -> { model?, agent?, variant?, autoApprove? }. Profiles are MERGED, not replaced — existing ones are kept unless you name them. To ADD or UPDATE a profile, give it a value; to REMOVE one, set its value to null: { "profiles": { "tests": null } }.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

Latest Blog Posts

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/mryesiller/opencode-delegate-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server