From 91c5c03a76b0fd040f60fdcf7a5ea07b5becb00e Mon Sep 17 00:00:00 2001 From: Valeriy_Pavlovich Date: Sat, 15 Nov 2025 18:00:21 +0300 Subject: [PATCH 1/2] fix: send SSE connection notice as notifications/message - Replace custom "sse/connection" notification with standard "notifications/message" - Use params {level: "info", data: "SSE Connection established"} to match MCP logging schema - Avoid pydantic validation errors for unexpected notification method/shape (issue #33) --- src/startHTTPServer.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/startHTTPServer.ts b/src/startHTTPServer.ts index b161804..e879b0f 100644 --- a/src/startHTTPServer.ts +++ b/src/startHTTPServer.ts @@ -718,8 +718,8 @@ const handleSSERequest = async ({ await transport.send({ jsonrpc: "2.0", - method: "sse/connection", - params: { message: "SSE Connection established" }, + method: "notifications/message", + params: { level: "info", data: "SSE Connection established" }, }); if (onConnect) { From d48638cff4a385c74a24e0c1b58b1a93a72fc8f2 Mon Sep 17 00:00:00 2001 From: Valeriy_Pavlovich Date: Sun, 16 Nov 2025 07:50:44 +0300 Subject: [PATCH 2/2] sse: fix connection notification and satisfy lint - Send SSE connection notification as a spec-compliant `notifications/message` with {data, level} payload - Order params keys as {data, level} to comply with eslint-perfectionist/sort-objects --- src/startHTTPServer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/startHTTPServer.ts b/src/startHTTPServer.ts index e879b0f..478b3aa 100644 --- a/src/startHTTPServer.ts +++ b/src/startHTTPServer.ts @@ -719,7 +719,7 @@ const handleSSERequest = async ({ await transport.send({ jsonrpc: "2.0", method: "notifications/message", - params: { level: "info", data: "SSE Connection established" }, + params: { data: "SSE Connection established", level: "info" }, }); if (onConnect) {