How to integrate Cloudflare api key MCP with Codex

Connect Codex to Cloudflare api key MCP. Add new a record to your dns zone, delete outdated cname record from domain, and more using natural language, with authentication handled for you.

Cloudflare api key logoCloudflare api key
Api Key

Cloudflare is a leading platform for website security, performance, and reliability. It helps protect and optimize your web infrastructure with robust API access.

40 Tools

Introduction

Codex is one of the most popular coding harnesses out there. And MCP makes the experience even better. With the Cloudflare api key MCP integration, Codex can manage DNS records, create and update rulesets, set zone lockdown rules, manage zones, and update DNSSEC settings, all without leaving the terminal or the app, whichever you prefer.

Also integrate Cloudflare api key with

Why use Composio?

Apart from a managed and hosted MCP server, you will get:

  • CodeAct: A dedicated workbench that allows GPT to write its code to handle complex tool chaining. Reduces to-and-fro with LLMs for frequent tool calling.
  • Large tool responses: Handle them to minimise context rot.
  • Dynamic just-in-time access to 20,000 tools across 1700+ other Apps for cross-app workflows. It loads the tools you need, so GPTs aren't overwhelmed by tools you don't need.

How to install Cloudflare api key MCP in Codex

Run the setup command

Run this command in your terminal to add the Composio MCP server to Codex.

Terminal

It will initiate the authentication in a browser window, authorize Codex to access your Composio account.

Composio authentication page

(Optional) Authenticate with OAuth

To authenticate manually, run the login command to open a browser window and authorize Codex to access your Composio account.

bash
codex mcp login composio

Verify the connection

Run codex mcp list to confirm Composio appears as a registered MCP server.

bash
codex mcp list

Codex App

Codex App follows the same approach as VS Code.

  1. Click ⚙️ on the bottom left → MCP Servers → + Add servers → Streamable HTTP:
  2. Fill the header and Key fields with { "x-consumer-api-key" = "ck_*******" }.
  3. The Key is the Composio API key, that you can find on dashboard.composio.dev
  4. Click on Authenticate and authorize Codex to your Composio account and you're all set.
Codex App MCP setup
  1. Restart and verify if it's there in .codex/config.toml
bash
[mcp_servers.composio]
url = "https://connect.composio.dev/mcp"
http_headers = { "x-consumer-api-key" = "ck_*******" }

Try it

Ask Codex for a Cloudflare api key task. The first time, Composio asks you to connect your Cloudflare api key account.

For example, ask it to:

  • "Add new A record to your DNS zone"
  • "Delete outdated CNAME record from domain"
  • "Create lockdown rule for admin URLs"

What is the Cloudflare api key MCP server, and what's possible with it?

The Cloudflare api key MCP server is an implementation of the Model Context Protocol that connects your AI agent and assistants like Claude, Cursor, etc directly to your Cloudflare account. It provides structured and secure access to your Cloudflare services, so your agent can create DNS records, manage security rules, delete zones, and automate zone configurations on your behalf.

  • Automated DNS record management: Instantly create, update, or delete DNS records—including A, CNAME, TXT, and MX types—across your Cloudflare zones to keep your domains running smoothly.
  • Zone lockdown and security automation: Add or remove Zone Lockdown rules to restrict access to specific URLs and IP ranges, helping you enforce security policies without manual intervention.
  • Ruleset creation and maintenance: Direct your agent to create new rulesets or modify existing ones, ensuring your web applications remain secure and compliant with evolving access requirements.
  • Comprehensive zone administration: Effortlessly delete entire zones or DNSSEC configurations for streamlined domain management and cleanup when needed.
  • Versioned ruleset management: Retrieve specific versions of entry point rulesets, giving you granular control and auditability over your security configurations.

Conclusion

You've successfully integrated Cloudflare api key with Codex using Composio's MCP server. Now you can interact with Cloudflare api key directly from your terminal, VS Code, or the Codex App using natural language commands.

Key benefits of this setup:

  • Seamless integration across CLI, VS Code, and standalone app
  • Natural language commands for Cloudflare api key operations
  • Managed authentication through Composio
  • Access to 20,000+ tools across 1700+ apps for cross-app workflows
  • CodeAct workbench for complex tool chaining

Next steps:

  • Try asking Codex to perform various Cloudflare api key operations
  • Explore cross-app workflows by connecting more toolkits
  • Build automation scripts that leverage Codex's AI capabilities
TOOLS

Supported Tools

Every Cloudflare api key action and event your agent gets out of the box.

Configure Email Routing DNS

Enable Email Routing and add and lock its required MX and SPF records.

Create DNS Record

Tool to create a new DNS record in a Cloudflare zone.

Create Email Routing Rule

Create an Email Routing rule for a Cloudflare zone.

Create Zone Lockdown Rule

Tool to create a Zone Lockdown rule.

Create Pages Deployment

Create a Cloudflare Pages deployment from a Git branch or Direct Upload manifest.

Create Rule in Ruleset

Tool to add a rule to an existing ruleset.

Create Ruleset

Creates a new Cloudflare ruleset at account or zone scope.

Delete DNS Record

Tool to delete a DNS record.

Delete DNSSEC

Tool to delete DNSSEC records for a zone.

Delete Rule from Ruleset

Tool to delete a specific rule from a ruleset.

Delete Ruleset

Tool to delete all versions of a ruleset.

Delete a zone

Tool to delete an existing zone.

Extract Data with Clairic

Extract typed values and calibrated estimates from text or embedded images.

Get Cloudflare IP Addresses

Tool to retrieve IP addresses used on the Cloudflare or JD Cloud network.

Get Entrypoint Ruleset Version

Retrieves a specific historical version of an entry point ruleset from Cloudflare.

Get Lockdown Rule

Tool to get a Zone Lockdown rule.

Get Pages Project

Retrieve one Cloudflare Pages project and its complete configuration.

Get Pages Upload Token

Return a sensitive short-lived JWT for Pages Direct Upload; do not log or persist it.

Get R2 Object

Downloads an object's stored content and metadata from a Cloudflare R2 bucket.

Get Regional Tiered Cache

Tool to get the regional tiered cache setting for a zone.

Get Ruleset

Tool to fetch the latest version of a ruleset by ID.

Get Worker Schedules

Get the Cron Triggers configured for one Worker script.

Get Worker Subdomain And Schedules

Read a Worker's workers.

Get Zone Details

Tool to get details for a specific zone.

List Accounts

List accounts accessible to the credential for downstream account operations.

List DNS Records

List, search, sort, and filter DNS records for a Cloudflare zone.

List Email Routing Rules

List and filter Email Routing rules configured for a Cloudflare zone.

List Pages Deployments

List production or preview deployments for a Cloudflare Pages project.

List R2 Objects

List object metadata and keys in an R2 bucket with cursor pagination.

List Worker Build Triggers

List repository build triggers configured for a Worker external script ID.

List Cloudflare Zones

Tool to list, search, sort, and filter Cloudflare zones.

Overwrite DNS Record

Overwrites a DNS record in a Cloudflare zone using the supported record fields, including type, name, content, TTL, proxy status, comments, tags, and settings.

Rerun Zone Activation Check

Triggers a new activation check for a zone with 'pending' status.

Run Workers AI Model

Run a selected Workers AI model with model-specific JSON input.

Update DNSSEC Status

Tool to update DNSSEC configuration for a zone.

Update Lockdown Rule

Updates a Zone Lockdown rule in a Cloudflare zone, supplying both the allowed IP addresses or CIDR ranges and the URL patterns.

Update Rule in Ruleset

Tool to update a specific rule in a ruleset.

Update Ruleset

Update a Cloudflare ruleset, creating a new version.

Update Cloudflare Zone

Tool to edit a Cloudflare zone.

Upload File to S3

Upload UTF-8 encoded text content to temporary storage for staging files used by actions requiring FileUploadable.

FAQ

Frequently asked questions

With a standalone Cloudflare api key MCP server, the agents and LLMs can only access a fixed set of Cloudflare api key tools tied to that server. However, with the Composio Tool Router, agents can dynamically load tools from Cloudflare api key and many other apps based on the task at hand, all through a single MCP endpoint.

Yes, you can. Codex fully supports MCP integration. You get structured tool calling, message history handling, and model orchestration while Tool Router takes care of discovering and serving the right Cloudflare api key tools.

Yes, absolutely. You can configure which Cloudflare api key scopes and actions are allowed when connecting your account to Composio. You can also bring your own OAuth credentials or API configuration so you keep full control over what the agent can do.

All sensitive data such as tokens, keys, and configuration is fully encrypted at rest and in transit. Composio is SOC 2 Type 2 compliant and follows strict security practices so your Cloudflare api key data and credentials are handled as safely as possible.

Start with Cloudflare api key.It takes 30 seconds.

Managed auth, hosted MCP servers, and every Cloudflare api key tool your agent needs.Free to start.

Start building