Skip to main content
Glama

opencode_mcp_server

Manage OpenCode MCP servers: check status, add and connect servers, disconnect, and handle authentication flows.

Instructions

Manage MCP servers within OpenCode. Actions: status (all server statuses), add (register new server), connect (connect to server), disconnect (disconnect from server), auth_remove (remove auth), auth_start (start auth flow), auth_callback (complete auth with code), auth_authenticate (authenticate with server).

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "action": "<action>"
    },
    "name": "opencode_mcp_server"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeNoAuthorization code (for auth_callback)
nameNoMCP server name (required for most actions except status)
actionYes
configNoJSON — McpLocalConfig or McpRemoteConfig (for add)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are supplied, so the description carries the full behavioral burden. It discloses nothing beyond the action list already present in the enum: it does not say what auth_remove destroys, whether disconnect affects running sessions, what permissions are needed, or whether auth flows require user interaction or token output. For a tool that includes mutations and credential operations, that is a significant gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded in one sentence, followed by a compact action enumeration, with no filler. The action list is dense but every item maps to a real enum value, so little is wasted.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an eight-action tool with no annotations and no output schema, the definition is thin: the result of 'status', the sequencing of the three auth actions, and the side effects or failure modes of add/connect/disconnect/auth_remove are all unstated. An agent could pick an action but would be guessing about its consequences and expected inputs.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 75% and the only undocumented parameter is 'action', whose enum values the description does explain via parentheticals, so it does add some meaning. However, it says nothing extra about the 'config' JSON shape (McpLocalConfig vs McpRemoteConfig) or the relationship between 'code' and auth_callback beyond what the schema already states.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific resource ('MCP servers within OpenCode') and enumerates the eight supported actions with short parentheticals, so an agent can tell it is a multi-action MCP-server management tool rather than a generic config tool. It does not explicitly contrast itself with siblings such as opencode_config or opencode_auth, which is why it is not a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The action parentheticals give implied usage for each action, but there is no guidance on ordering or prerequisites (for example, whether a server must be connected before auth_start, or whether add precedes connect), and no statement about when to use this tool versus opencode_auth or opencode_config. Usage can be inferred, but nothing is explicit.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.