POST /accounts/{account_id}/access/ai-controls/mcp/portals

Creates a new MCP portal for managing AI tool access through Cloudflare Access.

Servers

Path parameters

Name Type Required Description
account_id String Yes

Request headers

Name Type Required Description
Content-Type String Yes The media type of the request body.

Default value: "application/json"

Request body fields

Name Type Required Description
id String Yes

Unique identifier for the MCP portal.

secure_web_gateway Boolean No

Route outbound MCP traffic through Zero Trust Secure Web Gateway.

Default value: false

name String Yes

Display name for the MCP portal.

description String No

Optional description of the MCP portal.

allow_code_mode Boolean No

Deprecated: use code_mode for new integrations. true maps to any non-off Code Mode policy; false maps to code_mode: off. If both fields are sent, they must be consistent or the request returns a 400.

code_mode String No

Code Mode policy for this portal. off: Code Mode is unavailable; query parameters are ignored. opt_in: Code Mode is off by default; clients turn it on with ?codemode=search_and_execute. default_on: Code Mode is on by default; clients can opt out with ?codemode=off. enforced: Code Mode is always on; query parameters are ignored. Defaults to opt_in when omitted on create. If both code_mode and allow_code_mode are sent, they must be consistent or the request returns a 400.

Valid values:

  • "default_on"
  • "enforced"
  • "opt_in"
  • "false"
servers[] Array No

MCP servers attached to the portal and their portal-specific settings.

servers[].default_disabled Boolean No

Disable this server by default for clients connecting through the portal.

servers[].on_behalf Boolean No

Use end-user OAuth credentials when connecting this server to the portal.

servers[].updated_tools[] Array No

Portal-specific tool overrides.

servers[].updated_tools[].name String Yes

Name of the tool or prompt capability to override.

servers[].updated_tools[].description String No

Custom description exposed for the capability.

servers[].updated_tools[].enabled Boolean No

Whether the capability is available through the MCP server.

servers[].updated_tools[].alias String No

Custom name exposed for the capability.

servers[].updated_prompts[] Array No

Portal-specific prompt overrides.

servers[].updated_prompts[].name String Yes

Name of the tool or prompt capability to override.

servers[].updated_prompts[].description String No

Custom description exposed for the capability.

servers[].updated_prompts[].enabled Boolean No

Whether the capability is available through the MCP server.

servers[].updated_prompts[].alias String No

Custom name exposed for the capability.

servers[].server_id String Yes

Unique identifier for the MCP server.

hostname String Yes

Hostname where the MCP portal is available.

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.