> ## 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.

# Cloudflare MCP Server Portals

> Add the Consensus MCP server to a Cloudflare One MCP Portal so users reach it through one Access-protected URL.

MCP Server Portals, part of Cloudflare One (Zero Trust), give your users a single portal URL for all approved MCP servers, with Access policies in front. The portal auto-detects Streamable HTTP and supports stateless servers.

<Note>
  Cloudflare's separate **AI Gateway** product is not in the MCP path; tool calls don't traverse it. Use MCP Portals.
</Note>

## Register the server

<Steps>
  <Step title="Open MCP Portals">
    In the Cloudflare dashboard go to **Zero Trust › Access controls › MCP Portals**, open the **MCP servers** tab, and select **Add an MCP server**.
  </Step>

  <Step title="Fill in the server">
    | Field        | Value                           |
    | ------------ | ------------------------------- |
    | **Name**     | Consensus                       |
    | **HTTP URL** | `https://mcp.consensus.app/mcp` |
  </Step>

  <Step title="Choose authentication and policies">
    Pick one of the options below, attach your Access policies, then **Save and connect server**.
  </Step>
</Steps>

## Authentication

<Tabs>
  <Tab title="Bearer (shared)">
    Set the authentication type to **bearer** and paste your Consensus API key as the raw bearer token (or as a custom `Authorization: Bearer ak_live_...` header).
  </Tab>

  <Tab title="OAuth (per user)">
    Set the authentication type to **oauth** and choose **automatic OAuth registration**. Cloudflare registers with Consensus through Dynamic Client Registration and each user signs in on first use. Manual credentials also work if you prefer a confidential client: Authorization endpoint `https://consensus.app/oauth/authorize/`, Token endpoint `https://consensus.app/oauth/token/`, Scope `search`.
  </Tab>
</Tabs>

Terraform resource: `cloudflare_zero_trust_access_mcp_server_portal`.

## Notes

* Users blocked by an Access policy can still reach `mcp.consensus.app` directly unless Access is also the OAuth provider; combine with your egress policy if that matters.
* Manual-OAuth servers show **Waiting** until the first user completes sign-in.

Cloudflare docs: [MCP Portals](https://developers.cloudflare.com/cloudflare-one/access-controls/ai-controls/mcp-portals/)
