MCP servers

Proxy

Analytics for a remote MCP server without changing its code.

When you can't add the SDK, for example a hosted server, one you don't own or one in a language without an SDK, put the proxy in front of it. For a server you run in production, prefer the SDK: the proxy adds a network hop, its URL carries a secret, and servers that ask clients to sign in can't be used through it. MCP clients connect to the proxy URL, and every request is forwarded to your server untouched. Streamable HTTP and SSE are supported; stdio servers need the SDK.

Set the server URL

On the server's card under Project settings → Setup → MCP servers, enter its Server URL (for example https://mcp.example.com/mcp). If the server expects a header the clients don't send, such as an API key, add it under Headers to send. Headers are stored encrypted and never shown again. Evals use the same URL and headers.

Give clients the proxy URL

Copy the Proxy URL (/gw/<id>/<secret>) and use it wherever you used the server's URL:

claude mcp add --transport http my-server https://agentstats.io/gw/<id>/<secret>

The proxy URL contains a secret: anyone who has it can reach your server through the proxy. Clients' own Authorization headers are passed through, so servers that take an API key or a static token keep working.

Servers that ask clients to sign in with OAuth (MCP authorization) can't be used through the proxy: access tokens are bound to your server's own URL, and clients check that the server they talk to is the one the token is for. The proxy recognises these servers, records each sign-in challenge as auth/challenge (not as a failed request), and the dashboard says so. Use the SDK for them instead: it also records which client apps signed in.

The proxy records the same data as the SDKs, measured at the proxy, so durations include the network hop to your server. It also sees what the SDK can't: requests your server never answered (unreachable, timed out, HTTP 5xx), recorded as connection failures, which the Unreachable alert rule watches.

Turn on Feedback tool through the proxy on the server's card to add a send_feedback tool for clients that connect through it (see Feedback).