Skip to content

Commit 209ea25

Browse files
committed
Update README.md and add CONTRIBUTING.md in radar server
1 parent b77956f commit 209ea25

File tree

4 files changed

+137
-130
lines changed

4 files changed

+137
-130
lines changed

CONTRIBUTING.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Developing
2+
3+
## Architecture
4+
5+
The monorepo has two top-level directories:
6+
7+
- apps: Contains the Workers for each MCP server
8+
- apps/workers-observability
9+
- apps/workers-bindings
10+
- [apps/radar/CONTRIBUTING.md](apps/radar/CONTRIBUTING.md)
11+
- apps/cloudflare-one-casb
12+
- packages: Contains shared packages used across our various apps.
13+
- packages/eslint-config: Eslint config used by all apps and packages.
14+
- packages/typescript-config: tsconfig used by all apps and packages.
15+
- packages/mcp-common: Shared common tools and scripts to help manage this repo.
16+
17+
We use [TurboRepo](https://turbo.build/) and [pnpm](https://pnpm.io/) to manage this repository. TurboRepo manages the monorepo by ensuring commands are run across all apps.
18+
19+
## Getting Started
20+
21+
This section will guide you through setting up your developer environment and running tests.
22+
23+
For more details on development in this monorepo, take a look at apps/workers-observability/CONTRIBUTING.md[/apps/workers-observability/CONTRIBUTING.md]
24+
25+
### Testing
26+
27+
The project uses Vitest as the testing framework with [fetchMock](https://developers.cloudflare.com/workers/testing/vitest-integration/test-apis/) for API mocking.
28+
29+
#### Running Tests
30+
31+
To run all tests:
32+
33+
```bash
34+
pnpm test
35+
```
36+
37+
To run a specific test file:
38+
39+
```bash
40+
pnpm test -- tests/tools/queues.test.ts
41+
```
42+
43+
To run tests in watch mode (useful during development):
44+
45+
```bash
46+
pnpm test:watch
47+
```

README.md

Lines changed: 17 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,91 +1,43 @@
11
# Cloudflare MCP Server
22

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 Desktop) and use natural language to accomplish things on your Cloudflare account. The following servers are included in this repository:
44

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+
| Server Name | Description | Server URL |
6+
| ----------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------- |
7+
| [**Documentation server**](/apps/docs-autorag) | Get up to date reference information on Cloudflare | `https://docs.mcp.cloudflare.com/sse` |
8+
| [**Workers Bindings server**](/apps/bindings) | Build Workers applications with storage, AI, and compute primitives | `https://bindings.mcp.cloudflare.com/sse` |
9+
| [**Observability server**](/apps/observability) | Debug and get insight into your application’s logs and analytics | `https://observability.mcp.cloudflare.com/sse` |
10+
| [**Radar server**](/apps/radar) | Get global Internet traffic insights, trends, URL scans, and other utilities | `https://radar.mcp.cloudflare.com/sse` |
611

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 '...'?`
12+
## Access the remote MCP server from any MCP client
913

10-
## Access the remote MCP server from Claude Desktop
14+
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/))
1115

12-
Open Claude Desktop and navigate to Settings -> Developer -> Edit Config. This opens the configuration file that controls which MCP servers Claude can access.
13-
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.
16+
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.
1517

1618
```json
1719
{
1820
"mcpServers": {
19-
"cloudflare": {
21+
"cloudflare-observability": {
2022
"command": "npx",
2123
"args": ["mcp-remote", "https://observability.mcp.cloudflare.com/sse"]
24+
},
25+
"cloudflare-bindings": {
26+
"command": "npx",
27+
"args": ["mcp-remote", "https://bindings.mcp.cloudflare.com/sse"]
2228
}
2329
}
2430
}
2531
```
2632

2733
## Need access to more Cloudflare tools?
2834

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>
35+
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
3236

3337
## Paid Features
3438

3539
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.
3640

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-
8941
## Contributing
9042

91-
Contributions are welcome! Please feel free to submit a Pull Request.
43+
Interested in contributing, and running this server locally? See [CONTRIBUTING.md](CONTRIBUTING.md) to get started.

apps/radar/CONTRIBUTING.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# Setup
2+
3+
If you'd like to iterate and test your MCP server, you can do so in local development.
4+
5+
## Local Development
6+
7+
1. Create a `.dev.vars` file in your project root:
8+
9+
If you're a Cloudflare employee:
10+
11+
```
12+
CLOUDFLARE_CLIENT_ID=your_development_cloudflare_client_id
13+
CLOUDFLARE_CLIENT_SECRET=your_development_cloudflare_client_secret
14+
URL_SCANNER_API_TOKEN=your_development_url_scanner_api_token
15+
```
16+
17+
If you're an external contributor, you can provide a development API token:
18+
19+
```
20+
DEV_DISABLE_OAUTH=true
21+
# This is your global api token
22+
DEV_CLOUDFLARE_API_TOKEN=your_development_api_token
23+
URL_SCANNER_API_TOKEN=your_development_url_scanner_api_token
24+
```
25+
26+
2. Start the local development server:
27+
28+
```bash
29+
npx wrangler dev
30+
```
31+
32+
3. To test locally, open Inspector, and connect to `http://localhost:8976/sse`.
33+
Once you follow the prompts, you'll be able to "List Tools". You can also connect with any MCP client.
34+
35+
## Deploying the Worker ( Cloudflare employees only )
36+
37+
Set secrets via Wrangler:
38+
39+
```bash
40+
npx wrangler secret put CLOUDFLARE_CLIENT_ID -e <ENVIRONMENT>
41+
npx wrangler secret put CLOUDFLARE_CLIENT_SECRET -e <ENVIRONMENT>
42+
npx wrangler secret put URL_SCANNER_API_TOKEN -e <ENVIRONMENT>
43+
```
44+
45+
## Set up a KV namespace
46+
47+
Create the KV namespace:
48+
49+
```bash
50+
npx wrangler kv namespace create "OAUTH_KV"
51+
```
52+
53+
Then, update the Wrangler file with the generated KV namespace ID.
54+
55+
## Deploy & Test
56+
57+
Deploy the MCP server to make it available on your workers.dev domain:
58+
59+
```bash
60+
npx wrangler deploy -e <ENVIRONMENT>
61+
```
62+
63+
Test the remote server using [Inspector](https://modelcontextprotocol.io/docs/tools/inspector):
64+
65+
```bash
66+
npx @modelcontextprotocol/inspector@latest
67+
```

apps/radar/README.md

Lines changed: 6 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,11 @@ This MCP server is still a work in progress, and we plan to add more tools in th
3434
- `Give me rank details for google.com in March 2025.`
3535
- `Scan https://example.com.`
3636

37-
## Access the remote MCP server from Claude Desktop
37+
## Access the remote MCP server from from any MCP Client
3838

39-
Open Claude Desktop and navigate to `Settings -> Developer -> Edit Config`.
40-
This opens the configuration file that controls which MCP servers Claude can access.
39+
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/))
40+
41+
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.
4142

4243
Replace the content with the following configuration:
4344

@@ -52,66 +53,6 @@ Replace the content with the following configuration:
5253
}
5354
```
5455

55-
Once you restart Claude Desktop, a browser window will open showing your OAuth login page.
56-
Complete the authentication flow to grant Claude access to your MCP server.
57-
After you grant access, the tools will become available for you to use.
58-
59-
## Setup
60-
61-
#### Secrets
62-
63-
Set secrets via Wrangler:
64-
65-
```bash
66-
npx wrangler secret put CLOUDFLARE_CLIENT_ID -e <ENVIRONMENT>
67-
npx wrangler secret put CLOUDFLARE_CLIENT_SECRET -e <ENVIRONMENT>
68-
npx wrangler secret put URL_SCANNER_API_TOKEN -e <ENVIRONMENT>
69-
```
70-
71-
#### Set up a KV namespace
72-
73-
Create the KV namespace:
74-
75-
```bash
76-
npx wrangler kv namespace create "OAUTH_KV"
77-
```
78-
79-
Then, update the Wrangler file with the generated KV namespace ID.
80-
81-
#### Deploy & Test
82-
83-
Deploy the MCP server to make it available on your workers.dev domain:
84-
85-
```bash
86-
npx wrangler deploy -e <ENVIRONMENT>
87-
```
88-
89-
Test the remote server using [Inspector](https://modelcontextprotocol.io/docs/tools/inspector):
90-
91-
```bash
92-
npx @modelcontextprotocol/inspector@latest
93-
```
94-
95-
## Local Development
96-
97-
If you'd like to iterate and test your MCP server, you can do so in local development.
98-
This will require you to create another OAuth App on Cloudflare:
99-
100-
1. Create a `.dev.vars` file in your project root with:
101-
102-
```
103-
CLOUDFLARE_CLIENT_ID=your_development_cloudflare_client_id
104-
CLOUDFLARE_CLIENT_SECRET=your_development_cloudflare_client_secret
105-
URL_SCANNER_API_TOKEN=your_development_url_scanner_api_token
106-
```
107-
108-
2. Start the local development server:
109-
110-
```bash
111-
npx wrangler dev
112-
```
113-
114-
3. To test locally, open Inspector, and connect to `http://localhost:8976/sse`.
115-
Once you follow the prompts, you'll be able to "List Tools".
56+
Once you've set up your configuration file, restart MCP client and a browser window will open showing your OAuth login page. Proceed through the authentication flow to grant the client access to your MCP server. After you grant access, the tools will become available for you to use.
11657

117-
You can also connect to Claude Desktop.
58+
Interested in contributing, and running this server locally? See [CONTRIBUTING.md](CONTRIBUTING.md) to get started.

0 commit comments

Comments
 (0)