List MCP Servers
zero_trust.access.ai_controls.mcp.servers.list(ServerListParams**kwargs) -> SyncV4PagePaginationArray[ServerListResponse]
GET/accounts/{account_id}/access/ai-controls/mcp/servers
Lists all MCP portals configured for the account.
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:
Parameters
List MCP Servers
import os
from cloudflare import Cloudflare
client = Cloudflare(
api_token=os.environ.get("CLOUDFLARE_API_TOKEN"), # This is the default and can be omitted
)
page = client.zero_trust.access.ai_controls.mcp.servers.list(
account_id="a86a8f5c339544d7bdc89926de14fb8c",
)
page = page.result[0]
print(page.id){
"result": [
{
"id": "my-mcp-server",
"auth_type": "unauthenticated",
"hostname": "https://example.com/mcp",
"name": "My MCP Server",
"prompts": [
{
"foo": "bar"
}
],
"tools": [
{
"foo": "bar"
}
],
"created_at": "2019-12-27T18:11:19.117Z",
"created_by": "created_by",
"description": "This is one remote mcp server",
"error": "error",
"last_successful_sync": "2019-12-27T18:11:19.117Z",
"last_synced": "2019-12-27T18:11:19.117Z",
"modified_at": "2019-12-27T18:11:19.117Z",
"modified_by": "modified_by",
"status": "status"
}
],
"success": true
}Returns Examples
{
"result": [
{
"id": "my-mcp-server",
"auth_type": "unauthenticated",
"hostname": "https://example.com/mcp",
"name": "My MCP Server",
"prompts": [
{
"foo": "bar"
}
],
"tools": [
{
"foo": "bar"
}
],
"created_at": "2019-12-27T18:11:19.117Z",
"created_by": "created_by",
"description": "This is one remote mcp server",
"error": "error",
"last_successful_sync": "2019-12-27T18:11:19.117Z",
"last_synced": "2019-12-27T18:11:19.117Z",
"modified_at": "2019-12-27T18:11:19.117Z",
"modified_by": "modified_by",
"status": "status"
}
],
"success": true
}