fix: stateless /mcp for native MCP client

This commit is contained in:
hermes committed 2026-07-10 04:06:12 +02:00
1 parent 11a0e8b5f4
commit 9b7d20509f
1 file changed
+2 -4
+2 -4
View File
@@ -594,10 +594,8 @@ function errResp(text) {
// Traditional SSE transport sessions (for Figma / older MCP clients)
const sseSessions = new Map();
// Stateful Streamable HTTP transport (for Cursor / modern clients)
const mcpTransport = new StreamableHTTPServerTransport({
sessionIdGenerator: () => crypto.randomUUID(),
});
// Stateless Streamable HTTP transport (compatible with native MCP clients)
const mcpTransport = new StreamableHTTPServerTransport({ sessionIdGenerator: undefined });
await mcpServer.connect(mcpTransport);
const httpServer = http.createServer(async (req, res) => {