diff --git a/apps/mcp/app/api/mcp/[transport]/route.ts b/apps/mcp/app/api/mcp/[transport]/route.ts index b5bb131..6675e5b 100644 --- a/apps/mcp/app/api/mcp/[transport]/route.ts +++ b/apps/mcp/app/api/mcp/[transport]/route.ts @@ -1,6 +1,14 @@ // Public MCP endpoint. The dynamic route segment `[transport]` is -// `sse` for Streamable HTTP transport. Tools are registered by -// `lib/tools/register.ts`; this file is just the framework shell. +// `mcp` for the Streamable HTTP transport (the only one we support). +// Tools are registered by `lib/tools/register.ts`; this file is just +// the framework shell. +// +// SSE is intentionally disabled (GHB-189). It was removed from the MCP +// spec on 2025-03-26 (see mcp-handler types) and `mcp-handler`'s SSE +// handler hard-requires a TCP Redis URL — without it the handler +// throws before flushing any HTTP headers, which surfaces to clients +// as a 0-byte connection that hangs until they time out. With +// `disableSse: true` the same path returns a clean 404 instead. import { createMcpHandler } from "mcp-handler"; import { registerAllTools } from "@/lib/tools/register"; @@ -16,6 +24,7 @@ const handler = createMcpHandler( }, { basePath: "/api/mcp", + disableSse: true, } );