MCP SERVER
Cloudflare Pages deployment via Direct Upload API. No CI/CD pipeline — just files in, live URL out.
| Tool | Purpose | Returns |
|---|---|---|
| create_project | Create or verify a Cloudflare Pages project exists. Idempotent — safe to call repeatedly without side effects. | Project name, URL, created timestamp, status (existing/created) |
| deploy_file | Deploy a single HTML file. Filename becomes the URL path. Simpler than directory deploy for single-page sites. | Deployment URL, ID, file size, deduplication flag |
| deploy_directory | Deploy a directory of files with recursive traversal. Computes MD5 hashes, uploads only missing files, creates atomic deployment. | Full deployment result with live HTTPS URL |
| list_projects | List all Cloudflare Pages projects in the account with their base URLs. | Array of project names and URLs |
| get_project | Get metadata for a specific project — name, domain, creation date. | Project name, URL, created timestamp |
Every deployment follows a five-step protocol against the Cloudflare Pages API. First, obtain a JWT upload token for the target project. Then compute MD5 hashes for every file. Ask Cloudflare which hashes it already has. Upload only the missing files as base64 payloads with content-type metadata. Finally, submit a manifest mapping URL paths to content hashes — Cloudflare assembles the deployment atomically.
Files are content-addressed by their MD5 hash. If Cloudflare already has a file from a previous deployment, it skips the upload entirely. A 50-file site where only 2 files changed means only 2 uploads. The check-missing API call returns exactly which hashes need uploading — zero wasted bandwidth.
Files are read as raw buffers and base64-encoded for transport. No UTF-8 assumptions — images, fonts, PDFs, and HTML all travel the same path. The built-in MIME type resolver covers ~30 file extensions for correct Content-Type headers.
The manifest submission is all-or-nothing. Either every file in the manifest resolves to a known hash and the deployment goes live, or the entire operation fails. No partial deployments, no broken intermediate states.
Pass an optional branch name to create preview deployments. Production deploys go to the main branch by default. Preview branches get their own subdomain — useful for staging content before promoting to production.
Gutenberg renders YAML page specs to HTML files and captures PNG screenshots. Pages-helper takes the rendered output directory and publishes it to Cloudflare Pages. The separation means Gutenberg has zero Cloudflare dependencies — it produces static files, pages-helper ships them. The type system enforces the handoff: GutenbergSpecPath → HTMLFilePath → DirectoryPath → CloudflareURL.
Chromata resolves color schemes to RGB values that Gutenberg bakes into rendered HTML. Pages-helper deploys those files unchanged — the color fidelity from OKLCH gamut mapping survives all the way to the live URL. What chromata computed is exactly what the browser renders.
The server that deploys the page you're reading.