• DEPLOY
  • REVERT
  • AUDIT
  • HUMAN

How to deploy and rollback Workers with your AI

Connect your AI to Cloudflare to manage serverless lifecycles. You can push new code or revert to a stable version through a single chat prompt.

Ask AI about this page

Short answer

How can I deploy and rollback Workers using AI?

Your AI interacts with Cloudflare to deploy new versions and manage traffic shifts. It can also pull your version history to identify which deployment to revert to. This allows you to handle edge deployments without touching the CLI.

Deployment outcomes

What you can achieve

These are the results of your deployment commands.

DEPLOY

New code live

The AI pushes a new version to the edge. Your updated function starts running immediately.

REVERT

Instant rollbacks

If a deployment breaks, your AI shifts traffic back to a previous version. This fixes issues without manual intervention.

AUDIT

Version history

Your agent pulls a list of all past deployments. You get a clear view of what has run on your Workers.

HUMAN

Final approval

The AI handles the versioning logic, but you decide when a deployment is ready for production.

The workflow

What your AI does when <the thing arrives>.

The AI manages the heavy lifting of version control and traffic shifting.

  1. Find Workers

    The AI identifies your serverless functions so you can target specific ones for updates.

    list_workers
  2. Check History

    The AI looks up existing versions to ensure you have a safe state to return to.

    list_worker_versionsget_worker_version
  3. Deploy Updates

    The AI creates a new deployment for the specified Worker.

    create_deployment
  4. Verify State

    The AI pulls current Worker details to confirm the deployment was successful.

    get_worker

Try it

Copy these to start.

Use these prompts to begin managing your Cloudflare environment.

Starting points

Swap out the Worker names like 'api-handler' with your actual function names.

Cloudflare Connector

You're all set. Choose your MCP client and follow the setup instructions.

Connector linkhttps://edge.vinkius.com/vk_preview_QxZIaIoAXIL23CyRLSDVkRwHXoDvC0VRLSwRYtQS/mcp

Claude Desktop

Follow the steps below to connect in seconds.

  1. 1In Claude Desktop, open Settings → Connectors.
  2. 2Click “Add custom connector” and paste the connector link above as the remote MCP server URL.
  3. 3Click Add and start a new chat — Cloudflare capabilities are ready to use.
Configuration · claude_desktop_config.jsonCopy
{
  "mcpServers": {
    "cloudflare-mcp": {
      "url": "https://edge.vinkius.com/vk_preview_QxZIaIoAXIL23CyRLSDVkRwHXoDvC0VRLSwRYtQS/mcp"
    }
  }
}
Copy into chat04
  • List all my Workers so I can see what is currently deployed.

  • Show me the version history for the 'auth-service' Worker.

  • Deploy a new version for the 'frontend-proxy' Worker.

  • Rollback the 'data-fetcher' Worker to the previous version.

  • Claude
  • ChatGPT
  • Cursor
  • VS Code
  • Windsurf
  • Claude Code
  • JetBrains
  • Cline

Start here

Connect Cloudflare once, then ask.

Link your account once to give your AI access. Your credentials stay encrypted, and you can start managing deployments immediately.

Connect Cloudflare to your AI

FAQ

How this task behaves

  • 01

    Can the AI delete my Workers?

    No. The AI can only list, get, and deploy versions. It cannot delete Workers.

  • 02

    Can the AI change my Cloudflare account settings?

    No. The AI is limited to managing Worker deployments and versioning.

  • 03

    How does the AI know which version to rollback to?

    The AI uses the version history to find previous deployments and can shift traffic back to them.

  • 04

    Does the AI write the code for my Workers?

    No. The AI manages the deployment of code, but it does not have a tool to write or edit your source code.

  • 05

    Can I see the details of a specific version?

    Yes. The AI can retrieve specific version data to help you verify what is running.

  • More questions about Cloudflare? The Connector page answers them. See everything the Cloudflare Connector can do

Connect Cloudflare to Claude, Cursor, ChatGPT & more