fix: stateless /mcp for native MCP client
This commit is contained in:
1 parent
11a0e8b5f4
commit
9b7d20509f
1 file changed
+2
-4
+2
-4
@@ -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) => {
|
||||
|
||||
Reference in new issue
Block a user