Why Use Portkey’s MCP Gateway
- Authentication without building auth. Every MCP server needs it. Without Portkey, you build OAuth flows, validate tokens, manage sessions—for every server. With Portkey, authentication happens once at the gateway. Your servers receive authenticated requests.
- User identity forwarding. Your server often needs to know who is making a request. Portkey forwards user claims (email, team, roles) automatically. No OAuth implementation required.
- Access control without deployments. Control who accesses which servers and tools. When someone leaves a team, revoke access in Portkey. No code changes.
- Full observability. Every tool call logged—who called what, with what parameters, what was returned. Debug issues in minutes.
Architecture
Two independent authentication layers:| Layer | Purpose | Options |
|---|---|---|
| Gateway | User proves identity to Portkey | API Key, OAuth, External IdP |
| Server | Portkey authenticates to your server | OAuth Auto, API Key None, Headers |
Setup
Your MCP server must be accessible over HTTP and implement MCP protocol over Streamable HTTP transport.Using STDIO transport? Expose it as an HTTP endpoint first.
Add to MCP Registry
Go to MCP Registry → Add MCP Integration.| Field | Value |
|---|---|
| Name | Display name (e.g., “Internal Documentation”) |
| Slug | URL identifier (e.g., internal-docs) |
| Server URL | Your server’s MCP endpoint |
| Auth Type | How Portkey authenticates to your server |
None if your server is in a private network, Headers for API keys, or OAuth Auto for servers supporting OAuth 2.1.
Configure Identity Forwarding
For servers that need to know who’s making requests, add identity forwarding config in Advanced Configuration.- JWT Header
- Claims Header
- Bearer Passthrough
Portkey generates a signed JWT with user claims. Your server verifies using Portkey’s public keys.Verify the JWT using
GET https://mcp.portkey.ai/.well-known/jwks.jsonProvision Access
In Access Control & Limits, select which workspaces can access this server. Toggle per workspace, enable auto-provisioning for new workspaces, or set tool-level permissions.Connect
Users connect through Portkey:Gateway Authentication
Three ways for users to authenticate to Portkey: API Key — Create keys in Settings → API Keys. Keys are scoped to workspaces. Portkey OAuth — For browser apps. If no API key provided, Portkey initiates an OAuth flow. External IdP — Connect Okta, Azure AD, or Auth0. Users authenticate with corporate credentials.Governance
Observability — Every request logged with tool name, parameters, response, user, team, timestamp, latency, and status. View in Logs with filters. Access control — Three levels: Organization (which servers exist), Workspace (which teams access which servers), User (individual permissions). The model is subtractive—each level can only remove access. Tool provisioning — Enable or disable specific tools at any level. Block dangerous operations org-wide, restrict write tools for read-only teams, phase out deprecated tools. Disabled tools don’t appear in listings. Rate limits — Coming soon. Control request volume per user, team, or server.Example: Documentation Server
Your company built an MCP server for querying internal docs. Add to registry: Name it “Internal Documentation”, sluginternal-docs, point to your server URL, configure headers auth with your internal API key.
Configure identity: Enable claims header forwarding with sub, email, workspace_id.
Provision access: Enable for Engineering and Product workspaces.
Developers connect:

