Deploy, configure & interrogate your resources on the Cloudflare developer platform (e.g. Workers/KV/R2/D1)
The Model Context Protocol (MCP) is revolutionizing how Large Language Models (LLMs) interact with the real world. This open standard empowers developers to seamlessly connect LLMs to external data sources and tools, unlocking a new era of AI-powered applications. This repository provides both an installer and a dedicated MCP Server tailored for Cloudflare's robust API, enabling you to harness the power of natural language to manage and interact with your Cloudflare infrastructure.
Imagine using Claude Desktop, or any MCP-compatible client, to execute complex tasks with simple, intuitive commands:
This is the power of MCP, bringing natural language interaction to the heart of your Cloudflare workflows.
Integrating with Claude Desktop is straightforward:
Access Configuration: Open Claude Desktop and navigate to Settings -> Developer -> Edit Config
. This will open the configuration file.
Update Configuration: Replace the existing content with the following configuration snippet:
{ "mcpServers": { "cloudflare": { "command": "npx", "args": [ "mcp-remote", "https://mcp.cloudflare.com/workers/observability/sse" ] } } }
Restart Claude Desktop: After restarting, a browser window will prompt you to authenticate via OAuth. This grants Claude the necessary permissions to access your MCP server.
Enjoy Seamless Integration: Once authenticated, the Cloudflare tools will be readily available within Claude Desktop.
Certain advanced features within this MCP server, specifically those related to Observability (prefixed with worker_logs_
), require a paid Cloudflare Workers plan. Ensure your account has the appropriate subscription level to leverage these powerful capabilities.
This MCP Server unlocks a range of powerful functionalities:
worker_list
: Comprehensive listing of all Workers within your Cloudflare account.worker_get_worker
: Retrieve the complete script content of a specific Worker.worker_logs_by_worker_name
: In-depth analysis of recent logs for a specific Cloudflare Worker, identified by its name.worker_logs_by_ray_id
: Cross-worker log analysis for a specific request, identified by its Cloudflare Ray ID.worker_logs_keys
: Discover the available telemetry keys for a Cloudflare Worker, enabling targeted log analysis.This repository is structured as a monorepo, facilitating efficient development and code sharing.
eslint-config
: Centralized ESLint configuration for consistent code style across all applications and packages.typescript-config
: Shared TypeScript configuration, ensuring consistent compilation settings.mcp-common
: A collection of shared tools and scripts designed to streamline monorepo management.For detailed development guidance, refer to the apps/workers-observability
directory.
This project utilizes Vitest as its primary testing framework, complemented by MSW (Mock Service Worker) for comprehensive API mocking.
Run all tests:
pnpm test
Run a specific test file:
pnpm test -- tests/tools/queues.test.ts
Run tests in watch mode (for development):
pnpm test:watch
Looking for the deprecated, local-only Cloudflare MCP Server? It's available on npm: https://www.npmjs.com/package/@cloudflare/mcp-server-cloudflare
We welcome contributions! Please submit a Pull Request to contribute to the project.
๐ A gateway demo for MCP SSE Server.
๐ โ๏ธ A lightweight mcp server that tells you exactly what time is it.
#๏ธโฃ ๐ A C# SDK for building MCP servers on .NET 9 with NativeAOT compatibility โก ๐
โ Java SDK for building MCP servers using Quarkus.