Cloudflare Workers (via Bindings) MCP server

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

The Cloudflare Workers Bindings MCP Server implements the Model Context Protocol (MCP), providing a way to manage your Cloudflare Workers Platform resources. With built-in Cloudflare OAuth, this server allows you to connect remotely and use various tools to interact with Cloudflare resources like KV namespaces, Workers, R2 buckets, D1 databases, and Hyperdrive configurations.

Available Tools

The MCP server provides tools across multiple Cloudflare resource categories:

Category Tool Description
Account accounts_list List all accounts in your Cloudflare account
set_active_account Set active account to be used for tool calls that require accountId
KV Namespaces kv_namespaces_list List all of the kv namespaces in your Cloudflare account
kv_namespace_create Create a new kv namespace in your Cloudflare account
kv_namespace_delete Delete a kv namespace in your Cloudflare account
kv_namespace_get Get details of a kv namespace in your Cloudflare account
kv_namespace_update Update the title of a kv namespace in your Cloudflare account
Workers workers_list List all Workers in your Cloudflare account
workers_get_worker Get the details of a Cloudflare Worker
workers_get_worker_code Get the source code of a Cloudflare Worker
R2 Buckets r2_buckets_list List r2 buckets in your Cloudflare account
r2_bucket_create Create a new r2 bucket in your Cloudflare account
r2_bucket_get Get details about a specific R2 bucket
r2_bucket_delete Delete an R2 bucket
D1 Databases d1_databases_list List all of the D1 databases in your Cloudflare account
d1_database_create Create a new D1 database in your Cloudflare account
d1_database_delete Delete a d1 database in your Cloudflare account
d1_database_get Get a D1 database in your Cloudflare account
d1_database_query Query a D1 database in your Cloudflare account
Hyperdrive hyperdrive_configs_list List Hyperdrive configurations in your Cloudflare account
hyperdrive_config_create Create a new Hyperdrive configuration in your Cloudflare account
hyperdrive_config_delete Delete a Hyperdrive configuration in your Cloudflare account
hyperdrive_config_get Get details of a specific Hyperdrive configuration in your Cloudflare account
hyperdrive_config_edit Edit (patch) a Hyperdrive configuration in your Cloudflare account

Connecting to the MCP Server

Using MCP Clients with Native Support

If your MCP client natively supports remote servers:

  1. Enter the server URL: https://bindings.mcp.cloudflare.com
  2. The client will handle the connection (e.g., Cloudflare AI Playground)

Using Clients Without Native Support

If your client doesn't support remote MCP servers, set up with mcp-remote:

  1. Install the mcp-remote package:

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

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

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

  5. After authentication, the tools will be available for use

Example Prompts

Here are some prompts you can use to interact with the MCP server:

Account Management

  • List my Cloudflare accounts.
  • Set my active account to 'YOUR_ACCOUNT_ID'. (Replace YOUR_ACCOUNT_ID with an actual ID)

KV Namespace Operations

  • Show me my KV namespaces.
  • Create a new KV namespace called 'my-kv-store'.
  • Get the details for KV namespace 'YOUR_NAMESPACE_ID'. (Replace YOUR_NAMESPACE_ID)
  • Delete the KV namespace 'NAMESPACE_TO_DELETE_ID'. (Replace NAMESPACE_TO_DELETE_ID)

Workers Management

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

R2 Bucket Management

  • 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 Database Operations

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

Hyperdrive Configuration

  • List my Hyperdrive configurations.
  • Create a Hyperdrive config named 'prod-db-cache' for my database. (You might need to provide more origin details)
  • Get details for Hyperdrive config 'YOUR_HYPERDRIVE_ID'. (Replace YOUR_HYPERDRIVE_ID)
  • Update the cache settings for Hyperdrive config 'YOUR_HYPERDRIVE_ID'. (Replace YOUR_HYPERDRIVE_ID)
  • Delete the Hyperdrive config 'OLD_HYPERDRIVE_ID'. (Replace OLD_HYPERDRIVE_ID)

How to add this MCP server to 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 > MCP and click "Add new global MCP server".

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

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

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 explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

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