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: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
Cursor
Open Cmd/Ctrl + Shift + P > Cursor Settings: Open MCP Settings.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.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

