Description
Description
opencode v1.3.17 fails to load tools from MCP servers whose tools/list response includes the outputSchema field on tool definitions. The server is marked as failed with "Failed to get tools".
outputSchema is a valid optional field in the MCP specification and is defined in the bundled SDK's ToolSchema.
Steps to Reproduce
- Set up any MCP server (stdio transport) that returns outputSchema on its tools in the tools/list response
- Configure it in opencode as a local MCP server
- Start opencode — the server fails with "Failed to get tools"
Observed Behavior
- The MCP server starts, initialize handshake completes successfully
- tools/list returns a valid response with all tools
- opencode immediately closes the connection after receiving the response
- Server is marked as failed
Expected Behavior
Tools should load successfully. Removing outputSchema from the response (via a wrapper script) resolves the issue — all tools load and work correctly.
Environment
- opencode: v1.3.17
- OS: Windows 11
- MCP transport: stdio (local)
- Server protocol version: 2025-06-18
- Bundled @modelcontextprotocol/sdk: v1.27.1
Plugins
No response
OpenCode version
1.3.17
Steps to reproduce
No response
Screenshot and/or share link
No response
Operating System
windows 11
Terminal
windows terminal
Description
Description
opencode v1.3.17 fails to load tools from MCP servers whose tools/list response includes the outputSchema field on tool definitions. The server is marked as failed with "Failed to get tools".
outputSchema is a valid optional field in the MCP specification and is defined in the bundled SDK's ToolSchema.
Steps to Reproduce
Observed Behavior
Expected Behavior
Tools should load successfully. Removing outputSchema from the response (via a wrapper script) resolves the issue — all tools load and work correctly.
Environment
Plugins
No response
OpenCode version
1.3.17
Steps to reproduce
No response
Screenshot and/or share link
No response
Operating System
windows 11
Terminal
windows terminal