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
Is your feature request related to a problem? Please describe.
When using the client SDK to connect MCP server behind an API gateway that adds a deployment-specific prefix (e.g., /gateway_prefix/<deployment_name>), the backend mcp server is unaware of this prefix and only exposes routes like /v1/sse and /v1/messages. The client SDK currently only supports url and uses urljoin to resolve endpoint URLs, which causes the gateway prefix to be dropped when joining paths that start with /. This results in incorrect routing through the gateway.
Describe the solution you'd like
The client SDK should preserve the gateway prefix when joining endpoint URLs, so that requests are routed correctly through the gateway. Ideally, the SDK should provide a way to configure or detect the gateway prefix and ensure all endpoint URLs are constructed with it.
Uh oh!
There was an error while loading. Please reload this page.
Is your feature request related to a problem? Please describe.
When using the client SDK to connect MCP server behind an
API gateway
that adds a deployment-specific prefix (e.g.,/gateway_prefix/<deployment_name>
), the backend mcp server is unaware of this prefix and only exposes routes like/v1/sse
and/v1/messages
. The client SDK currently only supports url and uses urljoin to resolve endpoint URLs, which causes the gateway prefix to be dropped when joining paths that start with /. This results in incorrect routing through the gateway.debug logs:
Describe the solution you'd like
The client SDK should preserve the gateway prefix when joining endpoint URLs, so that requests are routed correctly through the gateway. Ideally, the SDK should provide a way to configure or detect the gateway prefix and ensure all endpoint URLs are constructed with it.
Describe alternatives you've considered
Additional context
Example:
This is a common pattern for API gateways and reverse proxies, so supporting this would improve compatibility.
similar request:
#412 (comment)
#733
#386
The text was updated successfully, but these errors were encountered: