Skip to content

MCP tools fail to load when outputSchema contains unresolved refs #26529

@nicolascancino

Description

@nicolascancino

Description

OpenCode can mark an MCP server as failed even when the server is reachable and tools/list responds, if one tool's outputSchema contains a reference the MCP SDK cannot resolve.

Observed with Google Stitch MCP on OpenCode 1.14.41:

ERROR service=mcp key=stitch error=can't resolve reference #/$defs/ScreenInstance from id # failed to get tools from client

The server responds to initialize and tools/list, but OpenCode fails while validating/dereferencing the tool schema and then reports the whole MCP server as failed.

Plugins

None relevant.

OpenCode version

1.14.41

Steps to reproduce

  1. Configure Google Stitch as a remote MCP server.
  2. Run opencode mcp list --log-level DEBUG --print-logs.
  3. Observe that the Stitch MCP transport connects, then tool loading fails on an outputSchema $ref.

Screenshot and/or share link

ERROR service=mcp key=stitch error=can't resolve reference #/$defs/ScreenInstance from id # failed to get tools from client

Operating System

macOS

Terminal

zsh

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions