github mksglu/context-mode v1.0.50
1.0.50

latest release: v1.0.51
11 hours ago

Fix: MCP server not working on OpenCode (#168)

Root cause

OpenCode calls prompts/list and resources/list on ALL MCP servers unconditionally, regardless of advertised capabilities. Our server had no handlers for these methods, so the MCP SDK returned -32601 Method not found. This error poisons the SDK transport layer — subsequent listTools() calls fail, the client gets permanently deleted, and all 9 tools become unusable.

Fix

Register empty prompts/resources/resourceTemplates handlers that return { prompts: [] }, { resources: [] }, { resourceTemplates: [] }. The -32601 error never occurs, transport stays healthy.

Evidence

  • OpenCode source: packages/opencode/src/mcp/index.tslistPrompts() in .catch() but -32601 damages SDK transport
  • MCP SDK: Protocol._onrequest() returns -32601 when no handler registered
  • Our server: only registered tools (9), no prompts/resources handlers

Don't miss a new context-mode release

NewReleases is sending notifications on new releases.