revert: back to stateful /mcp

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