mcp-server-cloudflare
- Cloud Platforms
Lets you use Claude Desktop, or any MCP Client, to use natural language to accomplish things on your Cloudflare account.
Prompts
Interactive templates invoked by user choice
Name | Description |
---|---|
No prompts |
Resources
Contextual data attached and managed by the client
Name | Description |
---|---|
No resources |
Tools
Functions exposed to the LLM to take actions
Name | Description |
---|---|
No tools |
Server Configuration
Describes the environment variables required to run the server.
Name | Required | Description | Default |
---|---|---|---|
No arguments |
Cloudflare MCP Server
Model Context Protocol (MCP) is a new, standardized protocol for managing context between large language models (LLMs) and external systems. In this repository, we provide an installer as well as an MCP Server for Cloudflare's API.
This lets you use Claude Desktop, or any MCP Client, to use natural language to accomplish things on your Cloudflare account, e.g.:
Please deploy me a new Worker with an example durable object.
Can you tell me about the data in my D1 database named '...'?
Can you copy all the entries from my KV namespace '...' into my R2 bucket '...'?
Demo
<div align="center"> <a href="https://www.youtube.com/watch?v=vGajZpl_9yA"> <img src="https://img.youtube.com/vi/vGajZpl_9yA/maxresdefault.jpg" alt="Demonstrating the newly-released MCP server to explore Cloudflare properties, like Workers, KV, and D1." width="600"/> </a> </div>Setup
- Run
npx @cloudflare/mcp-server-cloudflare init
- Restart Claude Desktop, you should see a small 🔨 icon that shows the following tools available for use:
Features
KV Store Management
get_kvs
: List all KV namespaces in your accountkv_get
: Get a value from a KV namespacekv_put
: Store a value in a KV namespacekv_list
: List keys in a KV namespacekv_delete
: Delete a key from a KV namespace
R2 Storage Management
r2_list_buckets
: List all R2 buckets in your accountr2_create_bucket
: Create a new R2 bucketr2_delete_bucket
: Delete an R2 bucketr2_list_objects
: List objects in an R2 bucketr2_get_object
: Get an object from an R2 bucketr2_put_object
: Put an object into an R2 bucketr2_delete_object
: Delete an object from an R2 bucket
D1 Database Management
d1_list_databases
: List all D1 databases in your accountd1_create_database
: Create a new D1 databased1_delete_database
: Delete a D1 databased1_query
: Execute a SQL query against a D1 database
Workers Management
worker_list
: List all Workers in your accountworker_get
: Get a Worker's script contentworker_put
: Create or update a Worker scriptworker_delete
: Delete a Worker script
Analytics
analytics_get
: Retrieve analytics data for your domain- Includes metrics like requests, bandwidth, threats, and page views
- Supports date range filtering
Developing
In the current project folder, run:
Then, in a second terminal:
This will link Claude Desktop against your locally-installed version for you to test.
Usage outside of Claude
To run the server locally, run node dist/index run <account-id>
.
If you're using an alternative MCP Client, or testing things locally, emit the tools/list
command to get an up-to-date list of all available tools. Then you can call these directly using the tools/call
command.
Workers
KV Store
R2 Storage
D1 Database
Analytics
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
GitHub Badge
Glama performs regular codebase and documentation scans to:
- Confirm that the MCP server is working as expected.
- Confirm that there are no obvious security issues with dependencies of the server.
- Extract server characteristics such as tools, resources, prompts, and required parameters.
Our directory badge helps users to quickly asses that the MCP server is safe, server capabilities, and instructions for installing the server.
Copy the following code to your README.md file: