Skip to main content

portals

Creates, updates, deletes, gets or lists a portals resource.

Overview

Nameportals
TypeResource
Idcloudflare.zero_trust.portals

Fields

The following fields are returned by SELECT queries:

Returns a single object if found

NameDatatypeDescription
idstringportal id
namestring
allow_code_modebooleanAllow remote code execution in Dynamic Workers (beta)
created_atstring (date-time)
created_bystring
descriptionstring
hostnamestring
modified_atstring (date-time)
modified_bystring
secure_web_gatewaybooleanRoute outbound MCP traffic through Zero Trust Secure Web Gateway
serversarray

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectid, account_id
listselectaccount_idpage, per_page, searchLists all MCP portals configured for the account.
createinsertaccount_id, id, name, hostnameCreates a new MCP portal for managing AI tool access through Cloudflare Access.
updatereplaceid, account_idUpdates an MCP portal configuration.
deletedeleteaccount_id, idDeletes an MCP portal from the account.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
account_idstringThe Cloudflare account ID.
idstringResource ID.
pageinteger
per_pageinteger

SELECT examples

Returns a single object if found

SELECT
id,
name,
allow_code_mode,
created_at,
created_by,
description,
hostname,
modified_at,
modified_by,
secure_web_gateway,
servers
FROM cloudflare.zero_trust.portals
WHERE id = '{{ id }}' -- required
AND account_id = '{{ account_id }}' -- required
;

INSERT examples

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

INSERT INTO cloudflare.zero_trust.portals (
allow_code_mode,
description,
hostname,
id,
name,
secure_web_gateway,
servers,
account_id
)
SELECT
{{ allow_code_mode }},
'{{ description }}',
'{{ hostname }}' /* required */,
'{{ id }}' /* required */,
'{{ name }}' /* required */,
{{ secure_web_gateway }},
'{{ servers }}',
'{{ account_id }}'
RETURNING
result,
success
;

REPLACE examples

Updates an MCP portal configuration.

REPLACE cloudflare.zero_trust.portals
SET
allow_code_mode = {{ allow_code_mode }},
description = '{{ description }}',
hostname = '{{ hostname }}',
name = '{{ name }}',
secure_web_gateway = {{ secure_web_gateway }},
servers = '{{ servers }}'
WHERE
id = '{{ id }}' --required
AND account_id = '{{ account_id }}' --required
RETURNING
result,
success;

DELETE examples

Deletes an MCP portal from the account.

DELETE FROM cloudflare.zero_trust.portals
WHERE account_id = '{{ account_id }}' --required
AND id = '{{ id }}' --required
;