Feature hasn't been suggested before.
Describe the enhancement you want to request
OpenCode's MCP client features are way behind the latest MCP standard. The gaps below were touched across many issues and PRs. I myself also encountered many difficulties due to the incomplete capability while developing MCP extensions for OpenCode. A one-time implementation is probably the cleanest fix to all of them and leaves no technical debt. This should also bring architectural advantages by flattening skills and tasks into the MCP layer.
I know this proposal for a project of this size might be a bit unreal. Rewriting the MCP client would definitely break loads of plugins and dependents, and the migration wouldn't be easy. Even so, the count of issues on this is large enough that I think the discussion is at least worth having.
Behavioral gaps
Missing entirely:
sampling/createMessage and the sampling capability1
elicitation/create (form + URL modes), notifications/elicitation/complete, URLElicitationRequiredError -32042, and the elicitation capability2
roots/list, notifications/roots/list_changed, and the roots capability3
resources/subscribe / resources/unsubscribe / notifications/resources/updated / notifications/resources/list_changed4
resources/templates/list5
completion/complete6
logging/setLevel and notifications/message7
ping8
- The entire experimental
tasks/* system from 2025-11-259
- No
capabilities object passed to new Client(...) — opencode advertises nothing at initialize10
Partial or incorrect:
- Progress:
resetTimeoutOnProgress: true is passed to callTool, but onprogress is never wired through, so no progress token is ever sent and the timeout never resets in practice11
- Cancellation:
notifications/cancelled is never sent when a user aborts a tool call12
- Pagination:
tools/list, resources/list, prompts/list are called without cursors; large lists silently truncate
- Tool results:
structuredContent is ignored14; outputSchema is stripped via TolerantListToolsResultSchema rather than validated15; resource_link16 and audio17 content types are dropped
- Tool annotations (
readOnlyHint, destructiveHint, idempotentHint, openWorldHint)18 and icons[]19 are not consumed
tools/list_changed is the only notification handled20
- The server's
InitializeResult.instructions field is fetched but never threaded into the LLM context, so the server's own usage hints are lost21
Authorization:
- Token refresh:
refreshToken is stored but never executed — tokens silently expire22
- RFC 8707 resource indicators: not sent23
- RFC 9728 protected resource metadata: no explicit
WWW-Authenticate resource_metadata parsing24
- OpenID Connect Discovery 1.0 (added in
2025-11-25 as a second discovery option): not implemented25
- Client ID Metadata Documents: not implemented26
- Step-up authorization (
insufficient_scope re-auth): not implemented27
- Configured
oauth.scope is not threaded into client metadata28
- OAuth callback server (port
19876) is not stopped after auth completes
- OAuth callback page has unescaped
error query parameter (XSS / CWE-79)
headers config is not sent during mcp auth / mcp debug
Networking:
- Streamable HTTP
Accept header doesn't always list both application/json and text/event-stream29
MCP-Protocol-Version header is not explicitly set; opencode mcp debug hardcodes protocolVersion: "2024-11-05" (three revisions behind)30
Mcp-Session-Id is not handled; session loss permanently breaks the connection31
Last-Event-ID resumption is not implemented32
- No transport-level auto-reconnect on socket errors29
- Local stdio servers leak processes on disconnect / replace / rollback33
- Origin header validation, SSRF protection, and session-hijacking mitigations from the spec's Security Best Practices are not implemented34
Related issues and PRs
Sampling:
Elicitation:
Resources (subscriptions, templates, model-invoked):
Prompts:
Progress:
Cancellation:
Structured content / outputSchema / resource_link:
OAuth / auth:
Transport / Streamable HTTP / SSE:
Connection lifecycle / reconnect / stdio leaks:
Custom / dynamic headers:
Server notifications / _meta / logging:
TLS / mTLS / cert validation:
Windows-specific
Schema:
Performance:
Feature hasn't been suggested before.
Describe the enhancement you want to request
OpenCode's MCP client features are way behind the latest MCP standard. The gaps below were touched across many issues and PRs. I myself also encountered many difficulties due to the incomplete capability while developing MCP extensions for OpenCode. A one-time implementation is probably the cleanest fix to all of them and leaves no technical debt. This should also bring architectural advantages by flattening skills and tasks into the MCP layer.
I know this proposal for a project of this size might be a bit unreal. Rewriting the MCP client would definitely break loads of plugins and dependents, and the migration wouldn't be easy. Even so, the count of issues on this is large enough that I think the discussion is at least worth having.
Behavioral gaps
Missing entirely:
sampling/createMessageand thesamplingcapability1elicitation/create(form + URL modes),notifications/elicitation/complete,URLElicitationRequiredError -32042, and theelicitationcapability2roots/list,notifications/roots/list_changed, and therootscapability3resources/subscribe/resources/unsubscribe/notifications/resources/updated/notifications/resources/list_changed4resources/templates/list5completion/complete6logging/setLevelandnotifications/message7ping8tasks/*system from2025-11-259capabilitiesobject passed tonew Client(...)— opencode advertises nothing atinitialize10Partial or incorrect:
resetTimeoutOnProgress: trueis passed tocallTool, butonprogressis never wired through, so no progress token is ever sent and the timeout never resets in practice11notifications/cancelledis never sent when a user aborts a tool call12tools/list,resources/list,prompts/listare called without cursors; large lists silently truncate13structuredContentis ignored14;outputSchemais stripped viaTolerantListToolsResultSchemarather than validated15;resource_link16 andaudio17 content types are droppedreadOnlyHint,destructiveHint,idempotentHint,openWorldHint)18 andicons[]19 are not consumedtools/list_changedis the only notification handled20InitializeResult.instructionsfield is fetched but never threaded into the LLM context, so the server's own usage hints are lost21Authorization:
refreshTokenis stored but never executed — tokens silently expire22WWW-Authenticateresource_metadataparsing242025-11-25as a second discovery option): not implemented25insufficient_scopere-auth): not implemented27oauth.scopeis not threaded into client metadata2819876) is not stopped after auth completeserrorquery parameter (XSS / CWE-79)headersconfig is not sent duringmcp auth/mcp debugNetworking:
Acceptheader doesn't always list bothapplication/jsonandtext/event-stream29MCP-Protocol-Versionheader is not explicitly set;opencode mcp debughardcodesprotocolVersion: "2024-11-05"(three revisions behind)30Mcp-Session-Idis not handled; session loss permanently breaks the connection31Last-Event-IDresumption is not implemented32Related issues and PRs
Sampling:
Elicitation:
Resources (subscriptions, templates, model-invoked):
Prompts:
prompts/listandresources/listmethods #24985Progress:
onprogresstocallTool, so progress notifications can't extend the request timeout #28186Cancellation:
Structured content / outputSchema / resource_link:
OAuth / auth:
opencode mcp authdoes not print authorize URL to terminal, making it unusable over SSH #23951Transport / Streamable HTTP / SSE:
Connection lifecycle / reconnect / stdio leaks:
Custom / dynamic headers:
Server notifications /
_meta/ logging:TLS / mTLS / cert validation:
Windows-specific
Schema:
_placeholderparam causing ZodError in Supabase MCP + empty response in PythonAnywhere MCP #15041Performance:
Footnotes
https://modelcontextprotocol.io/specification/2025-11-25/client/sampling ↩
https://modelcontextprotocol.io/specification/2025-11-25/client/elicitation ↩
https://modelcontextprotocol.io/specification/2025-11-25/client/roots ↩
https://modelcontextprotocol.io/specification/2025-11-25/server/resources#subscriptions ↩
https://modelcontextprotocol.io/specification/2025-11-25/server/resources#resource-templates ↩
https://modelcontextprotocol.io/specification/2025-11-25/server/utilities/completion ↩
https://modelcontextprotocol.io/specification/2025-11-25/server/utilities/logging ↩
https://modelcontextprotocol.io/specification/2025-11-25/basic/utilities/ping ↩
https://modelcontextprotocol.io/specification/2025-11-25/basic/utilities/tasks ↩
https://modelcontextprotocol.io/specification/2025-11-25/basic/lifecycle#capability-negotiation ↩
https://modelcontextprotocol.io/specification/2025-11-25/basic/utilities/progress ↩
https://modelcontextprotocol.io/specification/2025-11-25/basic/utilities/cancellation ↩
https://modelcontextprotocol.io/specification/2025-11-25/server/utilities/pagination ↩
https://modelcontextprotocol.io/specification/2025-11-25/server/tools#structured-content ↩
https://modelcontextprotocol.io/specification/2025-11-25/server/tools#output-schema ↩
https://modelcontextprotocol.io/specification/2025-11-25/server/tools#resource-links ↩
https://modelcontextprotocol.io/specification/2025-11-25/server/tools#tool-result ↩
https://modelcontextprotocol.io/specification/2025-11-25/server/tools#tool ↩
https://modelcontextprotocol.io/specification/2025-11-25/basic#icons ↩
https://modelcontextprotocol.io/specification/2025-11-25/server/tools#list-changed-notification ↩
https://modelcontextprotocol.io/specification/2025-11-25/basic/lifecycle#initialization ↩
https://modelcontextprotocol.io/specification/2025-11-25/basic/authorization ↩
https://modelcontextprotocol.io/specification/2025-11-25/basic/authorization#resource-parameter-implementation ↩
https://modelcontextprotocol.io/specification/2025-11-25/basic/authorization#authorization-server-discovery ↩
https://modelcontextprotocol.io/specification/2025-11-25/basic/authorization#authorization-server-metadata-discovery ↩
https://modelcontextprotocol.io/specification/2025-11-25/basic/authorization#client-id-metadata-documents ↩
https://modelcontextprotocol.io/specification/2025-11-25/basic/authorization#scope-challenge-handling ↩
https://modelcontextprotocol.io/specification/2025-11-25/basic/authorization#scope-selection-strategy ↩
https://modelcontextprotocol.io/specification/2025-11-25/basic/transports#streamable-http ↩ ↩2
https://modelcontextprotocol.io/specification/2025-11-25/basic/transports#protocol-version-header ↩
https://modelcontextprotocol.io/specification/2025-11-25/basic/transports#session-management ↩
https://modelcontextprotocol.io/specification/2025-11-25/basic/transports#resumability-and-redelivery ↩
https://modelcontextprotocol.io/specification/2025-11-25/basic/transports#stdio ↩
https://modelcontextprotocol.io/specification/2025-11-25/basic/security_best_practices ↩