diff --git a/src/index.ts b/src/index.ts index c04c1ad..699f1bc 100644 --- a/src/index.ts +++ b/src/index.ts @@ -110,9 +110,9 @@ class OpenRouterMultimodalServer { return; } - // Let the transport handle the SSE stream + // Let the transport handle the SSE stream (no body for GET) const transport = transports[sessionId]; - await transport.handleRequest(req, res); + await transport.handleRequest(req, res, undefined); return; } @@ -174,9 +174,9 @@ class OpenRouterMultimodalServer { transport = transports[sessionId]; } - // Handle the request + // Handle the request - pass body for POST, omit for GET/DELETE try { - await transport.handleRequest(req, res); + await transport.handleRequest(req, res, req.body); } catch (error) { console.error('[MCP] Request handling error:', error); if (!res.headersSent) {