Sync MCP Server Capabilities
client.zeroTrust.access.aiControls.mcp.servers.sync(stringid, ServerSyncParams { account_id } params, RequestOptionsoptions?): ServerSyncResponse { error, error_details, status }
POST/accounts/{account_id}/access/ai-controls/mcp/servers/{id}/sync
Syncs an MCP server’s capabilities and returns the updated server state, including any connection errors.
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example:
API Email + API Key
The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.
Example:
The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.
Example:
Accepted Permissions (at least one required)
Sync MCP Server Capabilities
import Cloudflare from 'cloudflare';
const client = new Cloudflare({
apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted
});
const response = await client.zeroTrust.access.aiControls.mcp.servers.sync('my-mcp-portal', {
account_id: 'a86a8f5c339544d7bdc89926de14fb8c',
});
console.log(response.error);{
"result": {
"error": "error",
"error_details": {
"cause": "cause",
"is_upstream": true,
"mcp_code": 0,
"retryable": true,
"status_code": 0
},
"status": "status"
},
"success": true
}Returns Examples
{
"result": {
"error": "error",
"error_details": {
"cause": "cause",
"is_upstream": true,
"mcp_code": 0,
"retryable": true,
"status_code": 0
},
"status": "status"
},
"success": true
}