You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Wrong data path when MCP server mounted as ASGI SSE app under some subpath #464
When I setup MCP server as a SSE app under some subpath in existing ASGI app, in response to /my/sub/path/sse, I receive wrong endpoint path in data: (missing /my/sub/path prefix). For example if SSE app is mounted under /mcp/test and I call /mcp/test/sse in response I receive:
Then MCP client tries to call http://localhost:8080/messages/?session_id=e01cc317d1cd48fdb305a8074cee2134 which does not exist. I believe this is not an issue if MPC server is mounted under root path /, but with subpath it is returning wrong data path.
Side note: There is example of this process in this repo readme but what is the point of mounting app into existing asgi server under /? It will override all routes of existing app, no?
To Reproduce
fromfastapiimportFastAPIfrommcp.serverimportFastMCP# Create a server instanceserver=FastMCP("quoting-mcp")
app=FastAPI()
app.mount('/mcp/test', server.sse_app())
Activity
felixweinberger commentedon Oct 3, 2025
We had a lot of changes regarding mount paths and given this issue hasn't had activity in a while I'm going to close it for now.
If this is still an issue please feel free to reopen and confirm whether the shared repro still applies!