Skip to content
Start here

Sync MCP Server Capabilities

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:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

Example:X-Auth-Email: user@example.com

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

Example:X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194
Accepted Permissions (at least one required)
MCP Portals Write
Path ParametersExpand Collapse
account_id: string
id: string

portal id

maxLength32
minLength1
ReturnsExpand Collapse
result: object { error, error_details, status }
error: optional string
error_details: optional object { cause, is_upstream, mcp_code, 2 more }
cause: optional string

Underlying error message

is_upstream: optional boolean

True = MCP server returned an error. False = couldn’t reach the server

mcp_code: optional number

MCP protocol error code

retryable: optional boolean

Whether the error is transient and worth retrying

status_code: optional number

HTTP status code from the server

status: optional string
success: boolean

Sync MCP Server Capabilities

curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/access/ai-controls/mcp/servers/$ID/sync \
    -X POST \
    -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN"
{
  "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
}