cloudflare-api-mcp
Provides tools to interact with the Cloudflare REST API, enabling management of DNS records and other Cloudflare resources.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
cloudflare-api-mcp
This is a lightweight Model Control Protocol (MCP) server bootstrapped with create-mcp and deployed on Cloudflare Workers.
This MCP server allows agents (such as Cursor) to interface with the Cloudflare REST API.
It's still under development, I will be adding more tools as I find myself needing them.
Available Tools
See src/index.ts for the current list of tools. Every method in the class is an MCP tool.
Related MCP server: Cloudflare Control
Installation
Run the automated install script to clone this MCP server and deploy it to your Cloudflare account:
bun create mcp --clone https://github.com/zueai/cloudflare-api-mcpOpen
Cursor Settings -> MCP -> Add new MCP serverand paste the command that was copied to your clipboard.Upload your Cloudflare API key and email to your worker secrets:
bunx wrangler secret put CLOUDFLARE_API_KEY
bunx wrangler secret put CLOUDFLARE_API_EMAILLocal Development
Add your Cloudflare API key and email to the .dev.vars file:
CLOUDFLARE_API_KEY=<your-cloudflare-api-key>
CLOUDFLARE_API_EMAIL=<your-cloudflare-api-email>Deploying
Run the deploy script:
bun run deployReload your Cursor window to see the new tools.
How to Create New MCP Tools
To create new MCP tools, add methods to the MyWorker class in src/index.ts. Each function will automatically become an MCP tool that your agent can use.
Example:
/**
* Create a new DNS record in a zone.
* @param zoneId {string} The ID of the zone to create the record in.
* @param name {string} The name of the DNS record.
* @param content {string} The content of the DNS record.
* @param type {string} The type of DNS record (CNAME, A, TXT, or MX).
* @param comment {string} Optional comment for the DNS record.
* @param proxied {boolean} Optional whether to proxy the record through Cloudflare.
* @return {object} The created DNS record.
*/
createDNSRecord(zoneId: string, name: string, content: string, type: string, comment?: string, proxied?: boolean) {
// Implementation
}The JSDoc comments are important:
First line becomes the tool's description
@paramtags define the tool's parameters with types and descriptions@returntag specifies the return value and type
Learn More
This server cannot be deployed
Maintenance
Related MCP Connectors
29 DNS, SEO, SSL, security, WHOIS & mail tools for AI agents. Pay per call (x402) or card API key.
Manage hosts, redirects, SSL, and traffic analytics from Claude and other AI assistants.
Provides capabilities that let LLM agents perform a range of infrastructure management tasks.
Register, transfer and manage domain names and DNS from your AI agent.
Related MCP Servers
- AlicenseAqualityBmaintenanceEnables AI assistants to manage Cloudflare resources through natural language, including DNS records, zone management, Workers KV storage, cache purging, and analytics. Supports comprehensive Cloudflare operations with secure API token authentication.132MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage Cloudflare infrastructure including DNS records, cache purging, SSL settings, Workers, and analytics through the Cloudflare API. Eliminates dashboard context-switching by allowing natural language control of domain management and infrastructure operations.-
- AlicenseAqualityDmaintenanceEnables AI assistants to manage Cloudflare DNS zones and records, including listing, creating, updating, and deleting DNS records through natural language.6MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to manage Cloudflare DNS records, including listing zones and records, and creating, updating, or deleting DNS records.16 npmMIT