- Explore MCP Servers
- mcp-cloudflare
Mcp Cloudflare
What is Mcp Cloudflare
The Cloudflare MCP Server is a unified interface designed to interact with various Cloudflare services including the KV Store, Workers, and Analytics. It simplifies the management of these services through well-defined operations and endpoints.
Use cases
Key use cases include managing key-value pairs in the KV Store for data storage and retrieval, deploying and updating Cloudflare Workers for serverless computations, and retrieving detailed analytics data for monitoring and performance analysis of websites.
How to use
To use the MCP server, first clone the repository and configure your Cloudflare credentials in the .env file. After installing dependencies, you can run the server and utilize various functions for KV Store operations, Worker management, and retrieving analytics data through specific function calls with required parameters.
Key features
The MCP server offers operations for KV Store management such as get, put, delete, and list. It allows for Worker management including creating, updating, listing, and deleting Worker scripts. Additionally, it provides capabilities to retrieve detailed analytics data based on customizable date ranges.
Where to use
This server can be used by developers and system administrators managing Cloudflare services for their applications, particularly in environments where quick and efficient interaction with Cloudflare resources is necessary, such as in web development, application deployment, and performance monitoring.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Overview
What is Mcp Cloudflare
The Cloudflare MCP Server is a unified interface designed to interact with various Cloudflare services including the KV Store, Workers, and Analytics. It simplifies the management of these services through well-defined operations and endpoints.
Use cases
Key use cases include managing key-value pairs in the KV Store for data storage and retrieval, deploying and updating Cloudflare Workers for serverless computations, and retrieving detailed analytics data for monitoring and performance analysis of websites.
How to use
To use the MCP server, first clone the repository and configure your Cloudflare credentials in the .env file. After installing dependencies, you can run the server and utilize various functions for KV Store operations, Worker management, and retrieving analytics data through specific function calls with required parameters.
Key features
The MCP server offers operations for KV Store management such as get, put, delete, and list. It allows for Worker management including creating, updating, listing, and deleting Worker scripts. Additionally, it provides capabilities to retrieve detailed analytics data based on customizable date ranges.
Where to use
This server can be used by developers and system administrators managing Cloudflare services for their applications, particularly in environments where quick and efficient interaction with Cloudflare resources is necessary, such as in web development, application deployment, and performance monitoring.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Content
Cloudflare MCP Server
This is a Model Context Protocol (MCP) server for interacting with Cloudflare services. It provides a unified interface for managing Cloudflare KV Store, Workers, and Analytics.
Features
KV Store Operations
kv_get: Retrieve a value from KV storekv_put: Store a value in KV storekv_delete: Delete a key from KV storekv_list: List keys in KV store
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
Setup
- Clone this repository
- Copy
.env.exampleto.envand fill in your Cloudflare credentials:CLOUDFLARE_ACCOUNT_ID=your_account_id_here CLOUDFLARE_API_TOKEN=your_api_token_here CLOUDFLARE_KV_NAMESPACE_ID=your_namespace_id_here - Install dependencies:
npm install - Run the server:
./start-cloudflare.sh
Usage Examples
KV Store
// Get value
kv_get({ key: "myKey" })
// Store value
kv_put({ key: "myKey", value: "myValue" })
// List keys
kv_list({ prefix: "app_", limit: 10 })
Workers
// List workers
worker_list()
// Get worker code
worker_get({ name: "my-worker" })
// Update worker
worker_put({
name: "my-worker",
script: "addEventListener('fetch', event => { ... })"
})
Analytics
// Get today's analytics
analytics_get({
zoneId: "your_zone_id",
since: "2024-11-26T00:00:00Z",
until: "2024-11-26T23:59:59Z"
})
Security Notes
- Never commit your
.envfile - Ensure your Cloudflare API token has appropriate permissions
- Monitor analytics for suspicious activity
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Dev Tools Supporting MCP
The following are the main code editors that support the Model Context Protocol. Click the link to visit the official website for more information.










