File tree Expand file tree Collapse file tree
packages/server/src/routes Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -62,14 +62,18 @@ export function mcpRoute(deps: McpRouteDeps): Hono {
6262 }
6363
6464 // Pass authInfo to the MCP transport
65- const transport = new WebStandardStreamableHTTPServerTransport ( ) ;
65+ const transport = new WebStandardStreamableHTTPServerTransport ( {
66+ enableJsonResponse : true ,
67+ } ) ;
6668 const server = createMcpServer ( deps . mcpContext ) ;
6769 await server . connect ( transport ) ;
6870 return transport . handleRequest ( c . req . raw , { authInfo } ) ;
6971 }
7072
7173 // No OAuth configured — open access (dev/local mode)
72- const transport = new WebStandardStreamableHTTPServerTransport ( ) ;
74+ const transport = new WebStandardStreamableHTTPServerTransport ( {
75+ enableJsonResponse : true ,
76+ } ) ;
7377 const server = createMcpServer ( deps . mcpContext ) ;
7478 await server . connect ( transport ) ;
7579 return transport . handleRequest ( c . req . raw ) ;
You can’t perform that action at this time.
0 commit comments