Cluster Route Mapping for Custom Reverse Proxies
If you don't use AtScale's pre-configured nginx and want to route MCP traffic through your own reverse proxy (such as HAProxy, Traefik, a different nginx, Kubernetes Ingress, etc.), you need to forward four path prefixes to the MCP Server on port 3003.
Required routes
Set up forwarding for the following prefixes as described in the table.
| Prefix | Forward to |
|---|---|
/mcp | atscale-mcp-server:3003 |
/authorize | atscale-mcp-server:3003 |
/token | atscale-mcp-server:3003 |
/.well-known | atscale-mcp-server:3003 |
Rules
When configuring the routes listed above, be sure to do the following:
-
Preserve the prefix. Do not strip
/mcp,/authorize,/token, or/.well-knownfrom the path before proxying.NoteA common mistake is rewriting
/mcpto/when forwarding. This strips the prefix, resulting in the backend returning404for every request. -
Use path-prefix matching, not exact match.
-
Forward the
Authorizationheader unchanged to preserve OAuth bearer tokens. -
Use HTTP/1.1 upstream and set long timeouts (for example,
21600s), as the/mcpendpoint streams responses.
Route validation
After setting up the routes listed above, you can verify them by checking the following:
GET /.well-known/oauth-authorization-serverreturns JSON, and not404.GET /mcpreturns401if unauthenticated. A404means the prefix is being stripped.