From b5819aef74baf995781819066fabb5bda087e56a Mon Sep 17 00:00:00 2001 From: Amirul Islam Redwan Date: Mon, 21 Sep 2026 03:28:30 +0600 Subject: [PATCH] fix(http): return application/json for POST (enableJsonResponse) SSE-only responses broke MCP registries/clients (e.g. Glama connector test) that do not consume the event stream. JSON is the widely-compatible default; SSE stays available on GET. --- src/http.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/http.ts b/src/http.ts index 22f434b..69ce27b 100644 --- a/src/http.ts +++ b/src/http.ts @@ -100,6 +100,9 @@ app.post("/mcp", async (req: Request, res: Response) => { const server = buildMcpServer(registry); transport = new StreamableHTTPServerTransport({ sessionIdGenerator: () => randomUUID(), + // Return application/json for POST responses instead of SSE — far more compatible with + // MCP clients/registries (e.g. Glama's connector test) that don't consume the event stream. + enableJsonResponse: true, onsessioninitialized: (sid) => { sessions.set(sid, { transport, lastActiveAt: Date.now() }); },