This commit is contained in:
David Soria Parra
2025-05-29 12:04:05 +01:00
parent d53d6cc75c
commit 2dc1a34b75
5 changed files with 74 additions and 4129 deletions

View File

@@ -28,7 +28,7 @@ app.post('/mcp', async (req: Request, res: Response) => {
transport = new StreamableHTTPServerTransport({
sessionIdGenerator: () => randomUUID(),
eventStore, // Enable resumability
onsessioninitialized: (sessionId) => {
onsessioninitialized: (sessionId: string) => {
// Store the transport by session ID when session is initialized
// This avoids race conditions where requests might come in before the session is stored
console.error(`Session initialized with ID: ${sessionId}`);