{"record":{"id":"bcefe2ce93282f75","repo":"mastra-ai/mastra","slug":"mcpclientserverproxy-does-not-support-hono-sse-tra","errorCode":null,"errorMessage":"MCPClientServerProxy does not support Hono SSE transport","messagePattern":"MCPClientServerProxy does not support Hono SSE transport","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/mcp/src/client/server-proxy.ts","lineNumber":200,"sourceCode":"    const result = await client.resources.read(uri);\n    return {\n      contents: (result.contents ?? []).map((c: any) => ({\n        uri: c.uri ?? uri,\n        ...(c.text !== undefined ? { text: c.text } : {}),\n        ...(c.blob !== undefined ? { blob: c.blob } : {}),\n      })),\n    };\n  }\n\n  // Transport methods — not applicable for client proxies\n  public async startStdio(): Promise<void> {\n    throw new Error('MCPClientServerProxy does not support stdio transport');\n  }\n  public async startSSE(_options: MCPServerSSEOptions): Promise<void> {\n    throw new Error('MCPClientServerProxy does not support SSE transport');\n  }\n  public async startHonoSSE(_options: MCPServerHonoSSEOptions): Promise<Response | undefined> {\n    throw new Error('MCPClientServerProxy does not support Hono SSE transport');\n  }\n  public async startHTTP(_options: MCPServerHTTPOptions): Promise<void> {\n    throw new Error('MCPClientServerProxy does not support HTTP transport');\n  }\n  public async close(): Promise<void> {\n    this.cachedClient = null;\n  }\n\n  public getServerInfo(): ServerInfo {\n    return {\n      id: this.id,\n      name: this.name,\n      description: this.description,\n      version_detail: {\n        version: this.version,\n        release_date: this.releaseDate,\n        is_latest: this.isLatest,\n      },","sourceCodeStart":182,"sourceCodeEnd":218,"githubUrl":"https://github.com/mastra-ai/mastra/blob/75dd419e613fe9c39f846ffc500716141b74fda6/packages/mcp/src/client/server-proxy.ts#L182-L218","documentation":"startHonoSSE() serves an MCP server over SSE inside a Hono app; MCPClientServerProxy is a client-side wrapper and cannot host any HTTP endpoint, so it throws unconditionally. It exists only to satisfy the MCPServer interface shape.","triggerScenarios":"Calling startHonoSSE(options) on an MCPClientServerProxy, typically when uniformly registering all servers (real and proxied) as Hono routes.","commonSituations":"Auto-mounting every entry of MCPClients.getStandardServers()/registry onto a Hono app; mixing client connections with server hosting in shared bootstrap code.","solutions":["Call startHonoSSE() only on MCPServer instances","Skip client proxies via instanceof check before mounting routes","Remove the mount call — remote servers are already reachable via the proxy client"],"exampleFix":"// before\napp.route('/mcp', createRoute(proxy.startHonoSSE.bind(proxy)));\n// after\nif (!(proxy instanceof MCPClientServerProxy)) proxy.startHonoSSE({ path: '/mcp' });","handlingStrategy":"validation","validationCode":"if (proxy instanceof MCPClientServerProxy) throw new Error('startHonoSSE is only valid on MCPServer instances');","typeGuard":"function isHonoMountable(s: unknown): s is MCPServer {\n  return !(s instanceof MCPClientServerProxy);\n}","tryCatchPattern":"try {\n  await maybeServer.startHonoSSE(opts);\n} catch (e) {\n  if (e instanceof Error && e.message.includes('does not support Hono SSE transport')) return undefined;\n  throw e;\n}","preventionTips":["Only mount genuine MCPServer instances as Hono routes","Skip MCPClientServerProxy entries when iterating a mixed registry","Keep server hosting and client consumption in separate code paths"],"tags":["mcp","unsupported-transport","hono","sse","client-proxy"],"backgroundTag":"unsupported-transport","analyzedSha":"75dd419e613fe9c39f846ffc500716141b74fda6","analyzedAt":"2026-08-30T00:15:31.844Z","schemaVersion":2},"datasetVersion":"2026-08-30T03:17:51.788Z"}