Skip to main content
After an admin provisions MCP servers to your workspace, connect from any MCP clientβ€”Claude Desktop, Cursor, VS Code, or custom applications.

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.

MCP Clients

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. For OAuth-enabled servers, Claude prompts for authentication on first tool use.

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:

Transport

MCP Gateway uses HTTP Streamable transport for all connections. This is the standard MCP transport that supports bidirectional communication over HTTP.
Sessions are ephemeralβ€”each request is independent. There’s no session persistence between requests, which simplifies scaling and removes the need for sticky sessions.

SDKs

Python

TypeScript


API Keys

Create API keys in Settings > API Keys. Keys are scoped to workspaces, 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

MCP servers with OAuth require users to complete 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

For Portkey AI Gateway users, MCP integrates automatically:
  • Unified dashboard for LLM and MCP activity
  • Traces span model calls and tool use
  • Single API key for both services

Next Steps

Authentication

Authentication options for MCP Gateway.

Observability

Monitor MCP traffic and debug issues.
Last modified on March 9, 2026