> ## Documentation Index
> Fetch the complete documentation index at: https://composio-preview.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Cloudflare MCP

> Manage Cloudflare accounts, zones, Workers, DNS, security, storage, and other platform resources through Cloudflare's hosted MCP server.

![Cloudflare MCP logo](https://mintcdn.com/composio-preview/NPf8agM6UrvZD-Iu/images/toolkits/cloudflare_mcp.svg?fit=max\&auto=format\&n=NPf8agM6UrvZD-Iu\&q=85\&s=e364c4db07caf906453bc224fe41f1fe)

* **Category:** developer tools
* **Auth:** DCR\_OAUTH
* **Composio-managed OAuth available?** No
* **Tools:** 3
* **Triggers:** 0
* **Slug:** `CLOUDFLARE_MCP`
* **Version:** 20261018\_00

## Tools

> [accordion] Docs
>
> **Slug:** `CLOUDFLARE_MCP_DOCS`
>
> Search the Cloudflare documentation.
>
> This tool should be used to answer any question about Cloudflare products or features, including:
>
> * Workers, Pages, R2, Images, Stream, D1, Durable Objects, KV, Workflows, Hyperdrive, Queues
> * AI Search, Workers AI, Vectorize, AI Gateway, Browser Rendering
> * Zero Trust, Access, Tunnel, Gateway, Browser Isolation, WARP, DDOS, Magic Transit, Magic WAN
> * CDN, Cache, DNS, Zaraz, Argo, Rulesets, Terraform, Account and Billing
>
> Results are returned as semantically similar chunks to the query.
>
> #### Input Parameters
>
> **query** `string` *required*
>
> Cloudflare documentation search query
>
> #### Output
>
> **results** `array` *required*

> [accordion] Execute
>
> **Slug:** `CLOUDFLARE_MCP_EXECUTE`
>
> Execute JavaScript code that can read, create, update, or delete resources through the Cloudflare API. First use the 'search' tool to find the right endpoints, then write code using the cloudflare.request() function.
>
> Available in your code:
>
> interface CloudflareRequestOptions \{ method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE"; path: string; query?: Record\<string, string | number | boolean | undefined>; body?: unknown; contentType?: string;  // Custom Content-Type header (defaults to application/json if body is present) rawBody?: boolean;     // If true, sends body as-is without JSON.stringify }
>
> interface CloudflareResponse\<T = unknown> \{ success: boolean; status: number; result: T; errors: Array\<\{ code: number; message: string }>; messages: Array\<\{ code: number; message: string }>; result\_info?: \{ page: number; per\_page: number; total\_pages: number; count: number; total\_count: number; }; }
>
> declare const cloudflare: \{ request\<T = unknown>(options: CloudflareRequestOptions): Promise\<CloudflareResponse\<T>>; };
>
> declare const accountId: string;
>
> // Use the account\_id argument to select the Cloudflare account for account-scoped requests.
>
> Your code must be an async arrow function that returns the result.
>
> Example: Worker with bindings (requires multipart/form-data): async () => \{ const code = `addEventListener('fetch', e => e.respondWith(MY_KV.get('key').then(v => new Response(v || 'none'))));`; const metadata = \{ body\_part: "script", bindings: \[\{ type: "kv\_namespace", name: "MY\_KV", namespace\_id: "your-kv-id" }] }; const b = `--F${Date.now()}`; const body = \[`--${b}`, 'Content-Disposition: form-data; name="metadata"', 'Content-Type: application/json', '', JSON.stringify(metadata), `--${b}`, 'Content-Disposition: form-data; name="script"', 'Content-Type: application/javascript', '', code, `--${b}--`].join("\r\n"); return cloudflare.request(\{ method: "PUT", path: `/accounts/${accountId}/workers/scripts/my-worker`, body, contentType: `multipart/form-data; boundary=${b}`, rawBody: true }); }
>
> #### Input Parameters
>
> **code** `string` *required*
>
> JavaScript async arrow function to execute
>
> **account\_id** `string`
>
> Cloudflare account ID to scope execution to a singular account. Optional for account-independent calls.

> [accordion] Search
>
> **Slug:** `CLOUDFLARE_MCP_SEARCH`
>
> Search the Cloudflare OpenAPI spec. All \$refs are pre-resolved inline.
>
> Products: cloudforce-one, access, magic, workers, dlp, email-security, realtime, devices, ai-gateway, email, intel, gateway, stream, settings, brand-protection, data-security, ai-search, browser-rendering, dex, logpush, api\_gateway, builds, images, addressing, security-center, load\_balancers, rulesets, vectorize, firewall, logs... (168 total)
>
> Types:
>
> interface OperationInfo \{ summary?: string; description?: string; tags?: string\[]; parameters?: Array\<\{ name: string; in: string; required?: boolean; schema?: unknown; description?: string }>; requestBody?: \{ required?: boolean; content?: Record\<string, \{ schema?: unknown }> }; responses?: Record\<string, \{ description?: string; content?: Record\<string, \{ schema?: unknown }> }>; }
>
> interface PathItem \{ get?: OperationInfo; post?: OperationInfo; put?: OperationInfo; patch?: OperationInfo; delete?: OperationInfo; }
>
> declare const spec: \{ paths: Record\<string, PathItem>; };
>
> Examples:
>
> // Find endpoints by product async () => \{ const results = \[]; for (const \[path, methods] of Object.entries(spec.paths)) \{ for (const \[method, op] of Object.entries(methods)) \{ if (op.tags?.some(t => t.toLowerCase() === 'workers')) \{ results.push(\{ method: method.toUpperCase(), path, summary: op.summary }); } } } return results; }
>
> // Get endpoint with requestBody schema (refs are resolved) async () => \{ const op = spec.paths\['/accounts/\{account\_id}/d1/database']?.post; return \{ summary: op?.summary, requestBody: op?.requestBody }; }
>
> // Get endpoint parameters async () => \{ const op = spec.paths\['/accounts/\{account\_id}/workers/scripts']?.get; return op?.parameters; }
>
> #### Input Parameters
>
> **code** `string` *required*
>
> JavaScript async arrow function to search the OpenAPI spec
