Why Use Portkey for External MCP Servers
- Centralized credential management. OAuth tokens for Linear, GitHub, Slack—all managed in one place. Users authenticate once, Portkey handles token refresh.
- Team-based access control. Control which teams can access which external services. Revoke access instantly without rotating credentials.
- Full observability. See exactly which tools your agents are calling, who’s using them, and what data is flowing through.
- Unified authentication. Your agents authenticate to Portkey with a single API key. Portkey handles the complexity of OAuth flows with each external service.
Architecture
Two independent authentication layers:| Layer | Purpose | Options |
|---|---|---|
| Gateway | User proves identity to Portkey | API Key, OAuth, External IdP |
| Server | Portkey authenticates to external service | OAuth 2.1, Client Credentials, Headers |
Setup
Add to MCP Registry
Go to MCP Registry → Add MCP Integration.| Field | Value |
|---|---|
| Name | Display name (e.g., “Linear”) |
| Slug | URL identifier (e.g., linear) |
| Server URL | The service’s MCP endpoint |
| Auth Type | Usually OAuth 2.1 for external services |
Configure OAuth
Most external MCP servers use OAuth. Adding a server with OAuth:- Portkey registers as an OAuth client with the service
- Users complete OAuth consent when they first use the server
- Portkey stores and refreshes tokens automatically
Servers with Dynamic Client Registration (DCR)
Many MCP servers support OAuth 2.1 with Dynamic Client Registration. For these servers, just select OAuth 2.1 as the auth type—Portkey handles client registration automatically.Servers Requiring Manual OAuth App Setup
Some services (like GitHub) don’t support DCR. For these:- Create an OAuth App in the service’s developer settings
- Set the callback URL to
https://mcp.portkey.ai/oauth/upstream-callback - Add the
client_id,client_secret, andredirect_uriin Portkey’s Advanced Configuration
Provision Access
In Access Control & Limits, select which workspaces can access this server. Toggle per workspace or enable auto-provisioning for new workspaces.Connect
Users connect through Portkey:OAuth Flows
Per-User OAuth
When an MCP server uses per-user OAuth:- User calls a tool through Portkey
- If no token exists, Portkey returns an authorization URL
- User completes OAuth consent
- Portkey stores the token
- Subsequent requests use the stored token
Shared Credentials
Some servers use shared credentials via client credentials grant or API keys:- Client Credentials: Portkey fetches tokens using client ID/secret
- Headers: Static API keys sent with every request

