Cloudflare Workers (via Bindings) MCP server

Integrates tools for managing resources in the Cloudflare Workers Platform.
Back to servers
Setup instructions
Provider
Cloudflare
Release date
May 01, 2025
Stats
3.1K stars

The Cloudflare Workers Bindings MCP Server is a Model Context Protocol (MCP) server that allows you to manage Cloudflare Workers Platform resources remotely. With built-in Cloudflare OAuth authentication, it provides tools to interact with various Cloudflare services like KV Namespaces, Workers, R2 Buckets, D1 Databases, and Hyperdrive configurations.

Available Tools

This MCP server offers various tools for managing your Cloudflare resources:

Account Management

  • accounts_list - List all accounts in your Cloudflare account
  • set_active_account - Set the active account for tool calls requiring an accountId

KV Namespaces

  • kv_namespaces_list - List all KV namespaces
  • kv_namespace_create - Create a new KV namespace
  • kv_namespace_delete - Delete a KV namespace
  • kv_namespace_get - Get details of a KV namespace
  • kv_namespace_update - Update the title of a KV namespace

Workers

  • workers_list - List all Workers
  • workers_get_worker - Get details of a Worker
  • workers_get_worker_code - Get the source code of a Worker

R2 Buckets

  • r2_buckets_list - List R2 buckets
  • r2_bucket_create - Create a new R2 bucket
  • r2_bucket_get - Get details about a specific R2 bucket
  • r2_bucket_delete - Delete an R2 bucket

D1 Databases

  • d1_databases_list - List all D1 databases
  • d1_database_create - Create a new D1 database
  • d1_database_delete - Delete a D1 database
  • d1_database_get - Get a D1 database
  • d1_database_query - Query a D1 database

Hyperdrive

  • hyperdrive_configs_list - List Hyperdrive configurations
  • hyperdrive_config_create - Create a new Hyperdrive configuration
  • hyperdrive_config_delete - Delete a Hyperdrive configuration
  • hyperdrive_config_get - Get details of a Hyperdrive configuration
  • hyperdrive_config_edit - Edit a Hyperdrive configuration

Accessing the MCP Server

Using Clients with Native Support

If your MCP client has built-in support for remote MCP servers, simply enter the server URL:

https://bindings.mcp.cloudflare.com

For example, you can use this URL directly in the Cloudflare AI Playground.

Using Clients Without Native Support

If your client doesn't support remote MCP servers, you'll need to set up a configuration file using mcp-remote:

  1. Install the mcp-remote package:

    npm install mcp-remote
    
  2. Create a configuration file with this content:

    {
      "mcpServers": {
        "cloudflare": {
          "command": "npx",
          "args": ["mcp-remote", "https://bindings.mcp.cloudflare.com/mcp"]
        }
      }
    }
    
  3. Restart your MCP client

  4. Complete the OAuth authentication flow in the browser window that opens

  5. After granting access, the tools will be available to use

Usage Examples

Here are some example prompts to use with the MCP server:

Account Management

  • "List my Cloudflare accounts."
  • "Set my active account to '[YOUR_ACCOUNT_ID]'."

KV Namespaces

  • "Show me my KV namespaces."
  • "Create a new KV namespace called 'my-kv-store'."
  • "Get the details for KV namespace '[YOUR_NAMESPACE_ID]'."
  • "Delete the KV namespace '[NAMESPACE_TO_DELETE_ID]'."

Workers

  • "List my Cloudflare Workers."
  • "Get the code for the 'my-worker-script' worker."

R2 Buckets

  • "Show me my R2 buckets."
  • "Create an R2 bucket named 'my-new-bucket'."
  • "Get details for the R2 bucket 'my-data-bucket'."
  • "Delete the R2 bucket 'old-bucket'."

D1 Databases

  • "List my D1 databases."
  • "Create a D1 database named 'analytics-db'."
  • "Get details for D1 database '[YOUR_D1_DB_ID]'."
  • "Run the query 'SELECT * FROM customers LIMIT 10;' on D1 database '[YOUR_D1_DB_ID]'."
  • "Delete the D1 database '[TEMP_DB_ID]'."

Hyperdrive

  • "List my Hyperdrive configurations."
  • "Create a Hyperdrive config named 'prod-db-cache' for my database."
  • "Get details for Hyperdrive config '[YOUR_HYPERDRIVE_ID]'."
  • "Update the cache settings for Hyperdrive config '[YOUR_HYPERDRIVE_ID]'."
  • "Delete the Hyperdrive config '[OLD_HYPERDRIVE_ID]'."

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "cloudflare" '{"command":"npx","args":["mcp-remote","https://bindings.mcp.cloudflare.com/sse"]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cloudflare": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://bindings.mcp.cloudflare.com/sse"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "cloudflare": {
            "command": "npx",
            "args": [
                "mcp-remote",
                "https://bindings.mcp.cloudflare.com/sse"
            ]
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later