Skip to content

Commit 25ef3ae

Browse files
authored
Update Radar OAuth scopes and add base instructions (#132)
* Update Radar scopes and improve scan_url tool * Add Radar and URL Scanner OAuth scopes * Add base instructions to Radar MCP server * Fix typo in README.md files * Fix URL scanner query
1 parent 88ad4ce commit 25ef3ae

File tree

17 files changed

+130
-63
lines changed

17 files changed

+130
-63
lines changed

apps/ai-gateway/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ This MCP server is still a work in progress, and we plan to add more tools in th
2828
- `Show logs for gateway 'gateway-001' between January 1, 2023, and January 31, 2023.`
2929
- `Fetch the latest errors from gateway-001 and debug what might have happened wrongly`
3030

31-
## Access the remote MCP server from from any MCP Client
31+
## Access the remote MCP server from any MCP Client
3232

3333
If your MCP client has first class support for remote MCP servers, the client will provide a way to accept the server URL (`https://ai-gateway.mcp.cloudflare.com`) directly within its interface (for example in[Cloudflare AI Playground](https://playground.ai.cloudflare.com/)).
3434

apps/auditlogs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Currently available tools:
1818
- `Were there any suspicious changes made to my Cloudflare account yesterday around lunch time?`
1919
- `When was the last activity that updated a DNS record?`
2020

21-
## Access the remote MCP server from from any MCP Client
21+
## Access the remote MCP server from any MCP Client
2222

2323
If your MCP client has first class support for remote MCP servers, the client will provide a way to accept the server URL (`https://auditlogs.mcp.cloudflare.com/sse`) directly within its interface (for example in [Cloudflare AI Playground](https://playground.ai.cloudflare.com/)).
2424

apps/autorag/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ This MCP server is still a work in progress, and we plan to add more tools in th
2424
- `Search for documents in AutoRAG with ID 'rag123' using the query 'cloudflare security'.`
2525
- `Perform an AI search in AutoRAG with ID 'rag456' for 'best practices for vector stores'.`
2626

27-
## Access the remote MCP server from from any MCP Client
27+
## Access the remote MCP server from any MCP Client
2828

2929
If your MCP client has first class support for remote MCP servers, the client will provide a way to accept the server URL (`https://autorag.mcp.cloudflare.com`) directly within its interface (for example in[Cloudflare AI Playground](https://playground.ai.cloudflare.com/)).
3030

apps/browser-rendering/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ This MCP server is still a work in progress, and we plan to add more tools in th
2626
- `Convert https://example.com to Markdown.`
2727
- `Take a screenshot of https://example.com.`
2828

29-
## Access the remote MCP server from from any MCP Client
29+
## Access the remote MCP server from any MCP Client
3030

3131
If your MCP client has first class support for remote MCP servers, the client will provide a way to accept the server URL (`https://browser.mcp.cloudflare.com`) directly within its interface (for example in[Cloudflare AI Playground](https://playground.ai.cloudflare.com/)).
3232

apps/dns-analytics/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ This MCP server is still a work in progress, and we plan to add more tools in th
2828
- `Read Cloudflare's documentation on managing DNS records and tell me how to optimize my DNS settings.`
2929
- `Show me DNS Report for https://example.com in the last X days.`
3030

31-
## Access the remote MCP server from from any MCP Client
31+
## Access the remote MCP server from any MCP Client
3232

3333
If your MCP client has first class support for remote MCP servers, the client will provide a way to accept the server URL (`https://dns-analytics.mcp.cloudflare.com`) directly within its interface (for example in [Cloudflare AI Playground](https://playground.ai.cloudflare.com/)).
3434

apps/logpush/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ This MCP server is still a work in progress, and we plan to add more tools in th
2121
- `Do any of my Logpush jobs in my <insert name> account have errors?`
2222
- `Can you list all the enabled job failures from today?`
2323

24-
## Access the remote MCP server from from any MCP Client
24+
## Access the remote MCP server from any MCP Client
2525

2626
If your MCP client has first class support for remote MCP servers, the client will provide a way to accept the server URL (`https://logs.mcp.cloudflare.com`) directly within its interface (for example in [Cloudflare AI Playground](https://playground.ai.cloudflare.com/)).
2727

apps/radar/.dev.vars.example

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
CLOUDFLARE_CLIENT_ID=
22
CLOUDFLARE_CLIENT_SECRET=
3-
URL_SCANNER_API_TOKEN=
43
DEV_DISABLE_OAUTH=
54
DEV_CLOUDFLARE_API_TOKEN=
6-
DEV_CLOUDFLARE_EMAIL=
5+
DEV_CLOUDFLARE_EMAIL=

apps/radar/CONTRIBUTING.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ If you'd like to iterate and test your MCP server, you can do so in local develo
1111
```
1212
CLOUDFLARE_CLIENT_ID=your_development_cloudflare_client_id
1313
CLOUDFLARE_CLIENT_SECRET=your_development_cloudflare_client_secret
14-
URL_SCANNER_API_TOKEN=your_development_url_scanner_api_token
1514
```
1615

1716
If you're an external contributor, you can provide a development API token:
@@ -21,7 +20,6 @@ If you'd like to iterate and test your MCP server, you can do so in local develo
2120
DEV_CLOUDFLARE_EMAIL=your_cloudflare_email
2221
# This is your global api token
2322
DEV_CLOUDFLARE_API_TOKEN=your_development_api_token
24-
URL_SCANNER_API_TOKEN=your_development_url_scanner_api_token
2523
```
2624

2725
2. Start the local development server:
@@ -40,7 +38,6 @@ Set secrets via Wrangler:
4038
```bash
4139
npx wrangler secret put CLOUDFLARE_CLIENT_ID -e <ENVIRONMENT>
4240
npx wrangler secret put CLOUDFLARE_CLIENT_SECRET -e <ENVIRONMENT>
43-
npx wrangler secret put URL_SCANNER_API_TOKEN -e <ENVIRONMENT>
4441
```
4542

4643
## Set up a KV namespace

apps/radar/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ This MCP server is still a work in progress, and we plan to add more tools in th
3737
- `Show me HTTP traffic trends from Portugal.`
3838
- `Show me application layer attack trends from the last 7 days.`
3939

40-
## Access the remote MCP server from from any MCP Client
40+
## Access the remote MCP server from any MCP Client
4141

4242
If your MCP client has first class support for remote MCP servers, the client will provide a way to accept the server URL (`https://radar.mcp.cloudflare.com`) directly within its interface (for example in [Cloudflare AI Playground](https://playground.ai.cloudflare.com/)).
4343

apps/radar/src/context.ts

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,41 @@
1-
import type { RadarMCP } from './index'
1+
import type { RadarMCP, UserDetails } from './index'
22

33
export interface Env {
44
OAUTH_KV: KVNamespace
55
ENVIRONMENT: 'development' | 'staging' | 'production'
6-
ACCOUNT_ID: '6702657b6aa048cf3081ff3ff3c9c52f'
76
MCP_SERVER_NAME: string
87
MCP_SERVER_VERSION: string
98
CLOUDFLARE_CLIENT_ID: string
109
CLOUDFLARE_CLIENT_SECRET: string
11-
URL_SCANNER_API_TOKEN: string
1210
MCP_OBJECT: DurableObjectNamespace<RadarMCP>
11+
USER_DETAILS: DurableObjectNamespace<UserDetails>
1312
MCP_METRICS: AnalyticsEngineDataset
1413
DEV_DISABLE_OAUTH: string
1514
DEV_CLOUDFLARE_API_TOKEN: string
1615
DEV_CLOUDFLARE_EMAIL: string
1716
}
17+
18+
export const BASE_INSTRUCTIONS = /* markdown */ `
19+
# Cloudflare Radar MCP Server
20+
21+
This server integrates tools powered by the Cloudflare Radar API to provide insights into global Internet traffic,
22+
trends, and other related utilities.
23+
24+
An active account is **only required** for URL Scanner-related tools (e.g., \`scan_url\`).
25+
26+
For tools related to Internet trends and insights, analyze the results and, when appropriate, generate visualizations
27+
such as XY charts, pie charts, bar charts, or other relevant chart types.
28+
29+
### Making comparisons
30+
31+
Many tools support **array-based filters** to enable comparisons across multiple criteria.
32+
In such cases, the array index corresponds to a distinct data series.
33+
For each data series, provide a corresponding \`dateRange\`, or alternatively a \`dateStart\` and \`dateEnd\` pair.
34+
Example: To compare HTTP traffic between Portugal and Spain over the last 7 days:
35+
- \`dateRange: ["7d", "7d"]\`
36+
- \`location: ["PT", "ES"]\`
37+
38+
This applies to date filters and other filters that support comparison across multiple values.
39+
If a tool does **not** support array-based filters, you can achieve the same comparison by making multiple separate
40+
calls to the tool.
41+
`

0 commit comments

Comments
 (0)