From 4c18234712f147858b8cb99de35a3b670f7ba312 Mon Sep 17 00:00:00 2001 From: tewatia Date: Tue, 24 Jun 2025 00:44:29 +0530 Subject: [PATCH] feat: default streamable_http_path to "/" for consistency Previously, this default was "/mcp", which led to URLs like /mcp/mcp when the base was already mounted at /mcp. Switching to "/" aligns with the TS SDK behavior and prevents double mounting. --- src/mcp/server/fastmcp/server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mcp/server/fastmcp/server.py b/src/mcp/server/fastmcp/server.py index 668c6df82..9d2d7c10f 100644 --- a/src/mcp/server/fastmcp/server.py +++ b/src/mcp/server/fastmcp/server.py @@ -91,7 +91,7 @@ class Settings(BaseSettings, Generic[LifespanResultT]): mount_path: str = "/" # Mount path (e.g. "/github", defaults to root path) sse_path: str = "/sse" message_path: str = "/messages/" - streamable_http_path: str = "/mcp" + streamable_http_path: str = "/" # Mounting MCP under "/" (instead of "/mcp") to avoid nested "/mcp/mcp" # StreamableHTTP settings json_response: bool = False