portals
Creates, updates, deletes, gets or lists a portals resource.
Overview
| Name | portals |
| Type | Resource |
| Id | cloudflare.zero_trust.portals |
Fields
The following fields are returned by SELECT queries:
- get
- list
Returns a single object if found
| Name | Datatype | Description |
|---|---|---|
id | string | portal id |
name | string | |
allow_code_mode | boolean | Allow remote code execution in Dynamic Workers (beta) |
created_at | string (date-time) | |
created_by | string | |
description | string | |
hostname | string | |
modified_at | string (date-time) | |
modified_by | string | |
secure_web_gateway | boolean | Route outbound MCP traffic through Zero Trust Secure Web Gateway |
servers | array |
List objects
| Name | Datatype | Description |
|---|---|---|
id | string | portal id |
name | string | |
allow_code_mode | boolean | Allow remote code execution in Dynamic Workers (beta) |
created_at | string (date-time) | |
created_by | string | |
description | string | |
hostname | string | |
modified_at | string (date-time) | |
modified_by | string | |
secure_web_gateway | boolean | Route outbound MCP traffic through Zero Trust Secure Web Gateway |
servers | array |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | id, account_id | ||
list | select | account_id | page, per_page, search | Lists all MCP portals configured for the account. |
create | insert | account_id, id, name, hostname | Creates a new MCP portal for managing AI tool access through Cloudflare Access. | |
update | replace | id, account_id | Updates an MCP portal configuration. | |
delete | delete | account_id, id | Deletes 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.
| Name | Datatype | Description |
|---|---|---|
account_id | string | The Cloudflare account ID. |
id | string | Resource ID. |
page | integer | |
per_page | integer | |
search | string |
SELECT examples
- get
- list
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
;
Lists all MCP portals configured for the account.
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 account_id = '{{ account_id }}' -- required
AND page = '{{ page }}'
AND per_page = '{{ per_page }}'
AND search = '{{ search }}'
;
INSERT examples
- create
- Manifest
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
;
# Description fields are for documentation purposes
- name: portals
props:
- name: account_id
value: "{{ account_id }}"
description: Required parameter for the portals resource.
- name: allow_code_mode
value: {{ allow_code_mode }}
description: |
Allow remote code execution in Dynamic Workers (beta)
default: true
- name: description
value: "{{ description }}"
- name: hostname
value: "{{ hostname }}"
- name: id
value: "{{ id }}"
description: |
portal id
- name: name
value: "{{ name }}"
- name: secure_web_gateway
value: {{ secure_web_gateway }}
description: |
Route outbound MCP traffic through Zero Trust Secure Web Gateway
default: false
- name: servers
value:
- default_disabled: {{ default_disabled }}
on_behalf: {{ on_behalf }}
server_id: "{{ server_id }}"
updated_prompts: "{{ updated_prompts }}"
updated_tools: "{{ updated_tools }}"
REPLACE examples
- update
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
- delete
Deletes an MCP portal from the account.
DELETE FROM cloudflare.zero_trust.portals
WHERE account_id = '{{ account_id }}' --required
AND id = '{{ id }}' --required
;