MCP Gateway is available on Portkey Cloud. For the complete authentication reference, see portkey.ai/docs/product/mcp-gateway.
How authentication works
The MCP Gateway acts as the single authentication boundary for all MCP traffic. Clients authenticate to the gateway once — the gateway then forwards verified requests to your MCP servers without requiring each server to implement its own auth.Client authentication
Clients authenticate to the gateway using a Portkey API key passed in thex-portkey-api-key request header:
Identity forwarding
After authenticating a request, the gateway forwards the verified user identity to the MCP server as request headers. This lets MCP servers apply their own authorization logic without needing to authenticate the user themselves. The following headers are forwarded automatically:| Header | Value |
|---|---|
x-portkey-user | Authenticated user identifier |
x-portkey-team | Team or workspace the user belongs to |
x-portkey-roles | Roles assigned to the user |
x-portkey-request-id | Unique ID for this request |
MCP servers should validate that requests originate from the Portkey gateway (for example, by checking an internal network policy or a shared secret configured in the Portkey dashboard) before trusting forwarded identity headers.
Revoking access
Access can be revoked instantly from the Portkey dashboard:- Revoke an API key — immediately blocks all requests using that key
- Revoke a virtual key — blocks requests from a specific integration or user
- Disable a workspace — blocks all traffic through that gateway endpoint