fix: STDIO and SSE transports need MCP_FULL_PROXY_ADDRESS #708
+161
−7
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation and Context
#630
The MCP client needs to know the full path to the proxy server when opening the SSE transport for STDIO and SSE endpoints.
The client knows where it expects to see the server, so pass this to the server, to use when building the endpoint.
How Has This Been Tested?
Start nginx as proxy for the backed. Using an nginx proxy:
nginx -c inspector.conf
(below).Open the Inspector, set the Inspector Proxy Address to a URL through nginx:
http://localhost:9000/mcp/inspector/backend
.Breaking Changes
No
Types of changes
Checklist
Additional context
There are other ways to fix this, but my hunch is treating the client as authoritative will be most flexible different deployment scenarios, and also prevent a server-side / client-side configuration mismatch.
Also, I'd add a server test for this, but there are no server tests at the moment. Are server tests desired?
Issue #437 is related, for which there is a fix in a fork, not yet submitted as a PR. It looks like the right approach, appending to the query params from the env. This would close out the current proxy-related issues.