MCP_PROXY_FULL_ADDRESS is respected for /sse request but not /message
MCP_PROXY_FULL_ADDRESS is respected for /sse request but not /message
Summary
The MCP_PROXY_FULL_ADDRESS environment variable is not consistently applied across all API endpoints. While the /sse endpoint correctly uses the full proxy address including the base path, the /message endpoint ignores the base path and makes requests directly to the root domain.
Environment
- Inspector Proxy Address:
https://mcp-test-new-server-development-puvbs.ey-poc.nullapps.io/inspector/mcp_proxy - MCP_PROXY_FULL_ADDRESS configured with full path including
/inspector/mcp_proxy
Expected Behavior
Both /sse and /message endpoints should respect the full proxy address specified in MCP_PROXY_FULL_ADDRESS, including any base path.
Actual Behavior
- ✅ /sse endpoint (working correctly): Makes requests to
https://mcp-test-new-server-development-puvbs.ey-poc.nullapps.io/inspector/mcp_proxy/sse - ❌ /message endpoint (incorrect behavior): Makes requests to
https://mcp-test-new-server-development-puvbs.ey-poc.nullapps.io/message(base path is stripped)
Steps to Reproduce
- Set
MCP_PROXY_FULL_ADDRESSto a URL with a base path (e.g.,https://example.com/inspector/mcp_proxy) - Start the MCP inspector
- Observe network requests:
/sserequests correctly include the base path/messagerequests strip the base path and go directly to the root domain
Impact
This inconsistency breaks functionality when the MCP proxy is hosted with a base path, as /message requests fail to reach the correct endpoint.
Suggested Fix
Ensure that both /sse and /message endpoints use the complete URL from MCP_PROXY_FULL_ADDRESS when constructing their request URLs.
@geisbruch Can you confirm if this is working in your setup?