Skip to main content

servers

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

Overview

Nameservers
TypeResource
Idcloudflare.zero_trust.servers

Fields

The following fields are returned by SELECT queries:

Returns a single object if found

NameDatatypeDescription
idstringserver id
namestring
auth_typestring (oauth, bearer, unauthenticated)
created_atstring (date-time)
created_bystring
descriptionstring
errorstring
hostnamestring (uri)
last_successful_syncstring (date-time)
last_syncedstring (date-time)
modified_atstring (date-time)
modified_bystring
promptsarray
statusstring (default: waiting)
toolsarray
updated_promptsarray
updated_toolsarray

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectaccount_id, idRetrieves gateway configuration for MCP portals.
listselectaccount_idpage, per_page, searchLists all MCP portals configured for the account.
syncinsertid, account_idSyncs an MCP server's tool catalog with the portal.
createinsertaccount_id, id, name, hostname, auth_typeCreates 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

Retrieves gateway configuration for MCP portals.

SELECT
id,
name,
auth_type,
created_at,
created_by,
description,
error,
hostname,
last_successful_sync,
last_synced,
modified_at,
modified_by,
prompts,
status,
tools,
updated_prompts,
updated_tools
FROM cloudflare.zero_trust.servers
WHERE account_id = '{{ account_id }}' -- required
AND id = '{{ id }}' -- required
;

INSERT examples

Syncs an MCP server's tool catalog with the portal.

INSERT INTO cloudflare.zero_trust.servers (
id,
account_id
)
SELECT
'{{ id }}',
'{{ account_id }}'
RETURNING
result,
success
;

REPLACE examples

Updates an MCP portal configuration.

REPLACE cloudflare.zero_trust.servers
SET
auth_credentials = '{{ auth_credentials }}',
description = '{{ description }}',
name = '{{ name }}',
updated_prompts = '{{ updated_prompts }}',
updated_tools = '{{ updated_tools }}'
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.servers
WHERE account_id = '{{ account_id }}' --required
AND id = '{{ id }}' --required
;