# Cloudflare API (MCP Server)

> Access 2,500+ Cloudflare API endpoints through two Code Mode tools

- Type: MCP server
- Publisher: Cloudflare (official)
- Categories: DevOps & Cloud, Development
- Website: https://developers.cloudflare.com/agents/model-context-protocol/mcp-servers-for-cloudflare/
- Transport: streamable-http
- Server URL: https://mcp.cloudflare.com/mcp
- Sign-in: oauth
- Listed: 2026-02-01

## About

Cloudflare's main MCP server uses a Code Mode pattern, exposing search() and execute() tools that cover the full Cloudflare API in roughly 1,000 tokens of context. It is hosted remotely and authenticates via OAuth or a Cloudflare API token in the Authorization header.

## Install

1. **Connect it in ChatGPT** Turn on Developer mode in ChatGPT (Settings → Security and login), open Plugins, select + and paste https://mcp.cloudflare.com/mcp as the MCP server URL, then sign in with OAuth. Add it to a chat from the composer's tools menu.

2. **Or add it to Codex or the API**

   Codex CLI:

   ```bash
   codex mcp add cloudflare-api --url https://mcp.cloudflare.com/mcp
   codex mcp login cloudflare-api
   ```

   config.toml:

   ```toml
   [mcp_servers.cloudflare-api]
   url = "https://mcp.cloudflare.com/mcp"
   ```

   Responses API:

   ```python
   import os
   from openai import OpenAI
   
   client = OpenAI()
   
   response = client.responses.create(
       model="gpt-6-astra",
       tools=[{
           "type": "mcp",
           "server_label": "cloudflare_api",
           "server_url": "https://mcp.cloudflare.com/mcp",
           "authorization": os.environ["CLOUDFLARE_API_API_KEY"],
           "require_approval": "never",
       }],
       input="List all DNS records for example.com",
   )
   print(response.output_text)
   ```

## Tools

- `search`
- `execute`

## Example prompts

- "List all DNS records for example.com"
- "Create a new R2 bucket called assets-prod"
- "Purge the cache for my marketing site zone"
- "Which Workers are deployed in my account?"

## Also available as

- plugin: [Cloudflare](https://chatgptplugins.directory/plugins/cloudflare.md)
- app: [Cloudflare](https://chatgptplugins.directory/apps/cloudflare.md)

## Related

- [Chrome DevTools MCP](https://chatgptplugins.directory/mcp/chrome-devtools.md): Let coding agents control and debug a live Chrome browser
- [Playwright MCP](https://chatgptplugins.directory/mcp/playwright.md): Browser automation for agents via Playwright accessibility snapshots
- [GitHub](https://chatgptplugins.directory/mcp/github.md): Manage repos, issues, pull requests and Actions from your AI agent
- [Context7](https://chatgptplugins.directory/mcp/context7.md): Pull up-to-date, version-specific library docs into your coding agent
- [Supabase](https://chatgptplugins.directory/mcp/supabase.md): Manage Supabase databases, migrations, edge functions and logs
- [Stripe](https://chatgptplugins.directory/mcp/stripe.md): Query and act on your Stripe account and search Stripe docs from any agent

---
Source: https://chatgptplugins.directory/mcp/cloudflare-api · Index: https://chatgptplugins.directory/llms.txt · Independent and community-run. Not affiliated with or endorsed by OpenAI. ChatGPT is a trademark of OpenAI.
