Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions apps/mcp/app/api/mcp/[transport]/route.ts
Original file line number Diff line number Diff line change
@@ -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";
Expand All @@ -16,6 +24,7 @@ const handler = createMcpHandler(
},
{
basePath: "/api/mcp",
disableSse: true,
}
);

Expand Down
Loading