Table of contents

The moment you start building something that talks to Cloudflare's API, such as a deploy script, you need details that only live in the API's responses.
What fields does a DNS record object return, and which ones are writable? How does the KV key-listing endpoint paginate? What's the shape of the analytics response you're about to parse?
Without the MCP connection, answering those means leaving the editor, hitting Cloudflare's API separately, reading responses, and pasting them back into the session where the integration code is being written.
To help your developers inspect Cloudflare's API and query real resources without leaving Cursor, we'll show you how to connect Cloudflare with Merge Agent Handler's Cloudflare MCP server.
Merge Agent Handler connects Cursor to the Cloudflare API through the Merge CLI.
You install the CLI, authenticate once, and run a single setup command from your project root. That command writes a ## Merge CLI section to your project's .cursorrules file, which tells Cursor's agent when to call merge search-tools and merge execute-tool to reach Cloudflare.
Once connected, Merge manages your Cloudflare API token, so you never store credentials locally or rotate them by hand across the team.
Related: How to use the Cloudflare MCP in Claude Code
Before getting started, you'll need the following:
pipx --version to confirm, or install via pip install pipx)If you want to connect Merge Agent Handler's Cloudflare MCP with internal or customer-facing agentic products, you can follow the steps in our docs.
Install the Merge CLI with pipx: pipx install merge-api
Verify your installation: merge --version
Authenticate the CLI with your Merge Agent Handler account: merge login
This links the CLI to your account so it can make authorized requests to Cloudflare on your behalf.
Run the following from the root of the project where you want to use Merge tools:
This writes a ## Merge CLI section to .cursorrules so Cursor knows to use the CLI for third-party services. The command is idempotent, safe to re-run if you need to reset.
Related: Steps for integrating a Cloudflare MCP with Codex
Open a Cursor chat in your project and try a prompt such as:
Fetch the DNS records for my primary zone and show one full record object so I can see the type, content, ttl, and proxied fields before I write the record-sync function.
The first time you invoke a Cloudflare tool, a Magic Link will appear to complete connector authentication.

{{this-blog-only-cta}}
In case you have more questions on setting up and using the Cloudflare MCP in Cursor, we've addressed several more commonly-asked questions below.
With Cloudflare connected, Cursor can:
type, content, ttl, and proxied fields, and which are writable, so the create/update calls you write match the APIlist_complete flag behave so your loop terminates correctly{result, success, errors, result_info} wrapper on a real call so your deserialization and error handling match the actual shapeYou can build your own MCP server on top of Cloudflare's API. For a solo developer on a personal account, it's manageable: create a Cloudflare API token, write a small server, and point Cursor at it.
It breaks down at the team level.
Self-hosting means each developer manages their own Cloudflare API token, scoped however they set it up. There's no central place to control which zones or resources an agent can reach, no audit log of what agents read or changed, and token rotation becomes a manual coordination problem across the team.
Merge Agent Handler is a managed MCP layer. It centralizes authentication and lets you scope access so each agent only reaches the zones and operations you explicitly allow, and it logs every tool call. When you need to audit what an agent queried or modified in Cloudflare, the record is there.
For teams writing code against production Cloudflare infrastructure, that combination of scoped access and central logging is the foundation you want before agents start touching live zones.
Cloudflare's API data, the DNS record shape, the KV listing contract, the analytics response, the result envelope, isn't something you can accurately reconstruct from documentation alone.
These are real-response details: proxied records behave differently than unproxied ones, KV listings paginate with an opaque cursor, and every call wraps its payload in a standard success/errors envelope.
Connecting Cloudflare to Cursor puts that discovery step inside the editor.
Yes, Merge for Workforce is built to help engineering organizations provision, secure, and govern how employees connect AI tools like Cursor to operational tools like Cloudflare.
Common patterns include:
The result is that employees can use the Cloudflare MCP to write DNS automation against real record shapes, build KV pipelines grounded in the actual pagination contract, and write deploy logic that targets real Worker config, and more, while IT keeps centralized control over which zones each agent can reach.
Use Merge Agent Handler’s 150+ connectors (including Cloudflare) to power reliable, secure, and powerful agents.