#99

Streamable HTTP also needs a GET/DELETE request for notifications and messages from the server

Openpaoloricciutiopened 1y ago

In the code for the mcp handler there's these lines

https://github.com/vercel/mcp-adapter/blob/0b92b2e915108e24cefb9df5667f6befff840737/src/handler/mcp-api-handler.ts#L270-L298

However this is wrong: the GET method is used by the mcp client to instantiate an SSE connection so that the server can send notifications and messages (like elicitation/sampling/roots) to the client.

DELETE is even worse because that's the request sent when the client disconnects from the server.

I suppose the stremamable http would need the same kind of treatment as the SSE transport with REDIS acting as a pub/sub to send the notifications and messages back to the client.

Activity

4
JoseCToscano1y ago

I'm also facing this, even after setting disableSse: true. MCP works fine, but seing the /GET 405 error is kind of annoying

paoloricciuti1y ago

I'm also facing this, even after setting disableSse: true. MCP works fine, but seing the /GET 405 error is kind of annoying

It will also not work if you want to use more complex features like elicitation, sampling or even if you want to send some notification

JoseCToscano1y ago

Have you found any workaround for that?

paoloricciuti1y ago

Have you found any workaround for that?

Unfortunately with this library there's no way currently...you can check out https://github.com/paoloricciuti/tmcp which is an SDK I'm building for MCP servers and it uses request and response natively