Skip to content

Commit 0478d9b

Browse files
committed
Merge branch 'main' into dex-mcp
2 parents ad94fbc + 5494172 commit 0478d9b

File tree

150 files changed

+40678
-7735
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

150 files changed

+40678
-7735
lines changed

.dockerignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
**/node_modules/
2+
**/.gitignore
3+
**/README.md
4+
**/.vscode/
5+
**/Dockerfile
6+
**/out/

.github/workflows/test-and-check.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ jobs:
2121
cache: 'pnpm'
2222
- name: Install dependencies
2323
run: pnpm install
24+
- name: Syncpack lint
25+
run: pnpm syncpack lint
2426
- name: Run linter
2527
run: pnpm check:turbo
2628
- name: Run linter (formatting)

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,6 @@ yarn-error.log*
4848
.sentryclirc.lock/
4949
tmp.json
5050
tmp.ts
51+
.idea
5152

52-
apps/sandbox-container/workdir
53+
apps/sandbox-container/workdir

.syncpackrc.cjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ const config = {
1414
{
1515
label: 'Sentry types that are compatible with toucan-js',
1616
dependencies: ['@sentry/types', '@sentry/tracing'],
17-
pinVersion: '7.76.0',
17+
pinVersion: '8.9.2',
1818
},
1919
{
2020
label: 'toucan-js that is compatible with pinned sentry types',
2121
dependencies: ['toucan-js'],
22-
pinVersion: '3.3.1',
22+
pinVersion: '4.1.1',
2323
},
2424
{
2525
label: 'pin vitest compatible with @cloudflare/vitest-pool-workers',

.vscode/launch.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"configurations": [
3+
{
4+
"name": "Wrangler",
5+
"type": "node",
6+
"request": "attach",
7+
"port": 9229,
8+
"cwd": "/",
9+
"resolveSourceMapLocations": null,
10+
"attachExistingChildren": false,
11+
"autoAttachChildProcesses": false,
12+
"sourceMaps": true // works with or without this line
13+
}
14+
]
15+
}

README.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,14 @@ Open Claude Desktop and navigate to Settings -> Developer -> Edit Config. This o
1313

1414
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.
1515

16-
```
16+
```json
1717
{
18-
"mcpServers": {
19-
"cloudflare": {
20-
"command": "npx",
21-
"args": [
22-
"mcp-remote",
23-
"https://observability.mcp.cloudflare.com/sse"
24-
]
25-
}
26-
}
18+
"mcpServers": {
19+
"cloudflare": {
20+
"command": "npx",
21+
"args": ["mcp-remote", "https://observability.mcp.cloudflare.com/sse"]
22+
}
23+
}
2724
}
2825
```
2926

@@ -54,7 +51,8 @@ Some features may require a paid Cloudflare Workers plan. Ensure your Cloudflare
5451

5552
### Apps
5653

57-
- [workers-observability](apps/workers-observability/): The Workers Observability MCP server
54+
- [workers-observability](apps/workers-observability): The Workers Observability MCP server
55+
- [radar](apps/radar): The Cloudflare Radar MCP server
5856

5957
### Packages
6058

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
CLOUDFLARE_CLIENT_ID=
2+
CLOUDFLARE_CLIENT_SECRET=
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/** @type {import("eslint").Linter.Config} */
2+
module.exports = {
3+
root: true,
4+
extends: ['@repo/eslint-config/default.cjs'],
5+
}

apps/cloudflare-one-casb/README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Model Context Protocol (MCP) Server + Cloudflare OAuth
2+
3+
This is a [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) server that supports remote MCP connections, with Cloudflare OAuth built-in.
4+
5+
You should use this as a template to build an MCP server for Cloudflare, provided by Cloudflare at `server-name.mcp.cloudflare.com`. It has a basic set of tools `apps/template-start-here/src/tools/logs.ts` — you can modify these to do what you need
6+
7+
## Getting Started
8+
9+
- Set secrets via Wrangler
10+
11+
```bash
12+
wrangler secret put CLOUDFLARE_CLIENT_ID
13+
wrangler secret put CLOUDFLARE_CLIENT_SECRET
14+
```
15+
16+
#### Set up a KV namespace
17+
18+
- Create the KV namespace:
19+
`wrangler kv:namespace create "OAUTH_KV"`
20+
- Update the Wrangler file with the KV ID
21+
22+
#### Deploy & Test
23+
24+
Deploy the MCP server to make it available on your workers.dev domain
25+
` wrangler deploy`
26+
27+
Test the remote server using [Inspector](https://modelcontextprotocol.io/docs/tools/inspector):
28+
29+
```
30+
npx wrangler deploy
31+
```

apps/cloudflare-one-casb/package.json

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"name": "cloudflare-casb-mcp-server",
3+
"version": "0.0.1",
4+
"private": true,
5+
"scripts": {
6+
"check:lint": "run-eslint-workers",
7+
"check:types": "run-tsc",
8+
"deploy": "wrangler deploy",
9+
"dev": "wrangler dev",
10+
"start": "wrangler dev",
11+
"cf-typegen": "wrangler types",
12+
"test": "vitest run"
13+
},
14+
"dependencies": {
15+
"@cloudflare/workers-oauth-provider": "0.0.2",
16+
"@hono/zod-validator": "0.4.3",
17+
"@modelcontextprotocol/sdk": "1.9.0",
18+
"@repo/mcp-common": "workspace:*",
19+
"agents": "0.0.49",
20+
"cloudflare": "4.2.0",
21+
"hono": "4.7.6",
22+
"zod": "3.24.2"
23+
},
24+
"devDependencies": {
25+
"@cloudflare/vitest-pool-workers": "0.8.14",
26+
"@cloudflare/workers-types": "4.20250410.0",
27+
"@types/jsonwebtoken": "9.0.9",
28+
"prettier": "3.5.3",
29+
"typescript": "5.5.4",
30+
"vitest": "3.0.9",
31+
"wrangler": "4.10.0"
32+
}
33+
}

0 commit comments

Comments
 (0)