Create a new MCP Portal
POST/accounts/{account_id}/access/ai-controls/mcp/portals
Creates a new MCP portal for managing AI tool access through Cloudflare Access.
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:
Create a new MCP Portal
curl https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/access/ai-controls/mcp/portals \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
-d '{
"id": "my-mcp-portal",
"hostname": "exmaple.com",
"name": "My MCP Portal",
"allow_code_mode": true,
"description": "This is my custom MCP Portal"
}'{
"result": {
"id": "my-mcp-portal",
"hostname": "exmaple.com",
"name": "My MCP Portal",
"allow_code_mode": true,
"created_at": "2019-12-27T18:11:19.117Z",
"created_by": "created_by",
"description": "This is my custom MCP Portal",
"modified_at": "2019-12-27T18:11:19.117Z",
"modified_by": "modified_by",
"secure_web_gateway": false
},
"success": true
}Returns Examples
{
"result": {
"id": "my-mcp-portal",
"hostname": "exmaple.com",
"name": "My MCP Portal",
"allow_code_mode": true,
"created_at": "2019-12-27T18:11:19.117Z",
"created_by": "created_by",
"description": "This is my custom MCP Portal",
"modified_at": "2019-12-27T18:11:19.117Z",
"modified_by": "modified_by",
"secure_web_gateway": false
},
"success": true
}