Skip to content

Commit 935a63c

Browse files
theletterfclaudecursoragent
authored
fix(mcp): remove GET redirect that blocks Streamable HTTP SSE stream (#2728)
The MapGet("/") redirect on the MCP group root caused an infinite 301 redirect loop for GET requests to /docs/_mcp/. The Streamable HTTP transport uses GET on the same endpoint as POST to open the SSE stream for server-to-client notifications. The redirect intercepted every GET before it could reach the MCP handler, causing Cursor to enter a "fetch failed" reconnect loop and never finish loading tools. Co-authored-by: Claude <claude@anthropic.com> Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 3ed1c05 commit 935a63c

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

  • src/api/Elastic.Documentation.Mcp.Remote

src/api/Elastic.Documentation.Mcp.Remote/Program.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,6 @@
9797
_ = mcp.MapHealthChecks("/health");
9898
_ = mcp.MapHealthChecks("/alive", new HealthCheckOptions { Predicate = r => r.Tags.Contains("live") });
9999
_ = mcp.MapMcp("");
100-
_ = mcp.MapGet("/", () => Results.Redirect(mcpPrefix, permanent: true));
101100

102101
Console.WriteLine("MCP server startup completed successfully");
103102
app.Run();

0 commit comments

Comments
 (0)