Skip to content llms.txt

OpenCode — MCP Configs

File format
JSON with comments
Discovery paths
opencode.json, opencode.jsonc
Syllago install method
JSON merge
Symlink support
No
Config file
opencode.json
Transports
stdio

Features

How each feature converts to syllago's canonical format. See format conversion for what these statuses mean.

Fields

Native frontmatter or config fields this provider exposes. The first column is the provider's own field name; the canonical key column links to syllago's cross-provider equivalent.

Config keyConversionCanonical keySummary
enabled Translated Conversion type: Translated Actively mapped to the target provider’s equivalent field during conversion. Learn more → Each MCP server entry supports an enabled boolean flag to temporarily disable a server without removing its configuration. Defaults to enabled.
type Translated Conversion type: Translated Actively mapped to the target provider’s equivalent field during conversion. Learn more → Local MCP servers are launched via a command array (command field) with optional environment variables (environment field). Communicate over stdio. Type must be set to local.
type Translated Conversion type: Translated Actively mapped to the target provider’s equivalent field during conversion. Learn more → Remote MCP servers are connected via URL (url field) with optional headers object. Type must be set to remote. Supports OAuth 2.0 and custom authorization headers.
oauth Embedded Conversion type: Embedded No canonical equivalent — appended as prose in a conversion notes block so nothing is silently lost. Learn more → Remote servers support an oauth configuration object with clientId, clientSecret, and scope fields for pre-registered client credentials. Setting oauth: false disables automatic OAuth detection for servers using API keys.
timeout Embedded Conversion type: Embedded No canonical equivalent — appended as prose in a conversion notes block so nothing is silently lost. Learn more → The timeout field (in milliseconds, default 5000) controls how long OpenCode waits for the MCP server to respond with its tool list on startup.

Other features

Behaviors, conventions, and capabilities that aren't tied to a single named field — things like path-based activation, discovery rules, and lifecycle behavior.

FeatureConversionSummary
enterprise_management Translated Conversion type: Translated Actively mapped to the target provider’s equivalent field during conversion. Learn more → Organizations can provide default MCP server configurations via a .well-known/opencode endpoint; users can override remote defaults in their local opencode.json; local config values take precedence over remote defaults
env_var_expansion Translated Conversion type: Translated Actively mapped to the target provider’s equivalent field during conversion. Learn more → Remote MCP server headers and OAuth fields support {env:VAR_NAME} syntax for environment variable interpolation; local servers accept an environment object with key-value pairs
JSONC config file format Translated Conversion type: Translated Actively mapped to the target provider’s equivalent field during conversion. Learn more → MCP servers are configured under the mcp key in opencode.json or opencode.jsonc at the project root or ~/.config/opencode/. JSONC allows comments.
oauth_support Translated Conversion type: Translated Actively mapped to the target provider’s equivalent field during conversion. Learn more → Remote MCP servers support OAuth 2.0 authentication with Dynamic Client Registration (RFC 7591). OpenCode auto-detects 401 responses and initiates the OAuth flow, storing tokens in ~/.local/share/opencode/mcp-auth.json. Pre-registered client credentials can be supplied via the oauth object (clientId, clientSecret, scope). OAuth can be disabled per-server by setting oauth: false.
tool_filtering Translated Conversion type: Translated Actively mapped to the target provider’s equivalent field during conversion. Learn more → MCP tools are filtered via the global tools map in opencode.json using the server name as a prefix (e.g., mymcpservername_*: false); glob patterns (* and ?) are supported; per-agent tool access is controlled via the agent's permission or tools map
transport_types Translated Conversion type: Translated Actively mapped to the target provider’s equivalent field during conversion. Learn more → OpenCode supports two transport types: local (type: local, launched via command array with stdio communication) and remote (type: remote, connected via URL supporting HTTP/SSE streamable-HTTP)
MCP auth management CLI commands Embedded Conversion type: Embedded No canonical equivalent — appended as prose in a conversion notes block so nothing is silently lost. Learn more → opencode mcp auth <server-name> triggers OAuth browser flow; opencode mcp list shows all servers and auth status; opencode mcp logout <server-name> removes stored credentials; opencode mcp debug <server-name> diagnoses auth and connectivity.
Organization remote MCP defaults Embedded Conversion type: Embedded No canonical equivalent — appended as prose in a conversion notes block so nothing is silently lost. Learn more → Organizations can publish default MCP server configurations via a .well-known/opencode HTTP endpoint. Users can opt-in to specific servers by enabling them in their local config; local config overrides remote defaults.

Sources

Source
https://opencode.ai/docs/mcp-servers/