Skip to content

Commit 84ca647

Browse files
committed
init message to follow normal request path
1 parent 4e0c283 commit 84ca647

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

src/server/streamableHttp.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -197,19 +197,7 @@ export class StreamableHTTPServerTransport implements Transport {
197197
}
198198
this.sessionId = this.sessionIdGenerator();
199199
this._initialized = true;
200-
const headers: Record<string, string> = {};
201200

202-
if (this.sessionId !== undefined) {
203-
headers["mcp-session-id"] = this.sessionId;
204-
}
205-
206-
// Process initialization messages before responding
207-
for (const message of messages) {
208-
this.onmessage?.(message);
209-
}
210-
211-
res.writeHead(200, headers).end();
212-
return;
213201
}
214202
// If an Mcp-Session-Id is returned by the server during initialization,
215203
// clients using the Streamable HTTP transport MUST include it

0 commit comments

Comments
 (0)