Skip to content

Commit 4c18234

Browse files
authored
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.
1 parent 679b229 commit 4c18234

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/mcp/server/fastmcp/server.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ class Settings(BaseSettings, Generic[LifespanResultT]):
9191
mount_path: str = "/" # Mount path (e.g. "/github", defaults to root path)
9292
sse_path: str = "/sse"
9393
message_path: str = "/messages/"
94-
streamable_http_path: str = "/mcp"
94+
streamable_http_path: str = "/" # Mounting MCP under "/" (instead of "/mcp") to avoid nested "/mcp/mcp"
9595

9696
# StreamableHTTP settings
9797
json_response: bool = False

0 commit comments

Comments
 (0)