Open
Description
Issue:
Clients (Inspector/Cherry Studio) fail to connect when MCP Server uses a subpath (e.g., http://domain.com/subpath/sse
). Root paths (http://domain.com/
) work normally.
Reproduce:
- Start MCP Server at
http://domain.com/subpath/sse
- Client connection fails with error:
Error POSTing to endpoint (HTTP 503): no healthy upstream
Cause:
In sse.ts#L146
, new URL()
discards the subpath from the server URL. Example:
Request to /messages/
becomes http://domain.com/messages/
instead of http://domain.com/subpath/messages/
.