{"_id":"cloudflare-dns-mcp","_rev":"9-260a2647809afa8539dc65ae91cf8251","name":"cloudflare-dns-mcp","dist-tags":{"latest":"2.0.1"},"versions":{"1.0.1":{"name":"cloudflare-dns-mcp","version":"1.0.1","keywords":["mcp","model-context-protocol","cloudflare","dns","claude","anthropic","ai","llm","dns-management","api","automation"],"author":{"name":"Daniil Shumko"},"license":"MIT","_id":"cloudflare-dns-mcp@1.0.1","maintainers":[{"name":"daniil-shumko","email":"daniil@rndteams.com"}],"homepage":"https://github.com/daniil-shumko/cloudflare-dns-mcp#readme","bugs":{"url":"https://github.com/daniil-shumko/cloudflare-dns-mcp/issues"},"bin":{"cloudflare-dns-mcp":"dist/index.js"},"dist":{"shasum":"faed4ea69a91358673ea04be7b56d068b4a4ee76","tarball":"https://registry.npmjs.org/cloudflare-dns-mcp/-/cloudflare-dns-mcp-1.0.1.tgz","fileCount":5,"integrity":"sha512-vurt7ppc9RD5ssw9t169ra7t/7CMwxeL/3mroxwrmQV+eXDRx2VGtVU2qYQui4t5J2mLcNDsJga+oppchyEk0Q==","signatures":[{"sig":"MEUCIQCmcKPopLh0ZZc3xMgugl7MfS9MEKHMllt8FQHPWYTIOAIgb9phhW8Kofeon2VXb9NzMzYCiD2dSKaRB0V898fkxOQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":59425},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"48e7e0539229d9faa3af6431fa61f1ba0b8845ed","scripts":{"dev":"tsup src/index.ts --format esm --watch","test":"vitest run","build":"tsup src/index.ts --format esm --dts --clean","start":"node dist/index.js","typecheck":"tsc --noEmit","test:watch":"vitest","test:coverage":"vitest run --coverage","prepublishOnly":"npm run build"},"_npmUser":{"name":"daniil-shumko","email":"daniil@rndteams.com"},"repository":{"url":"git+https://github.com/daniil-shumko/cloudflare-dns-mcp.git","type":"git"},"_npmVersion":"10.8.2","description":"MCP server for managing Cloudflare DNS records via Claude Desktop and Claude Code","directories":{},"_nodeVersion":"20.19.3","dependencies":{"zod":"^3.23.8","@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.1.0","vitest":"^4.0.14","typescript":"^5.5.0","@types/node":"^20.14.0"},"_npmOperationalInternal":{"tmp":"tmp/cloudflare-dns-mcp_1.0.1_1764526717227_0.4278958693463475","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"cloudflare-dns-mcp","version":"1.0.2","keywords":["mcp","model-context-protocol","cloudflare","dns","claude","anthropic","ai","llm","dns-management","api","automation"],"author":{"name":"Daniil Shumko"},"license":"MIT","_id":"cloudflare-dns-mcp@1.0.2","maintainers":[{"name":"daniil-shumko","email":"daniil@rndteams.com"}],"homepage":"https://github.com/daniil-shumko/cloudflare-dns-mcp#readme","bugs":{"url":"https://github.com/daniil-shumko/cloudflare-dns-mcp/issues"},"bin":{"cloudflare-dns-mcp":"dist/index.js"},"dist":{"shasum":"dc5f5e55717b5956c422f9dd0b674c5911e9ff61","tarball":"https://registry.npmjs.org/cloudflare-dns-mcp/-/cloudflare-dns-mcp-1.0.2.tgz","fileCount":5,"integrity":"sha512-d+D8l+7SzUxkwaLV9VqfQb0VKKVtjeBkzX/cUPtz3wAKn9lgehUc0dyn2J2vX6b9TpbCZptw1+QH281zqxDsjQ==","signatures":[{"sig":"MEYCIQDzJX5oOiIrx6kkdHsYndMPCmhkSkF/Wa6rXf6P0N04dwIhAKDlIriYwlRbrMffytHbaiu302MZSluPWcj3i7+/Klkq","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":59425},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"ead3e9cbb69850ed692ddc051816926bca21b00e","scripts":{"dev":"tsup src/index.ts --format esm --watch","test":"vitest run","build":"tsup src/index.ts --format esm --dts --clean","start":"node dist/index.js","typecheck":"tsc --noEmit","test:watch":"vitest","test:coverage":"vitest run --coverage","prepublishOnly":"npm run build"},"_npmUser":{"name":"daniil-shumko","email":"daniil@rndteams.com"},"repository":{"url":"git+https://github.com/daniil-shumko/cloudflare-dns-mcp.git","type":"git"},"_npmVersion":"10.8.2","description":"MCP server for managing Cloudflare DNS records via Claude Desktop and Claude Code","directories":{},"_nodeVersion":"20.19.5","dependencies":{"zod":"^3.23.8","@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.1.0","vitest":"^4.0.14","typescript":"^5.5.0","@types/node":"^20.14.0"},"_npmOperationalInternal":{"tmp":"tmp/cloudflare-dns-mcp_1.0.2_1764536200737_0.9182528204176095","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"cloudflare-dns-mcp","version":"1.1.0","keywords":["mcp","model-context-protocol","cloudflare","dns","claude","anthropic","ai","llm","dns-management","api","automation"],"author":{"name":"Daniil Shumko"},"license":"MIT","_id":"cloudflare-dns-mcp@1.1.0","maintainers":[{"name":"daniil-shumko","email":"daniil@rndteams.com"}],"homepage":"https://github.com/daniil-shumko/cloudflare-dns-mcp#readme","bugs":{"url":"https://github.com/daniil-shumko/cloudflare-dns-mcp/issues"},"bin":{"cloudflare-dns-mcp":"dist/index.js"},"dist":{"shasum":"3542ae393e93a669a2d424743618dd484ae11d30","tarball":"https://registry.npmjs.org/cloudflare-dns-mcp/-/cloudflare-dns-mcp-1.1.0.tgz","fileCount":5,"integrity":"sha512-w0Zp2uV3QD9Ozp1LevHK/2F3Yjqt3OO7hJvFwdr2KUCBaIAD74oPBs8mdySA9kqfucgVrOL7/3EzRCJe9t+hvg==","signatures":[{"sig":"MEQCIH6uhUrh+6SriQEvOlCuOPoHqQjH+oxt9wK+h9d0wI1bAiBuxHc5q0aM850otAJmV+AIpL7pumfjlbSp/TiWo5fXBw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":64053},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20.0.0"},"gitHead":"ac735c778e74130684de60726837ca7b77c973d5","scripts":{"dev":"tsup src/index.ts --format esm --watch","test":"vitest run","build":"tsup src/index.ts --format esm --dts --clean","start":"node dist/index.js","typecheck":"tsc --noEmit","test:watch":"vitest","test:coverage":"vitest run --coverage","prepublishOnly":"npm run build"},"_npmUser":{"name":"daniil-shumko","email":"daniil@rndteams.com"},"repository":{"url":"git+https://github.com/daniil-shumko/cloudflare-dns-mcp.git","type":"git"},"_npmVersion":"10.9.8","description":"MCP server for managing Cloudflare DNS records via Claude Desktop and Claude Code","directories":{},"_nodeVersion":"22.23.1","dependencies":{"zod":"^4.4.3","@modelcontextprotocol/sdk":"^1.29.0"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","vitest":"^4.1.0","typescript":"^6.0.3","@types/node":"^20.19.0"},"_npmOperationalInternal":{"tmp":"tmp/cloudflare-dns-mcp_1.1.0_1783936082862_0.42187809498359563","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"cloudflare-dns-mcp","version":"1.2.0","keywords":["mcp","model-context-protocol","cloudflare","dns","claude","anthropic","ai","llm","dns-management","api","automation"],"author":{"name":"Daniil Shumko"},"license":"MIT","_id":"cloudflare-dns-mcp@1.2.0","maintainers":[{"name":"daniil-shumko","email":"daniil@rndteams.com"}],"homepage":"https://github.com/daniil-shumko/cloudflare-dns-mcp#readme","bugs":{"url":"https://github.com/daniil-shumko/cloudflare-dns-mcp/issues"},"bin":{"cloudflare-dns-mcp":"dist/index.js"},"dist":{"shasum":"b923e1bd6ba0c4500d5bebaab999233c1561e133","tarball":"https://registry.npmjs.org/cloudflare-dns-mcp/-/cloudflare-dns-mcp-1.2.0.tgz","fileCount":5,"integrity":"sha512-Nk7TgDky6rbxT0adIZyxrat3aFj1atPJd622l8LhVvvUqsEd3ZXz9+UY9qucF10Arz2HdHu14rKBCdN4mC/LyA==","signatures":[{"sig":"MEYCIQCZI4VGjj3wBk9ZazGE4Qo/CoyC+qP7ahEpsrsn8zk13wIhAMGkPi1SrEPvizwV6EQvqq91xoFNADQ1uOVyL88itpst","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCICjdOPi7KFJJbFd7Mp11kPOyXJNnL1y6Pr3oc1f34p7QAiEA0AhK+Gzq7CIrZUTPd2OjMgbekH6HVu9pNkbu+BhdJA4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/cloudflare-dns-mcp@1.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":68841},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20.0.0"},"gitHead":"7de6ad9c5dfadcbb512aa18977defd6e67e46c2c","scripts":{"dev":"tsup src/index.ts --format esm --watch","test":"vitest run","build":"tsup src/index.ts --format esm --dts --clean","start":"node dist/index.js","typecheck":"tsc --noEmit","test:watch":"vitest","test:coverage":"vitest run --coverage","prepublishOnly":"npm run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"562a74a5-b119-4ebd-8d3e-b0db097ccb93"}},"repository":{"url":"git+https://github.com/daniil-shumko/cloudflare-dns-mcp.git","type":"git"},"_npmVersion":"11.19.1","description":"MCP server for managing Cloudflare DNS records via Claude Desktop and Claude Code","directories":{},"_nodeVersion":"24.22.2","dependencies":{"zod":"^4.6.7","@modelcontextprotocol/sdk":"^1.32.2"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.5.1","vitest":"^4.1.12","typescript":"^6.0.3","@types/node":"^20.19.0"},"_npmOperationalInternal":{"tmp":"tmp/cloudflare-dns-mcp_1.2.0_1793919548603_0.11926750087206439","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"cloudflare-dns-mcp","version":"2.0.0","keywords":["mcp","model-context-protocol","cloudflare","dns","claude","anthropic","ai","llm","dns-management","api","automation"],"author":{"name":"Daniil Shumko"},"license":"MIT","_id":"cloudflare-dns-mcp@2.0.0","maintainers":[{"name":"daniil-shumko","email":"daniil@rndteams.com"}],"homepage":"https://github.com/daniil-shumko/cloudflare-dns-mcp#readme","bugs":{"url":"https://github.com/daniil-shumko/cloudflare-dns-mcp/issues"},"bin":{"cloudflare-dns-mcp":"dist/index.js"},"dist":{"shasum":"a2166570c5ae844f21cd53714d93d5255dbb300c","tarball":"https://registry.npmjs.org/cloudflare-dns-mcp/-/cloudflare-dns-mcp-2.0.0.tgz","fileCount":5,"integrity":"sha512-Oe+swrlVtkBF9lPDO0p8p+Xe3VI+KClvDy49zIqU2XprllqNcYpaDo5isX2gcUuirE4RD2KHuQ/m7NVSy3ynZQ==","signatures":[{"sig":"MEUCIH5L23CQKUIR3pr18c6t70xjNX/xRZb5Gm6wAarH1nF/AiEAkMxATrkApp9rsuodnfVtIYTFdNHxxc5Rwl8zHWEDBlI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEQCICDOsRQwHhHrc3bRbiebRh2QBSqmOZAqA9PpgloSNvAMAiAxEJV/+5IJBmsKEGJ2CxFiS+DSCosddvCCnL5LGAJJwg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/cloudflare-dns-mcp@2.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":66066},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=22.0.0"},"gitHead":"8bdc6371a6f6a334cfa2a31f378691289ec31678","scripts":{"dev":"tsup src/index.ts --format esm --watch","test":"vitest run","build":"tsup src/index.ts --format esm --dts --clean","start":"node dist/index.js","typecheck":"tsc --noEmit","test:watch":"vitest","test:coverage":"vitest run --coverage","prepublishOnly":"npm run build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"562a74a5-b119-4ebd-8d3e-b0db097ccb93"}},"repository":{"url":"git+https://github.com/daniil-shumko/cloudflare-dns-mcp.git","type":"git"},"_npmVersion":"11.19.1","description":"MCP server for managing Cloudflare DNS records via Claude Desktop and Claude Code","directories":{},"_nodeVersion":"24.22.2","dependencies":{"zod":"^4.6.7","@modelcontextprotocol/server":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^9.0.0","vitest":"^5.1.0","typescript":"^6.0.3","@types/node":"^22.20.5","@modelcontextprotocol/client":"^2.4.0"},"_npmOperationalInternal":{"tmp":"tmp/cloudflare-dns-mcp_2.0.0_1793923146658_0.06857531483484403","host":"s3://npm-registry-packages-npm-production"}},"2.0.1":{"_id":"cloudflare-dns-mcp@2.0.1","bin":{"cloudflare-dns-mcp":"dist/index.js"},"bugs":{"url":"https://github.com/daniil-shumko/cloudflare-dns-mcp/issues"},"dist":{"shasum":"7640ef6bf1ab996e6e66a302964f2ed9a8f943ac","tarball":"https://registry.npmjs.org/cloudflare-dns-mcp/-/cloudflare-dns-mcp-2.0.1.tgz","fileCount":5,"integrity":"sha512-tzXE5qvFpQ5F+6f4yUsxGVaSBdc5vGDTO8jTGqnSfUWRpdc7fgN9kLYzlF6V6lyYTRs6huGMXe58MV8O0j1rVg==","signatures":[{"sig":"MEQCIH2n7Qwk5T4FN3rnr6MIoJtQwlFdcnGpbW7KeKCTaB33AiAL/FCIc+xwgwbA1IdkcNXck8dOXGrjV2cwMGZPp7qJkA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIE+lS96L3lROLT3FZj9zrsvy9c+qCcPL57N6DsvCXQWBAiBMVmypId+3bD4IPs/wzEj74XxmTjD6Z1SgRVfwTjwtng=="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/cloudflare-dns-mcp@2.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":69460},"main":"dist/index.js","name":"cloudflare-dns-mcp","type":"module","types":"./dist/index.d.ts","author":{"name":"Daniil Shumko"},"engines":{"node":">=22.0.0"},"gitHead":"b6b02d6f89e46076fca5e8f828d499185fa162fb","license":"MIT","scripts":{"dev":"tsup src/index.ts --format esm --watch","test":"vitest run","build":"tsup src/index.ts --format esm --dts --clean","start":"node dist/index.js","typecheck":"tsc --noEmit","test:watch":"vitest","test:coverage":"vitest run --coverage","prepublishOnly":"npm run build"},"version":"2.0.1","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"562a74a5-b119-4ebd-8d3e-b0db097ccb93"}},"homepage":"https://github.com/daniil-shumko/cloudflare-dns-mcp#readme","keywords":["mcp","model-context-protocol","cloudflare","dns","claude","anthropic","ai","llm","dns-management","api","automation"],"repository":{"url":"git+https://github.com/daniil-shumko/cloudflare-dns-mcp.git","type":"git"},"_npmVersion":"11.19.1","description":"MCP server for managing Cloudflare DNS records via Claude Desktop and Claude Code","directories":{},"maintainers":[{"name":"daniil-shumko","email":"daniil@rndteams.com"}],"_nodeVersion":"24.22.2","dependencies":{"zod":"^4.6.7","@modelcontextprotocol/server":"^2.4.0"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^9.0.0","vitest":"^5.1.0","typescript":"^6.0.3","@types/node":"^22.20.5","@modelcontextprotocol/client":"^2.4.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/cloudflare-dns-mcp_2.0.1_1793924829457_0.3500287692679174"}}},"time":{"created":"2025-11-30T18:18:37.097Z","modified":"2026-11-06T00:27:09.928Z","1.0.0":"2025-11-29T17:40:37.892Z","1.0.1":"2025-11-30T18:18:37.420Z","1.0.2":"2025-11-30T20:56:40.927Z","1.1.0":"2026-07-13T09:48:03.053Z","1.2.0":"2026-11-05T22:59:08.708Z","2.0.0":"2026-11-05T23:59:06.766Z","2.0.1":"2026-11-06T00:27:09.599Z"},"bugs":{"url":"https://github.com/daniil-shumko/cloudflare-dns-mcp/issues"},"author":{"name":"Daniil Shumko"},"license":"MIT","homepage":"https://github.com/daniil-shumko/cloudflare-dns-mcp#readme","keywords":["mcp","model-context-protocol","cloudflare","dns","claude","anthropic","ai","llm","dns-management","api","automation"],"repository":{"url":"git+https://github.com/daniil-shumko/cloudflare-dns-mcp.git","type":"git"},"description":"MCP server for managing Cloudflare DNS records via Claude Desktop and Claude Code","maintainers":[{"name":"daniil-shumko","email":"daniil@rndteams.com"}],"readme":"# Cloudflare DNS MCP Server\n\n> **Note:** This is an unofficial MCP server and is not affiliated with or endorsed by Cloudflare.\n\n[![npm version](https://img.shields.io/npm/v/cloudflare-dns-mcp.svg)](https://www.npmjs.com/package/cloudflare-dns-mcp)\n[![Tests](https://github.com/daniil-shumko/cloudflare-dns-mcp/actions/workflows/test.yml/badge.svg)](https://github.com/daniil-shumko/cloudflare-dns-mcp/actions/workflows/test.yml)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Node.js Version](https://img.shields.io/badge/node-%3E%3D22.0.0-brightgreen)](https://nodejs.org)\n[![MCP](https://img.shields.io/badge/MCP-Compatible-blue)](https://modelcontextprotocol.io)\n\n> ⚠️ **Security Warning**\n>\n> This MCP server was heavily \"vibe coded\" and should be used with caution. Before using:\n>\n> - **Review the code** - This tool has access to your Cloudflare account via API token\n> - **Clone the repository** - For security, clone this repo and run a local copy rather than using npx\n> - **Use minimal permissions** - Create an API token with only the permissions you need\n> - **Audit before use** - The code is simple enough to review in ~30 minutes\n> - **Backup DNS first** - Use the `backup_dns_records` tool to export your DNS settings before making any modifications\n>\n> ```bash\n> git clone https://github.com/daniil-shumko/cloudflare-dns-mcp\n> cd cloudflare-dns-mcp && npm install && npm run build\n> ```\n\nA [Model Context Protocol (MCP)](https://modelcontextprotocol.io) server for managing Cloudflare DNS records. Use natural language with Claude Desktop or Claude Code to list domains, view DNS records, and make DNS changes.\n\n## What is MCP?\n\nThe Model Context Protocol (MCP) is an open standard that allows AI assistants like Claude to securely connect to external tools and data sources. This server implements MCP to give Claude the ability to interact with your Cloudflare DNS settings.\n\n## Features\n\n- **List and search domains** - View all zones on your Cloudflare account\n- **Full DNS management** - Create, read, update, and delete DNS records\n- **Backup & export** - Export DNS records to JSON for backup or migration\n- **Wide record-type support** - Common types (A, AAAA, CNAME, TXT, MX, NS, SRV) via `content`, plus structured types (CAA, HTTPS, SVCB, TLSA, SSHFP, URI, …) via the `data` field\n- **Flexible identification** - Use either zone IDs or domain names\n- **Cloudflare proxy support** - Toggle orange cloud (proxy) status on records\n\n## Quick Start\n\nRequires **Node.js 22 or higher** (version 2.0 dropped Node 20, which reached end-of-life in April 2026).\n\n### 1. Install\n\n**Option A: Install from npm (recommended)**\n```bash\nnpm install -g cloudflare-dns-mcp\n```\n\n**Option B: Clone and build locally (for code review)**\n```bash\ngit clone https://github.com/daniil-shumko/cloudflare-dns-mcp.git\ncd cloudflare-dns-mcp\nnpm install\nnpm run build\n```\n\n### 2. Create Cloudflare API Token\n\n1. Go to [Cloudflare API Tokens](https://dash.cloudflare.com/profile/api-tokens)\n2. Click **\"Create Token\"**\n3. Use the **\"Edit zone DNS\"** template\n4. Copy the generated token\n\n### 3. Configure Claude Desktop\n\nAdd to your Claude Desktop config:\n\n**macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`\n**Windows**: `%APPDATA%\\Claude\\claude_desktop_config.json`\n\n**If installed via npm (Option A):**\n```json\n{\n  \"mcpServers\": {\n    \"cloudflare-dns\": {\n      \"command\": \"npx\",\n      \"args\": [\"cloudflare-dns-mcp\"],\n      \"env\": {\n        \"CLOUDFLARE_API_TOKEN\": \"your_token_here\"\n      }\n    }\n  }\n}\n```\n\n**If installed locally (Option B):**\n```json\n{\n  \"mcpServers\": {\n    \"cloudflare-dns\": {\n      \"command\": \"node\",\n      \"args\": [\"/absolute/path/to/cloudflare-dns-mcp/dist/index.js\"],\n      \"env\": {\n        \"CLOUDFLARE_API_TOKEN\": \"your_token_here\"\n      }\n    }\n  }\n}\n```\n\n### 4. Restart Claude Desktop\n\nThe server will now be available. Try asking Claude:\n> \"List all my Cloudflare domains\"\n\n### Updating\n\n- **npx:** `npx` can keep running a cached older version. Use `\"args\": [\"cloudflare-dns-mcp@latest\"]` to always get the newest release, or pin a major version (`\"cloudflare-dns-mcp@2\"`) to control upgrades.\n- **Global install:** `npm update -g cloudflare-dns-mcp`\n- **Local clone:** `git pull && npm install && npm run build`\n\nRestart Claude after updating.\n\n**Upgrading from 1.x to 2.0:** no configuration changes are needed. 2.0 requires Node.js 22+, supports both current MCP clients and the 2026-07-28 protocol revision, and adds `structuredContent` to the read tools. One visible change: invalid tool arguments now return the MCP SDK's plain-text message (`Input validation error: ...`) instead of a `VALIDATION_ERROR` JSON object; errors from the Cloudflare API keep their JSON format with `code` and `suggestion`.\n\n---\n\n## Available Tools\n\nThis MCP server provides 10 tools for DNS management:\n\n| Tool | Description |\n|------|-------------|\n| `add_zone` | Add a new domain to your Cloudflare account |\n| `list_zones` | List all domains on your account |\n| `get_zone_details` | Get detailed info about a domain |\n| `list_dns_records` | List DNS records for a domain |\n| `get_dns_record` | Get a specific record by ID |\n| `find_dns_records` | Search records by name |\n| `create_dns_record` | Create a new DNS record |\n| `update_dns_record` | Modify an existing record |\n| `delete_dns_record` | Remove a DNS record |\n| `backup_dns_records` | Export records to JSON |\n\nEvery tool returns its result as JSON text. The read tools (`list_zones`, `get_zone_details`, `list_dns_records`, `get_dns_record`, `find_dns_records`) also declare an [output schema](https://modelcontextprotocol.io/specification/2025-11-25/server/tools#output-schema) and return the same data as `structuredContent`, so clients can consume it without parsing text.\n\n---\n\n## Tool Reference\n\n### `add_zone`\n\nAdd a new domain (zone) to your Cloudflare account. The domain's nameservers must be updated at your registrar to point to Cloudflare's nameservers after adding.\n\n**Parameters:**\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `name` | string | Yes | The domain name to add (e.g., `example.com`) |\n| `account_id` | string | Yes | Your Cloudflare account ID (found in dashboard URL or API) |\n| `type` | string | No | Zone type: `full` (default), `partial`, `secondary`, or `internal` |\n\n**Finding your Account ID:**\n- In Cloudflare Dashboard URL: `https://dash.cloudflare.com/<ACCOUNT_ID>/...`\n- Via API: Use `list_zones` and check the `account.id` field in zone details\n\n**Example prompts:**\n- \"Add example.com to my Cloudflare account\"\n- \"Create a new zone for mydomain.io with account ID abc123\"\n\n**Response includes:**\n- Zone ID for future operations\n- Assigned nameservers to configure at your registrar\n- Zone status (typically `pending` until nameservers are updated)\n\n> ⚠️ **Permission Note:** This tool requires confirmation before each use and cannot be permanently auto-approved. This is a security measure as adding zones affects your Cloudflare account configuration.\n\n---\n\n### `list_zones`\n\nList all domains (zones) on your Cloudflare account.\n\n**Parameters:**\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `page` | number | No | Page number (default: 1) |\n| `per_page` | number | No | Results per page, 5-50 (default: 50) |\n| `name` | string | No | Filter by domain name (partial match) |\n| `status` | string | No | Filter by status: `active`, `pending`, `initializing`, `moved` |\n\n**Example prompts:**\n- \"List all my domains\"\n- \"Show me my active Cloudflare zones\"\n- \"Find domains containing 'example'\"\n\n---\n\n### `get_zone_details`\n\nGet detailed information about a specific domain including nameservers, plan, and settings.\n\n**Parameters:**\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `zone_id` | string | No* | The zone ID (32-character hex string) |\n| `domain_name` | string | No* | The domain name (e.g., `example.com`) |\n\n*One of `zone_id` or `domain_name` is required.\n\n**Example prompts:**\n- \"Show me details for example.com\"\n- \"What nameservers is mysite.com using?\"\n- \"What plan is example.com on?\"\n\n---\n\n### `list_dns_records`\n\nList all DNS records for a domain.\n\n**Parameters:**\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `zone_id` | string | No* | The zone ID |\n| `domain_name` | string | No* | The domain name |\n| `type` | string | No | Filter by record type: `A`, `AAAA`, `CNAME`, `TXT`, `MX`, `NS`, `SRV`, `CAA`, `PTR`, `HTTPS`, `SVCB`, and other standard types |\n| `name` | string | No | Filter by record name |\n| `page` | number | No | Page number (default: 1) |\n| `per_page` | number | No | Results per page, max 100 (default: 100) |\n\n*One of `zone_id` or `domain_name` is required.\n\n**Example prompts:**\n- \"What DNS records does example.com have?\"\n- \"Show me all A records for mysite.com\"\n- \"List the MX records for my email domain\"\n\n---\n\n### `get_dns_record`\n\nGet details of a specific DNS record by its ID.\n\n**Parameters:**\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `zone_id` | string | Yes | The zone ID |\n| `record_id` | string | Yes | The DNS record ID |\n\n---\n\n### `find_dns_records`\n\nSearch for DNS records by name. Useful for finding record IDs before updating or deleting.\n\n**Parameters:**\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `zone_id` | string | No* | The zone ID |\n| `domain_name` | string | No* | The domain name |\n| `record_name` | string | Yes | The record name to search for (e.g., `www.example.com`) |\n| `type` | string | No | Filter by record type |\n\n*One of `zone_id` or `domain_name` is required.\n\n**Example prompts:**\n- \"Find the record ID for www.example.com\"\n- \"Look up the A record for api.example.com\"\n- \"What's the record ID for mail.example.com?\"\n\n---\n\n### `create_dns_record`\n\nCreate a new DNS record.\n\n**Parameters:**\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `zone_id` | string | No* | The zone ID |\n| `domain_name` | string | No* | The domain name |\n| `type` | string | Yes | Record type: `A`, `AAAA`, `CNAME`, `TXT`, `MX`, `NS`, `SRV`, `CAA`, `HTTPS`, `SVCB`, `TLSA`, `SSHFP`, `URI`, and other standard types |\n| `name` | string | Yes | Record name (use `@` or domain for root) |\n| `content` | string | No** | Record content (IP, hostname, or text) for simple records |\n| `data` | object | No** | Structured data for records whose content is read-only, e.g. CAA `{ flags, tag, value }`, SRV `{ priority, weight, port, target }` (service and protocol go in `name`, e.g. `_sip._tcp`), or HTTPS/SVCB params |\n| `ttl` | number | No | TTL in seconds: `1` = automatic (default), otherwise `60`–`86400` (minimum `30` on Enterprise zones) |\n| `proxied` | boolean | No | Enable Cloudflare proxy (default: false) |\n| `priority` | number | No | Priority for MX and URI records |\n| `comment` | string | No | Optional comment |\n| `tags` | string[] | No | Optional custom tags |\n\n*One of `zone_id` or `domain_name` is required.\n**One of `content` (simple records) or `data` (structured records like CAA) is required.\n\n**Example prompts:**\n- \"Add an A record for www.example.com pointing to 192.168.1.1\"\n- \"Create a CNAME for blog.example.com pointing to myblog.netlify.app\"\n- \"Add a TXT record for _dmarc.example.com with value 'v=DMARC1; p=none'\"\n- \"Set up an MX record for example.com with priority 10 pointing to mail.example.com\"\n- \"Add an A record for api.example.com with Cloudflare proxy enabled\"\n\n---\n\n### `update_dns_record`\n\nUpdate an existing DNS record. Only specify the fields you want to change.\n\n> **Changing the record type** replaces the record. Cloudflare no longer allows in-place type changes (end-of-life 2026-06-30), so the server deletes the old record and creates the new one in a single atomic [batch](https://developers.cloudflare.com/dns/manage-dns-records/how-to/batch-record-changes/) request. The new record gets a **new ID** (the response includes `replaced_record_id`), new `content` (or `data`) is required, and name, TTL, comment and tags carry over unless you set them.\n\n**Parameters:**\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `zone_id` | string | Yes | The zone ID |\n| `record_id` | string | Yes | The DNS record ID to update |\n| `type` | string | No | New record type (replaces the record; see note above) |\n| `name` | string | No | New record name |\n| `content` | string | No | New content |\n| `ttl` | number | No | New TTL (`1` = automatic, otherwise `60`–`86400`; minimum `30` on Enterprise zones) |\n| `proxied` | boolean | No | New proxy status |\n| `priority` | number | No | New priority (for MX and URI records) |\n| `comment` | string | No | New comment |\n| `tags` | string[] | No | New custom tags |\n| `data` | object | No | New structured data (CAA/SRV/HTTPS/SVCB) |\n\n**Example prompts:**\n- \"Change the IP for www.example.com to 10.0.0.1\"\n- \"Change the priority of the MX record to 20\"\n- \"Enable Cloudflare proxy for the www record on example.com\"\n- \"Update the TTL for api.example.com to 300 seconds\"\n\n---\n\n### `delete_dns_record`\n\nDelete a DNS record. **This action is irreversible.**\n\n**Parameters:**\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `zone_id` | string | Yes | The zone ID |\n| `record_id` | string | Yes | The DNS record ID to delete |\n\n**Example prompts:**\n- \"Delete the old CNAME record for legacy.example.com\"\n- \"Remove the TXT verification record from example.com\"\n\n---\n\n### `backup_dns_records`\n\nBackup DNS records to JSON format. Can backup a single domain or all domains on the account.\n\n**Parameters:**\n| Parameter | Type | Required | Description |\n|-----------|------|----------|-------------|\n| `zone_id` | string | No | Zone ID to backup (omit for all domains) |\n| `domain_name` | string | No | Domain to backup (omit for all domains) |\n\nIf neither parameter is provided, **all domains** will be backed up.\n\nEach backed-up record includes its `type`, `name`, `content`, `ttl`, `proxied`, and (when set) `priority` and `comment`. Record types the tools can't recreate (such as a system-managed SOA) are skipped.\n\n> **Limitation:** backups do not include the structured `data` field or `tags`. Records whose content is set through `data` (CAA, SRV, HTTPS, SVCB, TLSA, …) therefore can't be recreated from a backup as-is, and restored records lose their tags. Simple records (A, AAAA, CNAME, TXT, MX, NS, …) restore fully.\n\n**Example prompts:**\n- \"Backup all DNS records for example.com\"\n- \"Create a backup of all my domains' DNS records\"\n- \"Export DNS settings for mysite.com and save to dns-backup.json\"\n\n**Backup JSON format:**\n```json\n{\n  \"version\": \"1.0\",\n  \"created_at\": \"2024-01-15T10:30:00.000Z\",\n  \"backup_type\": \"single_zone\",\n  \"zones\": [\n    {\n      \"zone_id\": \"abc123def456...\",\n      \"zone_name\": \"example.com\",\n      \"records\": [\n        {\n          \"type\": \"A\",\n          \"name\": \"example.com\",\n          \"content\": \"192.168.1.1\",\n          \"ttl\": 1,\n          \"proxied\": true\n        },\n        {\n          \"type\": \"CNAME\",\n          \"name\": \"www.example.com\",\n          \"content\": \"example.com\",\n          \"ttl\": 1,\n          \"proxied\": true\n        },\n        {\n          \"type\": \"MX\",\n          \"name\": \"example.com\",\n          \"content\": \"mail.example.com\",\n          \"ttl\": 3600,\n          \"proxied\": false,\n          \"priority\": 10\n        }\n      ],\n      \"record_count\": 3\n    }\n  ],\n  \"total_zones\": 1,\n  \"total_records\": 3\n}\n```\n\n### Restoring from Backup\n\nThe backup format is designed to work with the `create_dns_record` tool. To restore:\n\n1. Load the backup JSON file\n2. For each record in each zone, use `create_dns_record` with the record data\n3. The `zone_name` field identifies which domain to restore to\n\nExample restore prompt:\n> \"Read the backup file dns-backup.json and recreate all the DNS records for example.com\"\n\n---\n\n## Configuration\n\n### Claude Desktop\n\n**Config file locations:**\n- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`\n- **Windows**: `%APPDATA%\\Claude\\claude_desktop_config.json`\n- **Linux**: `~/.config/Claude/claude_desktop_config.json`\n\n**Using npx (recommended):**\n```json\n{\n  \"mcpServers\": {\n    \"cloudflare-dns\": {\n      \"command\": \"npx\",\n      \"args\": [\"cloudflare-dns-mcp\"],\n      \"env\": {\n        \"CLOUDFLARE_API_TOKEN\": \"your_token_here\"\n      }\n    }\n  }\n}\n```\n\n**Using local installation:**\n```json\n{\n  \"mcpServers\": {\n    \"cloudflare-dns\": {\n      \"command\": \"node\",\n      \"args\": [\"/absolute/path/to/cloudflare-dns-mcp/dist/index.js\"],\n      \"env\": {\n        \"CLOUDFLARE_API_TOKEN\": \"your_token_here\"\n      }\n    }\n  }\n}\n```\n\n### Claude Code\n\n**Using npx (recommended):**\n\nAdd to your project's `.mcp.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"cloudflare-dns\": {\n      \"command\": \"npx\",\n      \"args\": [\"cloudflare-dns-mcp\"],\n      \"env\": {\n        \"CLOUDFLARE_API_TOKEN\": \"your_token_here\"\n      }\n    }\n  }\n}\n```\n\nOr use the CLI:\n```bash\nclaude mcp add cloudflare-dns --env CLOUDFLARE_API_TOKEN=your_token_here -- npx cloudflare-dns-mcp\n```\n\n**Using local installation:**\n\n```json\n{\n  \"mcpServers\": {\n    \"cloudflare-dns\": {\n      \"command\": \"node\",\n      \"args\": [\"/absolute/path/to/cloudflare-dns-mcp/dist/index.js\"],\n      \"env\": {\n        \"CLOUDFLARE_API_TOKEN\": \"your_token_here\"\n      }\n    }\n  }\n}\n```\n\n### Environment Variables\n\n| Variable | Required | Description |\n|----------|----------|-------------|\n| `CLOUDFLARE_API_TOKEN` | Yes | Your Cloudflare API token |\n\n### Creating a Cloudflare API Token\n\n1. Go to [Cloudflare Dashboard > API Tokens](https://dash.cloudflare.com/profile/api-tokens)\n2. Click **\"Create Token\"**\n3. Choose one of:\n   - **\"Edit zone DNS\" template** - Pre-configured for DNS management (read/edit records)\n   - **Custom token** with these permissions:\n     - `Zone.Zone` → Read (required for listing and viewing zones)\n     - `Zone.DNS` → Edit (required for DNS record management)\n     - `Zone.Zone` → Edit (required only for `add_zone` tool)\n4. (Optional) Restrict to specific zones for better security\n5. Copy the generated token\n\nFor read-only use (listing, viewing, finding and backing up records), `Zone.DNS → Read` is enough instead of `Edit`.\n\nBoth user API tokens and account-owned API tokens (prefixed `cfat_`) work. If a token is restricted to specific zones, it may still *list* other zones (when it has account-wide `Zone.Zone → Read`), but DNS calls on zones outside its scope fail; see [Authentication or permission errors](#authentication-or-permission-errors).\n\n> **Note:** If you only need to manage DNS records for existing domains, you don't need `Zone.Zone → Edit`. Add this permission only if you want to use the `add_zone` tool to add new domains.\n\n---\n\n## Development\n\n### Prerequisites\n\n- Node.js 22 or higher\n- npm or yarn\n\n### Setup\n\n```bash\n# Clone the repository\ngit clone https://github.com/daniil-shumko/cloudflare-dns-mcp.git\ncd cloudflare-dns-mcp\n\n# Install dependencies\nnpm install\n\n# Build the project\nnpm run build\n```\n\n### Available Scripts\n\n```bash\nnpm run build         # Build for production\nnpm run dev           # Watch mode (rebuild on changes)\nnpm run typecheck     # Run TypeScript type checking\nnpm run test          # Run test suite\nnpm run test:watch    # Run tests in watch mode\nnpm run test:coverage # Run tests with coverage report\nnpm run start         # Run the built server\n```\n\n### Project Structure\n\n```\ncloudflare-dns-mcp/\n├── src/\n│   ├── index.ts              # stdio entry point\n│   ├── server.ts             # McpServer setup and tool registration\n│   ├── globals.d.ts          # Build-time globals (__SERVER_VERSION__)\n│   ├── cloudflare/\n│   │   ├── client.ts         # Cloudflare API client\n│   │   └── types.ts          # TypeScript type definitions\n│   ├── tools/\n│   │   ├── index.ts          # Tools module exports\n│   │   ├── schemas.ts        # Zod input schemas (source of the published JSON Schema)\n│   │   ├── definitions.ts    # Tool registry: metadata, annotations, handlers\n│   │   ├── outputs.ts        # Output schemas for the read tools' structuredContent\n│   │   ├── handlers.ts       # Tool implementations\n│   │   └── types.ts          # Tool-specific types\n│   └── utils/\n│       ├── config.ts         # Configuration loader\n│       └── errors.ts         # Error handling utilities\n├── tests/                    # Unit, protocol (in-memory client) and stdio e2e tests\n├── dist/                     # Compiled JavaScript (generated)\n├── package.json\n├── tsconfig.json\n├── tsup.config.ts            # Build config (injects the package version)\n├── vitest.config.ts\n└── README.md\n```\n\n### Testing\n\nRun the test suite:\n\n```bash\nnpm test\n```\n\nThe suite has three layers: unit tests for schemas, handlers, the API client and error formatting; protocol tests (`tests/server.test.ts`) that drive the server with a real MCP client over an in-memory transport, with the Cloudflare API stubbed; and an end-to-end test (`tests/stdio.e2e.test.ts`) that builds and spawns the server and connects over stdio with both 2025-11-25 and 2026-07-28 clients. No test calls the real Cloudflare API.\n\nTest the server manually:\n\n```bash\n# Set your API token\nexport CLOUDFLARE_API_TOKEN=\"your_token_here\"\n\n# Test server startup\nnode dist/index.js\n\n# Test with JSON-RPC (list tools)\necho '{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"tools/list\",\"params\":{}}' | node dist/index.js\n```\n\n---\n\n## Troubleshooting\n\n### \"CLOUDFLARE_API_TOKEN environment variable is required\"\n\nThe API token is not set. Make sure you've added it to your MCP configuration's `env` block.\n\n### \"Zone not found\"\n\n- The domain might not exist in your Cloudflare account\n- Your API token might not have access to this zone\n- Check for typos in the domain name\n\n### Authentication or permission errors\n\nThe error's `code` tells the two cases apart:\n\n- **Token is valid but lacks permission** (`CF_10000` \"Authentication error\" with HTTP 403, or `CF_6111`): the token isn't permitted for that zone or action. This is common with tokens restricted to specific zones — they can list zones they can't read DNS for. Check the token's zone resources and that it has `Zone.DNS` (Read, or Edit for changes) and `Zone.Zone: Read`; `add_zone` also needs `Zone.Zone: Edit`. The error includes a `documentation_url` for the API endpoint that was denied.\n- **Token is invalid, expired or malformed** (`CF_9109` \"Invalid access token\", `CF_10000` with HTTP 401, or `CF_6003` / `CF_9106`): check that `CLOUDFLARE_API_TOKEN` is copied correctly and still active.\n\nThe `suggestion` field in the error response states which case applies.\n\n### Server not appearing in Claude Desktop\n\n1. Verify the path to `dist/index.js` is absolute (not relative)\n2. Restart Claude Desktop after changing the config\n3. Check that the build completed successfully (`npm run build`)\n4. Check Claude Desktop logs for errors\n\n### Rate limiting\n\nThe Cloudflare API allows 1,200 requests per 5 minutes per token. When a request is rate limited, the error's `suggestion` includes how long to wait (from Cloudflare's `retry-after` header).\n\n---\n\n## Security Best Practices\n\n- **Never commit your API token** to version control\n- **Use environment variables** for token storage\n- **Create minimal-permission tokens** - only grant Zone.Zone:Read and Zone.DNS:Edit\n- **Scope tokens to specific zones** if you only need to manage certain domains\n- **Rotate tokens periodically** for better security\n- **Review audit logs** in Cloudflare dashboard for API activity\n\n### Tool Permission Levels\n\nThis MCP server uses [MCP Tool Annotations](https://modelcontextprotocol.io/specification/2025-11-25/server/tools) to indicate tool behavior and permission requirements:\n\n| Tool | Read-Only | Destructive | Behavior |\n|------|-----------|-------------|----------|\n| `list_zones` | ✅ | - | Safe to auto-approve |\n| `get_zone_details` | ✅ | - | Safe to auto-approve |\n| `list_dns_records` | ✅ | - | Safe to auto-approve |\n| `get_dns_record` | ✅ | - | Safe to auto-approve |\n| `find_dns_records` | ✅ | - | Safe to auto-approve |\n| `backup_dns_records` | ✅ | - | Safe to auto-approve |\n| `create_dns_record` | - | - | Can be auto-approved (additive only) |\n| `update_dns_record` | - | ⚠️ | **Session-only approval** (can break DNS) |\n| `delete_dns_record` | - | ⚠️ | **Session-only approval** (irreversible) |\n| `add_zone` | - | ⚠️ | **Session-only approval** (account-level change) |\n\n**Tools marked with `destructiveHint: true`** (update, delete, add_zone):\n- Require confirmation before each use\n- Cannot be permanently auto-approved across sessions\n- Must be re-approved in new Claude Code sessions\n\n**Why these tools require extra confirmation:**\n- `add_zone` - Modifies account configuration, may have billing implications\n- `update_dns_record` - Can misconfigure critical DNS settings (email, website)\n- `delete_dns_record` - Irreversible action that can break services\n\n---\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add some amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n### Development Guidelines\n\n- Follow the existing code style\n- Add TypeScript types for new features\n- Tool input schemas and the parameter descriptions clients see live in `src/tools/schemas.ts` (Zod `.describe()`); there is no separate JSON Schema to edit\n- Update README for new tools or parameters\n- Test changes with both Claude Desktop and Claude Code\n\n---\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n---\n\n## Acknowledgments\n\n- [Anthropic](https://anthropic.com) for Claude and the Model Context Protocol\n- [Cloudflare](https://cloudflare.com) for their excellent API\n\n---\n\n## Related Projects\n\n- [Model Context Protocol](https://modelcontextprotocol.io) - The MCP specification\n- [MCP Servers](https://github.com/modelcontextprotocol/servers) - Official MCP server implementations\n- [Cloudflare API Docs](https://developers.cloudflare.com/api/) - Cloudflare API documentation\n","readmeFilename":"README.md"}