Skip to main content
MCP Gateway is available on Portkey Cloud. For the complete setup guide, see portkey.ai/docs/product/mcp-gateway/quickstart.

Overview

The MCP Gateway lets you connect any MCP-compatible client to your MCP servers through a single, authenticated endpoint hosted by Portkey. You configure which servers are accessible, define access policies, and every tool call is logged automatically.

Prerequisites

  • A Portkey Cloud account (free tier available)
  • At least one running MCP server
  • An MCP-compatible client: Claude Desktop, Cursor, or VS Code

Steps

1

Create a Portkey account

Sign up at app.portkey.ai. The free developer tier includes MCP Gateway access.
2

Register your MCP servers

In the Portkey dashboard, navigate to MCP Gateway and add your MCP server endpoints. Each server gets a unique name that clients use to identify it.You can register any publicly reachable MCP server, or use a tunneling tool like ngrok to expose a local server during development.
3

Generate a gateway URL and credentials

Portkey generates a unique MCP Gateway URL and API key for your workspace. Clients connect to this URL instead of connecting directly to your MCP servers.
4

Configure your MCP client

Update your MCP client to point at the Portkey MCP Gateway URL instead of each individual server.
// ~/Library/Application Support/Claude/claude_desktop_config.json (macOS)
// %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
  "mcpServers": {
    "portkey": {
      "url": "https://api.portkey.ai/mcp/YOUR_WORKSPACE_ID",
      "headers": {
        "x-portkey-api-key": "YOUR_PORTKEY_API_KEY"
      }
    }
  }
}
5

Test with a tool call

Ask your AI assistant to use a tool from one of your registered MCP servers. The request flows through the Portkey MCP Gateway:
  1. Client sends the tool call to the Portkey MCP endpoint
  2. Gateway authenticates the request using your API key
  3. Gateway checks the access policy
  4. Gateway forwards the call to the appropriate MCP server
  5. Response is returned to the client
  6. The tool call is logged in your Portkey dashboard
6

View logs in the Portkey dashboard

Go to the Logs section in your Portkey dashboard to see all MCP tool calls — including who called what, with which parameters, the response, and latency.

Next steps

Authentication

Configure authentication methods for the gateway.

Access control

Restrict which users and teams can access which servers and tools.

Observability

Explore logs, filtering, and integration with external tools.

Full documentation

Complete MCP Gateway reference on portkey.ai.

Build docs developers (and LLMs) love