Skip to main content
Portkey MCP Gateway works with any MCP client. Connect your agents using a URL and API key.

Find your connection URL

Go to MCP in your workspace sidebar. Click on a server to see its connection details. Each server has a URL:
Copy this URL to use in your agent configuration.
For self-hosted deployments, replace mcp.portkey.ai with your gateway URL.

Claude Desktop

Add to your Claude Desktop config file. macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json
Restart Claude Desktop after saving. The tools appear in your conversation. If the server uses OAuth, Claude prompts you to authenticate when you first use a tool.

Cursor

Open Cmd/Ctrl + Shift + P > Cursor Settings: Open MCP Settings.
The tools are available in Cursor’s agent mode.

VS Code

With GitHub Copilot and the MCP extension:

Python

TypeScript

API keys

Create API keys in Settings > API Keys. Keys are scoped to teams, so the key determines which MCP servers your agent can access.
When creating your workspace API key, ensure it has MCP Invoke permissions enabled.

Handling OAuth

If an MCP server uses OAuth for per-user authentication, users need to complete OAuth consent before using tools. The first time a user calls a tool, Portkey returns an error with an authorization URL. Redirect the user to complete OAuth. After consent, retry the request.
After authorization, Portkey stores the user’s tokens and handles refresh automatically.

AI Gateway integration

If you use Portkey’s AI Gateway for LLM calls, MCP integrates automatically:
  • Unified dashboard for LLM and MCP activity
  • Traces span model calls and tool use
  • Single API key for both services
Last modified on April 8, 2026