> ## Documentation Index
> Fetch the complete documentation index at: https://docs.consensus.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Portkey MCP Gateway

> Register the Consensus MCP server in Portkey's MCP Registry with custom headers or per-user OAuth.

Portkey's MCP Registry lets admins register servers once; clients then connect through `https://mcp.portkey.ai/<slug>/mcp` with a Portkey API key.

## Register the server

<Steps>
  <Step title="Add the server">
    Select **MCP Registry** in the sidebar, then **Add MCP Server**.
  </Step>

  <Step title="Fill in the server">
    | Field           | Value                           |
    | --------------- | ------------------------------- |
    | **Name**        | Consensus                       |
    | **Slug**        | `consensus`                     |
    | **Server URL**  | `https://mcp.consensus.app/mcp` |
    | **Server Type** | HTTP                            |
    | **Auth Type**   | See below                       |
  </Step>
</Steps>

## Authentication

<Tabs>
  <Tab title="Headers (shared)">
    Choose **Headers** and add `Authorization` with the value `Bearer ak_live_...`.
  </Tab>

  <Tab title="OAuth Auto (per user)">
    Choose **OAuth Auto**. Portkey handles OAuth 2.1 with Dynamic Client Registration, so each user signs in to Consensus on first use. **Client Credentials** doesn't apply; Consensus has no client-credentials grant.
  </Tab>
</Tabs>

## Connect a client

```json theme={null}
{
  "mcpServers": {
    "consensus": {
      "url": "https://mcp.portkey.ai/consensus/mcp",
      "headers": {
        "x-portkey-api-key": "<PORTKEY_API_KEY>"
      }
    }
  }
}
```

Portkey docs: [MCP Registry](https://portkey.ai/docs/product/mcp-gateway/mcp-registry) · [Authentication](https://portkey.ai/docs/product/mcp-gateway/authentication)
