inspector icon indicating copy to clipboard operation
inspector copied to clipboard

MCP_PROXY_FULL_ADDRESS is respected for /sse request but not /message

Open geisbruch opened this issue 5 months ago • 1 comments

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

  1. Set MCP_PROXY_FULL_ADDRESS to a URL with a base path (e.g., https://example.com/inspector/mcp_proxy)
  2. Start the MCP inspector
  3. Observe network requests:
    • /sse requests correctly include the base path
    • /message requests 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 avatar Jul 18 '25 22:07 geisbruch

@geisbruch Can you confirm if this is working in your setup?

richardkmichael avatar Nov 29 '25 22:11 richardkmichael