|
1 | 1 | # Cloudflare MCP Server
|
2 | 2 |
|
3 |
| -Model Context Protocol (MCP) is a [new, standardized protocol](https://modelcontextprotocol.io/introduction) 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](https://api.cloudflare.com). |
| 3 | +Model Context Protocol (MCP) is a [new, standardized protocol](https://modelcontextprotocol.io/introduction) for managing context between large language models (LLMs) and external systems. In this repository, you can find several MCP servers allowing you to connect to Cloudflare's service from an MCP client (e.g. Cursor, Claude) and use natural language to accomplish tasks through your Cloudflare account. |
4 | 4 |
|
5 |
| -This lets you use Claude Desktop, or any MCP Client, to use natural language to accomplish things on your Cloudflare account, e.g.: |
| 5 | +These MCP servers allow your [MCP Client](https://modelcontextprotocol.io/clients) to read configurations from your account, process information, make suggestions based on data, and even make those suggested changes for you. All of these actions can happen across cloudflare's many services including application development, security and performance. |
6 | 6 |
|
7 |
| -- `List all the Cloudflare workers on my <some-email>@gmail.com account.` |
8 |
| -- `Can you tell me about any potential issues on this particular worker '...'?` |
| 7 | +The following servers are included in this repository: |
9 | 8 |
|
10 |
| -## Access the remote MCP server from Claude Desktop |
| 9 | +| Server Name | Description | Server URL | |
| 10 | +| ----------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------- | |
| 11 | +| [**Documentation server**](/apps/docs-autorag) | Get up to date reference information on Cloudflare | `https://docs.mcp.cloudflare.com/sse` | |
| 12 | +| [**Workers Bindings server**](/apps/bindings) | Build Workers applications with storage, AI, and compute primitives | `https://bindings.mcp.cloudflare.com/sse` | |
| 13 | +| [**Observability server**](/apps/observability) | Debug and get insight into your application’s logs and analytics | `https://observability.mcp.cloudflare.com/sse` | |
| 14 | +| [**Radar server**](/apps/radar) | Get global Internet traffic insights, trends, URL scans, and other utilities | `https://radar.mcp.cloudflare.com/sse` | |
11 | 15 |
|
12 |
| -Open Claude Desktop and navigate to Settings -> Developer -> Edit Config. This opens the configuration file that controls which MCP servers Claude can access. |
| 16 | +## Access the remote MCP server from any MCP client |
13 | 17 |
|
14 |
| -Replace the content with the following configuration. Once you restart Claude Desktop, a browser window will open showing your OAuth login page. Complete the authentication flow to grant Claude access to your MCP server. After you grant access, the tools will become available for you to use. |
| 18 | +If your MCP client has first class support for remote MCP servers, the client will provide a way to accept the server URL directly within its interface (e.g. [Cloudflare AI Playground](https://playground.ai.cloudflare.com/)) |
| 19 | + |
| 20 | +If your client does not yet support remote MCP servers, you will need to set up its resepective configuration file using mcp-remote (https://www.npmjs.com/package/mcp-remote) to specify which servers your client can access. |
15 | 21 |
|
16 | 22 | ```json
|
17 | 23 | {
|
18 | 24 | "mcpServers": {
|
19 |
| - "cloudflare": { |
| 25 | + "cloudflare-observability": { |
20 | 26 | "command": "npx",
|
21 | 27 | "args": ["mcp-remote", "https://observability.mcp.cloudflare.com/sse"]
|
| 28 | + }, |
| 29 | + "cloudflare-bindings": { |
| 30 | + "command": "npx", |
| 31 | + "args": ["mcp-remote", "https://bindings.mcp.cloudflare.com/sse"] |
22 | 32 | }
|
23 | 33 | }
|
24 | 34 | }
|
25 | 35 | ```
|
26 | 36 |
|
27 | 37 | ## Need access to more Cloudflare tools?
|
28 | 38 |
|
29 |
| -We're gradually moving over functionality to this remote MCP server repo. In the meantime please take a look at the local only mcp-server-cloudflare package which currently has more tools available. |
30 |
| - |
31 |
| -Visit <https://www.npmjs.com/package/@cloudflare/mcp-server-cloudflare> |
| 39 | +We're continuing to add more functionality to this remote MCP server repo. If you'd like to leave feedback, file a bug or provide a feature request, [please open an issue](https://github.com/cloudflare/mcp-server-cloudflare/issues/new/choose) on this repository |
32 | 40 |
|
33 | 41 | ## Paid Features
|
34 | 42 |
|
35 | 43 | Some features may require a paid Cloudflare Workers plan. Ensure your Cloudflare account has the necessary subscription level for the features you intend to use.
|
36 | 44 |
|
37 |
| -## Features |
38 |
| - |
39 |
| -### Workers Management |
40 |
| - |
41 |
| -- `worker_list`: List all Workers in your account |
42 |
| -- `worker_get_worker`: Get a Worker's script content |
43 |
| - |
44 |
| -### Workers Logs |
45 |
| - |
46 |
| -- `worker_logs_by_worker_name`: Analyze recent logs for a Cloudflare Worker by worker name |
47 |
| -- `worker_logs_by_ray_id`: Analyze recent logs across all workers for a specific request by Cloudflare Ray ID |
48 |
| -- `worker_logs_keys`: Get available telemetry keys for a Cloudflare Worker |
49 |
| - |
50 |
| -## Developing |
51 |
| - |
52 |
| -### Apps |
53 |
| - |
54 |
| -- [workers-observability](apps/workers-observability): The Workers Observability MCP server |
55 |
| -- [radar](apps/radar): The Cloudflare Radar MCP server |
56 |
| - |
57 |
| -### Packages |
58 |
| - |
59 |
| -- eslint-config: Eslint config used by all apps and packages. |
60 |
| -- typescript-config: tsconfig used by all apps and packages. |
61 |
| -- mcp-common: Shared common tools and scripts to help manage this repo. |
62 |
| - |
63 |
| -For more details on development in this monorepo, take a look at apps/workers-observability |
64 |
| - |
65 |
| -## Testing |
66 |
| - |
67 |
| -The project uses Vitest as the testing framework with MSW (Mock Service Worker) for API mocking. |
68 |
| - |
69 |
| -### Running Tests |
70 |
| - |
71 |
| -To run all tests: |
72 |
| - |
73 |
| -```bash |
74 |
| -pnpm test |
75 |
| -``` |
76 |
| - |
77 |
| -To run a specific test file: |
78 |
| - |
79 |
| -```bash |
80 |
| -pnpm test -- tests/tools/queues.test.ts |
81 |
| -``` |
82 |
| - |
83 |
| -To run tests in watch mode (useful during development): |
84 |
| - |
85 |
| -```bash |
86 |
| -pnpm test:watch |
87 |
| -``` |
88 |
| - |
89 | 45 | ## Contributing
|
90 | 46 |
|
91 |
| -Contributions are welcome! Please feel free to submit a Pull Request. |
| 47 | +Interested in contributing, and running this server locally? See [CONTRIBUTING.md](CONTRIBUTING.md) to get started. |
0 commit comments