| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
The mount_path parameter added in PR #540 was redundant because the SSE transport already handles sub-path mounting via ASGI's standard root_path mechanism. When using Starlette's Mount("/path", app=mcp.sse_app()), Starlette automatically sets root_path in the ASGI scope. The SseServerTransport already uses this to construct the correct message endpoint path (see sse.py lines 148-161). This revert removes: - mount_path setting from Settings class - mount_path parameter from FastMCP.__init__ - mount_path parameter from run() and run_sse_async() - _normalize_path() helper method - mount_path parameter from sse_app() - Related tests and redundant documentation The README documentation is updated to show the correct way to mount multiple MCP servers at different sub-paths, which works out of the box.
There was a problem hiding this comment.
LGTM, but do we need a migration.md line about removing this?
I think it's a breaking change to remove the mount_path argument if someone was using it (even if it was redundant / did nothing).
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Summary
This PR reverts the mount_path parameter added in #540. The parameter was redundant because the SSE transport already handles sub-path mounting via ASGI's standard root_path mechanism.
Why this revert?
When using Starlette's Mount("/path", app=mcp.sse_app()), Starlette automatically sets root_path in the ASGI scope. The SseServerTransport already uses this to construct the correct message endpoint path (see sse.py lines 148-161):
Minimal Reproducible Example
The existing test test_sse_client_basic_connection_mounted_app in tests/shared/test_sse.py already demonstrates this works. Here's a simplified version:
The client connects to /github/sse and the server automatically returns /github/messages/ as the message endpoint - no mount_path configuration needed.
What's removed
What's updated
The README documentation now shows the correct way to mount multiple MCP servers, which works out of the box via ASGI's root_path.