#
tokens: 49916/50000 194/376 files (page 1/27)
lines: on (toggle) GitHub
raw markdown copy reset
This is page 1 of 27. Use http://codebase.md/cloudflare/mcp-server-cloudflare?lines=true&page={x} to view the full context.

# Directory Structure

```
├── .changeset
│   ├── config.json
│   └── README.md
├── .dockerignore
├── .editorconfig
├── .eslintrc.cjs
├── .github
│   ├── actions
│   │   └── setup
│   │       └── action.yml
│   ├── ISSUE_TEMPLATE
│   │   └── bug_report.md
│   └── workflows
│       ├── branches.yml
│       ├── main.yml
│       └── release.yml
├── .gitignore
├── .npmrc
├── .prettierignore
├── .prettierrc.cjs
├── .syncpackrc.cjs
├── .vscode
│   ├── extensions.json
│   ├── launch.json
│   ├── settings.json
│   └── tasks.json
├── apps
│   ├── ai-gateway
│   │   ├── .dev.vars.example
│   │   ├── .eslintrc.cjs
│   │   ├── CHANGELOG.md
│   │   ├── CONTRIBUTING.md
│   │   ├── package.json
│   │   ├── README.md
│   │   ├── src
│   │   │   ├── ai-gateway.app.ts
│   │   │   ├── ai-gateway.context.ts
│   │   │   ├── tools
│   │   │   │   └── ai-gateway.tools.ts
│   │   │   └── types.ts
│   │   ├── tsconfig.json
│   │   ├── types.d.ts
│   │   ├── vitest.config.ts
│   │   ├── worker-configuration.d.ts
│   │   └── wrangler.jsonc
│   ├── auditlogs
│   │   ├── .dev.vars.example
│   │   ├── .eslintrc.cjs
│   │   ├── CHANGELOG.md
│   │   ├── package.json
│   │   ├── README.md
│   │   ├── src
│   │   │   ├── auditlogs.app.ts
│   │   │   ├── auditlogs.context.ts
│   │   │   └── tools
│   │   │       └── auditlogs.tools.ts
│   │   ├── tsconfig.json
│   │   ├── types.d.ts
│   │   ├── vitest.config.ts
│   │   ├── worker-configuration.d.ts
│   │   └── wrangler.jsonc
│   ├── autorag
│   │   ├── .dev.vars.example
│   │   ├── .eslintrc.cjs
│   │   ├── CHANGELOG.md
│   │   ├── CONTRIBUTING.md
│   │   ├── package.json
│   │   ├── README.md
│   │   ├── src
│   │   │   ├── autorag.app.ts
│   │   │   ├── autorag.context.ts
│   │   │   ├── tools
│   │   │   │   └── autorag.tools.ts
│   │   │   └── types.ts
│   │   ├── tsconfig.json
│   │   ├── types.d.ts
│   │   ├── vitest.config.ts
│   │   ├── worker-configuration.d.ts
│   │   └── wrangler.jsonc
│   ├── browser-rendering
│   │   ├── .dev.vars.example
│   │   ├── .eslintrc.cjs
│   │   ├── CHANGELOG.md
│   │   ├── CONTRIBUTING.md
│   │   ├── package.json
│   │   ├── README.md
│   │   ├── src
│   │   │   ├── browser.app.ts
│   │   │   ├── browser.context.ts
│   │   │   └── tools
│   │   │       └── browser.tools.ts
│   │   ├── tsconfig.json
│   │   ├── types.d.ts
│   │   ├── vitest.config.ts
│   │   ├── worker-configuration.d.ts
│   │   └── wrangler.jsonc
│   ├── cloudflare-one-casb
│   │   ├── .dev.vars.example
│   │   ├── .eslintrc.cjs
│   │   ├── CHANGELOG.md
│   │   ├── package.json
│   │   ├── README.md
│   │   ├── src
│   │   │   ├── cf1-casb.app.ts
│   │   │   ├── cf1-casb.context.ts
│   │   │   └── tools
│   │   │       └── integrations.tools.ts
│   │   ├── tsconfig.json
│   │   ├── types.d.ts
│   │   ├── vitest.config.ts
│   │   ├── worker-configuration.d.ts
│   │   └── wrangler.jsonc
│   ├── demo-day
│   │   ├── .eslintrc.cjs
│   │   ├── CHANGELOG.md
│   │   ├── frontend
│   │   │   ├── index.html
│   │   │   ├── public
│   │   │   │   ├── anthropic.svg
│   │   │   │   ├── asana.svg
│   │   │   │   ├── atlassian.svg
│   │   │   │   ├── canva.svg
│   │   │   │   ├── cloudflare_logo.svg
│   │   │   │   ├── cloudflare.svg
│   │   │   │   ├── dina.jpg
│   │   │   │   ├── favicon-16x16.png
│   │   │   │   ├── favicon-32x32.png
│   │   │   │   ├── favicon.ico
│   │   │   │   ├── favicon.png
│   │   │   │   ├── intercom.svg
│   │   │   │   ├── linear.svg
│   │   │   │   ├── matt.jpg
│   │   │   │   ├── mcp_demo_day.svg
│   │   │   │   ├── mcpog.png
│   │   │   │   ├── more.svg
│   │   │   │   ├── paypal.svg
│   │   │   │   ├── pete.jpeg
│   │   │   │   ├── sentry.svg
│   │   │   │   ├── special_guest.png
│   │   │   │   ├── square.svg
│   │   │   │   ├── stripe.svg
│   │   │   │   ├── sunil.jpg
│   │   │   │   └── webflow.svg
│   │   │   ├── script.js
│   │   │   └── styles.css
│   │   ├── package.json
│   │   ├── src
│   │   │   └── demo-day.app.ts
│   │   ├── tsconfig.json
│   │   ├── worker-configuration.d.ts
│   │   └── wrangler.json
│   ├── dex-analysis
│   │   ├── .dev.vars.example
│   │   ├── .eslintrc.cjs
│   │   ├── CHANGELOG.md
│   │   ├── package.json
│   │   ├── README.md
│   │   ├── src
│   │   │   ├── dex-analysis.app.ts
│   │   │   ├── dex-analysis.context.ts
│   │   │   ├── tools
│   │   │   │   └── dex-analysis.tools.ts
│   │   │   └── warp_diag_reader.ts
│   │   ├── tsconfig.json
│   │   ├── types.d.ts
│   │   ├── vitest.config.ts
│   │   ├── worker-configuration.d.ts
│   │   └── wrangler.jsonc
│   ├── dns-analytics
│   │   ├── .dev.vars.example
│   │   ├── .eslintrc.cjs
│   │   ├── CHANGELOG.md
│   │   ├── CONTRIBUTING.md
│   │   ├── package.json
│   │   ├── README.md
│   │   ├── src
│   │   │   ├── dns-analytics.app.ts
│   │   │   ├── dns-analytics.context.ts
│   │   │   └── tools
│   │   │       └── dex-analytics.tools.ts
│   │   ├── tsconfig.json
│   │   ├── types.d.ts
│   │   ├── vitest.config.ts
│   │   ├── worker-configuration.d.ts
│   │   └── wrangler.jsonc
│   ├── docs-autorag
│   │   ├── .eslintrc.cjs
│   │   ├── CHANGELOG.md
│   │   ├── package.json
│   │   ├── README.md
│   │   ├── src
│   │   │   ├── docs-autorag.app.ts
│   │   │   ├── docs-autorag.context.ts
│   │   │   └── tools
│   │   │       └── docs-autorag.tools.ts
│   │   ├── tsconfig.json
│   │   ├── vitest.config.ts
│   │   ├── worker-configuration.d.ts
│   │   └── wrangler.jsonc
│   ├── docs-vectorize
│   │   ├── .eslintrc.cjs
│   │   ├── CHANGELOG.md
│   │   ├── package.json
│   │   ├── README.md
│   │   ├── src
│   │   │   ├── docs-vectorize.app.ts
│   │   │   └── docs-vectorize.context.ts
│   │   ├── tsconfig.json
│   │   ├── vitest.config.ts
│   │   ├── worker-configuration.d.ts
│   │   └── wrangler.jsonc
│   ├── graphql
│   │   ├── .eslintrc.cjs
│   │   ├── CHANGELOG.md
│   │   ├── package.json
│   │   ├── README.md
│   │   ├── src
│   │   │   ├── graphql.app.ts
│   │   │   ├── graphql.context.ts
│   │   │   └── tools
│   │   │       └── graphql.tools.ts
│   │   ├── tsconfig.json
│   │   ├── types.d.ts
│   │   ├── worker-configuration.d.ts
│   │   └── wrangler.jsonc
│   ├── logpush
│   │   ├── .dev.vars.example
│   │   ├── .eslintrc.cjs
│   │   ├── CHANGELOG.md
│   │   ├── package.json
│   │   ├── README.md
│   │   ├── src
│   │   │   ├── logpush.app.ts
│   │   │   ├── logpush.context.ts
│   │   │   └── tools
│   │   │       └── logpush.tools.ts
│   │   ├── tsconfig.json
│   │   ├── types.d.ts
│   │   ├── vitest.config.ts
│   │   ├── worker-configuration.d.ts
│   │   └── wrangler.jsonc
│   ├── radar
│   │   ├── .dev.vars.example
│   │   ├── .eslintrc.cjs
│   │   ├── CHANGELOG.md
│   │   ├── CONTRIBUTING.md
│   │   ├── package.json
│   │   ├── README.md
│   │   ├── src
│   │   │   ├── radar.app.ts
│   │   │   ├── radar.context.ts
│   │   │   ├── tools
│   │   │   │   ├── radar.tools.ts
│   │   │   │   └── url-scanner.tools.ts
│   │   │   ├── types
│   │   │   │   ├── radar.ts
│   │   │   │   └── url-scanner.ts
│   │   │   └── utils.ts
│   │   ├── tsconfig.json
│   │   ├── types.d.ts
│   │   ├── vitest.config.ts
│   │   ├── worker-configuration.d.ts
│   │   └── wrangler.jsonc
│   ├── sandbox-container
│   │   ├── .dev.vars.example
│   │   ├── .eslintrc.cjs
│   │   ├── CHANGELOG.md
│   │   ├── container
│   │   │   ├── fileUtils.spec.ts
│   │   │   ├── fileUtils.ts
│   │   │   ├── sandbox.container.app.ts
│   │   │   └── tsconfig.json
│   │   ├── CONTRIBUTING.md
│   │   ├── Dockerfile
│   │   ├── evals
│   │   │   ├── exec.eval.ts
│   │   │   ├── files.eval.ts
│   │   │   ├── initialize.eval.ts
│   │   │   └── utils.ts
│   │   ├── package.json
│   │   ├── README.md
│   │   ├── server
│   │   │   ├── containerHelpers.ts
│   │   │   ├── containerManager.ts
│   │   │   ├── containerMcp.ts
│   │   │   ├── metrics.ts
│   │   │   ├── prompts.ts
│   │   │   ├── sandbox.server.app.ts
│   │   │   ├── sandbox.server.context.ts
│   │   │   ├── userContainer.ts
│   │   │   ├── utils.spec.ts
│   │   │   └── utils.ts
│   │   ├── shared
│   │   │   ├── consts.ts
│   │   │   └── schema.ts
│   │   ├── tsconfig.json
│   │   ├── types.d.ts
│   │   ├── vitest.config.evals.ts
│   │   ├── worker-configuration.d.ts
│   │   └── wrangler.jsonc
│   ├── workers-bindings
│   │   ├── .dev.vars.example
│   │   ├── .eslintrc.cjs
│   │   ├── .gitignore
│   │   ├── CHANGELOG.md
│   │   ├── CONTRIBUTING.md
│   │   ├── evals
│   │   │   ├── accounts.eval.ts
│   │   │   ├── hyperdrive.eval.ts
│   │   │   ├── kv_namespaces.eval.ts
│   │   │   ├── types.d.ts
│   │   │   └── utils.ts
│   │   ├── package.json
│   │   ├── README.md
│   │   ├── src
│   │   │   ├── bindings.app.ts
│   │   │   └── bindings.context.ts
│   │   ├── tsconfig.json
│   │   ├── vitest.config.evals.ts
│   │   ├── vitest.config.ts
│   │   ├── worker-configuration.d.ts
│   │   └── wrangler.jsonc
│   ├── workers-builds
│   │   ├── .dev.vars.example
│   │   ├── .eslintrc.cjs
│   │   ├── CHANGELOG.md
│   │   ├── CONTRIBUTING.md
│   │   ├── package.json
│   │   ├── README.md
│   │   ├── src
│   │   │   ├── tools
│   │   │   │   └── workers-builds.tools.ts
│   │   │   ├── workers-builds.app.ts
│   │   │   └── workers-builds.context.ts
│   │   ├── tsconfig.json
│   │   ├── types.d.ts
│   │   ├── vite.config.mts
│   │   ├── vitest.config.ts
│   │   ├── worker-configuration.d.ts
│   │   └── wrangler.jsonc
│   └── workers-observability
│       ├── .dev.vars.example
│       ├── .eslintrc.cjs
│       ├── CHANGELOG.md
│       ├── CONTRIBUTING.md
│       ├── package.json
│       ├── README.md
│       ├── src
│       │   ├── tools
│       │   │   └── workers-observability.tools.ts
│       │   ├── workers-observability.app.ts
│       │   └── workers-observability.context.ts
│       ├── tsconfig.json
│       ├── types.d.ts
│       ├── vitest.config.ts
│       ├── worker-configuration.d.ts
│       └── wrangler.jsonc
├── CONTRIBUTING.md
├── implementation-guides
│   ├── evals.md
│   ├── tools.md
│   └── type-validators.md
├── LICENSE
├── package.json
├── packages
│   ├── eslint-config
│   │   ├── CHANGELOG.md
│   │   ├── default.cjs
│   │   ├── package.json
│   │   └── README.md
│   ├── eval-tools
│   │   ├── CHANGELOG.md
│   │   ├── package.json
│   │   ├── src
│   │   │   ├── runTask.ts
│   │   │   ├── scorers.ts
│   │   │   └── test-models.ts
│   │   ├── tsconfig.json
│   │   ├── worker-configuration.d.ts
│   │   └── wrangler.json
│   ├── mcp-common
│   │   ├── .eslintrc.cjs
│   │   ├── CHANGELOG.md
│   │   ├── package.json
│   │   ├── README.md
│   │   ├── src
│   │   │   ├── api
│   │   │   │   ├── account.api.ts
│   │   │   │   ├── cf1-integration.api.ts
│   │   │   │   ├── workers-builds.api.ts
│   │   │   │   ├── workers-observability.api.ts
│   │   │   │   ├── workers.api.ts
│   │   │   │   └── zone.api.ts
│   │   │   ├── api-handler.ts
│   │   │   ├── api-token-mode.ts
│   │   │   ├── cloudflare-api.ts
│   │   │   ├── cloudflare-auth.ts
│   │   │   ├── cloudflare-oauth-handler.ts
│   │   │   ├── config.ts
│   │   │   ├── constants.ts
│   │   │   ├── durable-kv-store.ts
│   │   │   ├── durable-objects
│   │   │   │   └── user_details.do.ts
│   │   │   ├── env.ts
│   │   │   ├── format.spec.ts
│   │   │   ├── format.ts
│   │   │   ├── get-props.ts
│   │   │   ├── mcp-error.ts
│   │   │   ├── poll.ts
│   │   │   ├── prompts
│   │   │   │   └── docs-vectorize.prompts.ts
│   │   │   ├── scopes.ts
│   │   │   ├── sentry.ts
│   │   │   ├── server.ts
│   │   │   ├── tools
│   │   │   │   ├── account.tools.ts
│   │   │   │   ├── d1.tools.ts
│   │   │   │   ├── docs-vectorize.tools.ts
│   │   │   │   ├── hyperdrive.tools.ts
│   │   │   │   ├── kv_namespace.tools.ts
│   │   │   │   ├── r2_bucket.tools.ts
│   │   │   │   ├── worker.tools.ts
│   │   │   │   └── zone.tools.ts
│   │   │   ├── types
│   │   │   │   ├── cf1-integrations.types.ts
│   │   │   │   ├── cloudflare-mcp-agent.types.ts
│   │   │   │   ├── d1.types.ts
│   │   │   │   ├── hyperdrive.types.ts
│   │   │   │   ├── kv_namespace.types.ts
│   │   │   │   ├── r2_bucket.types.ts
│   │   │   │   ├── shared.types.ts
│   │   │   │   ├── tools.types.ts
│   │   │   │   ├── workers-builds.types.ts
│   │   │   │   ├── workers-logs.types.ts
│   │   │   │   └── workers.types.ts
│   │   │   ├── utils.spec.ts
│   │   │   ├── utils.ts
│   │   │   └── v4-api.ts
│   │   ├── tests
│   │   │   └── utils
│   │   │       └── cloudflare-mock.ts
│   │   ├── tsconfig.json
│   │   ├── types.d.ts
│   │   ├── vitest.config.ts
│   │   └── worker-configuration.d.ts
│   ├── mcp-observability
│   │   ├── CHANGELOG.md
│   │   ├── package.json
│   │   ├── src
│   │   │   ├── analytics-engine.ts
│   │   │   ├── index.ts
│   │   │   └── metrics.ts
│   │   ├── tsconfig.json
│   │   └── worker-configuration.d.ts
│   ├── tools
│   │   ├── .eslintrc.cjs
│   │   ├── bin
│   │   │   ├── run-changeset-new
│   │   │   ├── run-eslint-workers
│   │   │   ├── run-fix-deps
│   │   │   ├── run-tsc
│   │   │   ├── run-turbo
│   │   │   ├── run-vitest
│   │   │   ├── run-vitest-ci
│   │   │   ├── run-wrangler-deploy
│   │   │   ├── run-wrangler-types
│   │   │   └── runx
│   │   ├── CHANGELOG.md
│   │   ├── package.json
│   │   ├── README.md
│   │   ├── src
│   │   │   ├── bin
│   │   │   │   └── runx.ts
│   │   │   ├── changesets.spec.ts
│   │   │   ├── changesets.ts
│   │   │   ├── cmd
│   │   │   │   └── deploy-published-packages.ts
│   │   │   ├── proc.ts
│   │   │   ├── test
│   │   │   │   ├── fixtures
│   │   │   │   │   └── changesets
│   │   │   │   │       ├── empty
│   │   │   │   │       │   └── .gitkeep
│   │   │   │   │       ├── invalid-json
│   │   │   │   │       │   └── published-packages.json
│   │   │   │   │       ├── invalid-schema
│   │   │   │   │       │   └── published-packages.json
│   │   │   │   │       └── valid
│   │   │   │   │           └── published-packages.json
│   │   │   │   └── setup.ts
│   │   │   └── tsconfig.ts
│   │   ├── tsconfig.json
│   │   └── vitest.config.ts
│   └── typescript-config
│       ├── CHANGELOG.md
│       ├── package.json
│       ├── tools.json
│       ├── workers-lib.json
│       └── workers.json
├── pnpm-lock.yaml
├── pnpm-workspace.yaml
├── README.md
├── server.json
├── tsconfig.json
├── turbo.json
└── vitest.workspace.ts
```

# Files

--------------------------------------------------------------------------------
/packages/tools/src/test/fixtures/changesets/empty/.gitkeep:
--------------------------------------------------------------------------------

```
1 | 
```

--------------------------------------------------------------------------------
/apps/dns-analytics/.dev.vars.example:
--------------------------------------------------------------------------------

```
1 | CLOUDFLARE_CLIENT_ID=
2 | CLOUDFLARE_CLIENT_SECRET=
3 | DEV_CLOUDFLARE_API_TOKEN=
```

--------------------------------------------------------------------------------
/.dockerignore:
--------------------------------------------------------------------------------

```
1 | **/node_modules/
2 | **/.gitignore
3 | **/README.md
4 | **/.vscode/
5 | **/Dockerfile
6 | **/out/
```

--------------------------------------------------------------------------------
/.npmrc:
--------------------------------------------------------------------------------

```
1 | auto-install-peers=true
2 | public-hoist-pattern[]=*eslint*
3 | public-hoist-pattern[]=*prettier*
4 | 
```

--------------------------------------------------------------------------------
/apps/auditlogs/.dev.vars.example:
--------------------------------------------------------------------------------

```
1 | CLOUDFLARE_CLIENT_ID=
2 | CLOUDFLARE_CLIENT_SECRET=
3 | DEV_DISABLE_OAUTH=
4 | DEV_CLOUDFLARE_API_TOKEN=
5 | DEV_CLOUDFLARE_EMAIL=
```

--------------------------------------------------------------------------------
/apps/cloudflare-one-casb/.dev.vars.example:
--------------------------------------------------------------------------------

```
1 | CLOUDFLARE_CLIENT_ID=
2 | CLOUDFLARE_CLIENT_SECRET=
3 | DEV_DISABLE_OAUTH=
4 | DEV_CLOUDFLARE_API_TOKEN=
5 | DEV_CLOUDFLARE_EMAIL=
```

--------------------------------------------------------------------------------
/apps/dex-analysis/.dev.vars.example:
--------------------------------------------------------------------------------

```
1 | CLOUDFLARE_CLIENT_ID=
2 | CLOUDFLARE_CLIENT_SECRET=
3 | DEV_DISABLE_OAUTH=
4 | DEV_CLOUDFLARE_API_TOKEN=
5 | DEV_CLOUDFLARE_EMAIL=
```

--------------------------------------------------------------------------------
/apps/logpush/.dev.vars.example:
--------------------------------------------------------------------------------

```
1 | CLOUDFLARE_CLIENT_ID=
2 | CLOUDFLARE_CLIENT_SECRET=
3 | DEV_DISABLE_OAUTH=
4 | DEV_CLOUDFLARE_API_TOKEN=
5 | DEV_CLOUDFLARE_EMAIL=
```

--------------------------------------------------------------------------------
/apps/sandbox-container/.dev.vars.example:
--------------------------------------------------------------------------------

```
1 | CLOUDFLARE_CLIENT_ID=
2 | CLOUDFLARE_CLIENT_SECRET=
3 | DEV_DISABLE_OAUTH=
4 | DEV_CLOUDFLARE_API_TOKEN=
5 | DEV_CLOUDFLARE_EMAIL=
```

--------------------------------------------------------------------------------
/apps/workers-bindings/.dev.vars.example:
--------------------------------------------------------------------------------

```
1 | CLOUDFLARE_CLIENT_ID=
2 | CLOUDFLARE_CLIENT_SECRET=
3 | DEV_DISABLE_OAUTH=
4 | DEV_CLOUDFLARE_API_TOKEN=
5 | DEV_CLOUDFLARE_EMAIL=
```

--------------------------------------------------------------------------------
/apps/workers-observability/.dev.vars.example:
--------------------------------------------------------------------------------

```
1 | CLOUDFLARE_CLIENT_ID=
2 | CLOUDFLARE_CLIENT_SECRET=
3 | DEV_DISABLE_OAUTH=
4 | DEV_CLOUDFLARE_API_TOKEN=
5 | DEV_CLOUDFLARE_EMAIL=
```

--------------------------------------------------------------------------------
/apps/ai-gateway/.dev.vars.example:
--------------------------------------------------------------------------------

```
1 | CLOUDFLARE_CLIENT_ID=
2 | CLOUDFLARE_CLIENT_SECRET=
3 | DEV_DISABLE_OAUTH=
4 | DEV_CLOUDFLARE_API_TOKEN=
5 | DEV_CLOUDFLARE_EMAIL=
6 | 
```

--------------------------------------------------------------------------------
/apps/autorag/.dev.vars.example:
--------------------------------------------------------------------------------

```
1 | CLOUDFLARE_CLIENT_ID=
2 | CLOUDFLARE_CLIENT_SECRET=
3 | DEV_DISABLE_OAUTH=
4 | DEV_CLOUDFLARE_API_TOKEN=
5 | DEV_CLOUDFLARE_EMAIL=
6 | 
```

--------------------------------------------------------------------------------
/apps/browser-rendering/.dev.vars.example:
--------------------------------------------------------------------------------

```
1 | CLOUDFLARE_CLIENT_ID=
2 | CLOUDFLARE_CLIENT_SECRET=
3 | DEV_DISABLE_OAUTH=
4 | DEV_CLOUDFLARE_API_TOKEN=
5 | DEV_CLOUDFLARE_EMAIL=
6 | 
```

--------------------------------------------------------------------------------
/apps/radar/.dev.vars.example:
--------------------------------------------------------------------------------

```
1 | CLOUDFLARE_CLIENT_ID=
2 | CLOUDFLARE_CLIENT_SECRET=
3 | DEV_DISABLE_OAUTH=
4 | DEV_CLOUDFLARE_API_TOKEN=
5 | DEV_CLOUDFLARE_EMAIL=
6 | 
```

--------------------------------------------------------------------------------
/apps/workers-builds/.dev.vars.example:
--------------------------------------------------------------------------------

```
1 | CLOUDFLARE_CLIENT_ID=
2 | CLOUDFLARE_CLIENT_SECRET=
3 | # OR
4 | DEV_DISABLE_OAUTH=
5 | DEV_CLOUDFLARE_API_TOKEN=
6 | DEV_CLOUDFLARE_EMAIL=
7 | 
```

--------------------------------------------------------------------------------
/apps/ai-gateway/.eslintrc.cjs:
--------------------------------------------------------------------------------

```
1 | /** @type {import("eslint").Linter.Config} */
2 | module.exports = {
3 | 	root: true,
4 | 	extends: ['@repo/eslint-config/default.cjs'],
5 | }
6 | 
```

--------------------------------------------------------------------------------
/apps/auditlogs/.eslintrc.cjs:
--------------------------------------------------------------------------------

```
1 | /** @type {import("eslint").Linter.Config} */
2 | module.exports = {
3 | 	root: true,
4 | 	extends: ['@repo/eslint-config/default.cjs'],
5 | }
6 | 
```

--------------------------------------------------------------------------------
/apps/autorag/.eslintrc.cjs:
--------------------------------------------------------------------------------

```
1 | /** @type {import("eslint").Linter.Config} */
2 | module.exports = {
3 | 	root: true,
4 | 	extends: ['@repo/eslint-config/default.cjs'],
5 | }
6 | 
```

--------------------------------------------------------------------------------
/apps/browser-rendering/.eslintrc.cjs:
--------------------------------------------------------------------------------

```
1 | /** @type {import("eslint").Linter.Config} */
2 | module.exports = {
3 | 	root: true,
4 | 	extends: ['@repo/eslint-config/default.cjs'],
5 | }
6 | 
```

--------------------------------------------------------------------------------
/apps/cloudflare-one-casb/.eslintrc.cjs:
--------------------------------------------------------------------------------

```
1 | /** @type {import("eslint").Linter.Config} */
2 | module.exports = {
3 | 	root: true,
4 | 	extends: ['@repo/eslint-config/default.cjs'],
5 | }
6 | 
```

--------------------------------------------------------------------------------
/apps/demo-day/.eslintrc.cjs:
--------------------------------------------------------------------------------

```
1 | /** @type {import("eslint").Linter.Config} */
2 | module.exports = {
3 | 	root: true,
4 | 	extends: ['@repo/eslint-config/default.cjs'],
5 | }
6 | 
```

--------------------------------------------------------------------------------
/apps/dex-analysis/.eslintrc.cjs:
--------------------------------------------------------------------------------

```
1 | /** @type {import("eslint").Linter.Config} */
2 | module.exports = {
3 | 	root: true,
4 | 	extends: ['@repo/eslint-config/default.cjs'],
5 | }
6 | 
```

--------------------------------------------------------------------------------
/apps/dns-analytics/.eslintrc.cjs:
--------------------------------------------------------------------------------

```
1 | /** @type {import("eslint").Linter.Config} */
2 | module.exports = {
3 | 	root: true,
4 | 	extends: ['@repo/eslint-config/default.cjs'],
5 | }
6 | 
```

--------------------------------------------------------------------------------
/apps/docs-autorag/.eslintrc.cjs:
--------------------------------------------------------------------------------

```
1 | /** @type {import("eslint").Linter.Config} */
2 | module.exports = {
3 | 	root: true,
4 | 	extends: ['@repo/eslint-config/default.cjs'],
5 | }
6 | 
```

--------------------------------------------------------------------------------
/apps/docs-vectorize/.eslintrc.cjs:
--------------------------------------------------------------------------------

```
1 | /** @type {import("eslint").Linter.Config} */
2 | module.exports = {
3 | 	root: true,
4 | 	extends: ['@repo/eslint-config/default.cjs'],
5 | }
6 | 
```

--------------------------------------------------------------------------------
/apps/graphql/.eslintrc.cjs:
--------------------------------------------------------------------------------

```
1 | /** @type {import("eslint").Linter.Config} */
2 | module.exports = {
3 | 	root: true,
4 | 	extends: ['@repo/eslint-config/default.cjs'],
5 | }
6 | 
```

--------------------------------------------------------------------------------
/apps/logpush/.eslintrc.cjs:
--------------------------------------------------------------------------------

```
1 | /** @type {import("eslint").Linter.Config} */
2 | module.exports = {
3 | 	root: true,
4 | 	extends: ['@repo/eslint-config/default.cjs'],
5 | }
6 | 
```

--------------------------------------------------------------------------------
/apps/radar/.eslintrc.cjs:
--------------------------------------------------------------------------------

```
1 | /** @type {import("eslint").Linter.Config} */
2 | module.exports = {
3 | 	root: true,
4 | 	extends: ['@repo/eslint-config/default.cjs'],
5 | }
6 | 
```

--------------------------------------------------------------------------------
/apps/sandbox-container/.eslintrc.cjs:
--------------------------------------------------------------------------------

```
1 | /** @type {import("eslint").Linter.Config} */
2 | module.exports = {
3 | 	root: true,
4 | 	extends: ['@repo/eslint-config/default.cjs'],
5 | }
6 | 
```

--------------------------------------------------------------------------------
/apps/workers-bindings/.eslintrc.cjs:
--------------------------------------------------------------------------------

```
1 | /** @type {import("eslint").Linter.Config} */
2 | module.exports = {
3 | 	root: true,
4 | 	extends: ['@repo/eslint-config/default.cjs'],
5 | }
6 | 
```

--------------------------------------------------------------------------------
/apps/workers-builds/.eslintrc.cjs:
--------------------------------------------------------------------------------

```
1 | /** @type {import("eslint").Linter.Config} */
2 | module.exports = {
3 | 	root: true,
4 | 	extends: ['@repo/eslint-config/default.cjs'],
5 | }
6 | 
```

--------------------------------------------------------------------------------
/apps/workers-observability/.eslintrc.cjs:
--------------------------------------------------------------------------------

```
1 | /** @type {import("eslint").Linter.Config} */
2 | module.exports = {
3 | 	root: true,
4 | 	extends: ['@repo/eslint-config/default.cjs'],
5 | }
6 | 
```

--------------------------------------------------------------------------------
/packages/mcp-common/.eslintrc.cjs:
--------------------------------------------------------------------------------

```
1 | /** @type {import("eslint").Linter.Config} */
2 | module.exports = {
3 | 	root: true,
4 | 	extends: ['@repo/eslint-config/default.cjs'],
5 | }
6 | 
```

--------------------------------------------------------------------------------
/packages/tools/.eslintrc.cjs:
--------------------------------------------------------------------------------

```
1 | /** @type {import("eslint").Linter.Config} */
2 | module.exports = {
3 | 	root: true,
4 | 	extends: ['@repo/eslint-config/default.cjs'],
5 | }
6 | 
```

--------------------------------------------------------------------------------
/.prettierignore:
--------------------------------------------------------------------------------

```
1 | .changeset
2 | .github/
3 | pnpm-lock.yaml
4 | vitest.config.ts.timestamp*
5 | vite.config.ts.timestamp*
6 | worker-configuration.d.ts
7 | **/dist/**
8 | packages/tools/src/test/fixtures/changesets/invalid-json/*.json
9 | 
```

--------------------------------------------------------------------------------
/.eslintrc.cjs:
--------------------------------------------------------------------------------

```
1 | // This configuration only applies to the package manager root.
2 | /** @type {import("eslint").Linter.Config} */
3 | module.exports = {
4 | 	ignorePatterns: ['apps/**', 'packages/**'],
5 | 	extends: ['@repo/eslint-config/default.cjs'],
6 | }
7 | 
```

--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------

```
 1 | # EditorConfig is awesome: https://EditorConfig.org
 2 | 
 3 | # top-most EditorConfig file
 4 | root = true
 5 | 
 6 | [*]
 7 | indent_style = tab
 8 | indent_size = 2
 9 | end_of_line = lf
10 | charset = utf-8
11 | trim_trailing_whitespace = true
12 | insert_final_newline = true
13 | 
14 | [*.{yml,yaml,mdx}]
15 | indent_style = space
16 | 
```

--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------

```
 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
 2 | # Wrangler
 3 | .wrangler
 4 | .dev.vars
 5 | 
 6 | # Astro generated types
 7 | .astro/
 8 | 
 9 | # Dependencies
10 | node_modules
11 | .pnp
12 | .pnp.js
13 | 
14 | .eslintcache
15 | 
16 | # Local env files
17 | .env
18 | .env.local
19 | .env.development.local
20 | .env.test.local
21 | .env.production.local
22 | .secret
23 | *.env
24 | 
25 | # Testing
26 | coverage
27 | 
28 | # Turbo
29 | .turbo
30 | 
31 | # Vercel
32 | .vercel
33 | 
34 | # Build Outputs
35 | .next/
36 | out/
37 | dist
38 | dist2
39 | 
40 | # Debug
41 | npm-debug.log*
42 | yarn-debug.log*
43 | yarn-error.log*
44 | 
45 | # Misc
46 | .DS_Store
47 | *.pem
48 | .sentryclirc.lock/
49 | tmp.json
50 | tmp.ts
51 | .idea
52 | 
53 | apps/sandbox-container/workdir
54 | 
```

--------------------------------------------------------------------------------
/.prettierrc.cjs:
--------------------------------------------------------------------------------

```
 1 | // @ts-check
 2 | 
 3 | const codeImports = [
 4 | 	// Groups
 5 | 	'<BUILTIN_MODULES>',
 6 | 	'<THIRD_PARTY_MODULES>',
 7 | 	'',
 8 | 	'^(@repo)(/.*)$', // Workspace imports
 9 | 	'',
10 | 	// Local (relative) imports
11 | 	'^[.]{2}$', // ..
12 | 	'^[.]{2}/', // ../
13 | 	'^[.]/(?!index)', // ./foo (but not ./index)
14 | 	'^[.]$', // .
15 | 	'^[.]/index$', // ./index
16 | 	'',
17 | ]
18 | 
19 | // Type imports are ordered the same way, but without separators.
20 | // We also need a catch-all <TYPES> here to prevent prettier from failing.
21 | const typeImports = ['<TYPES>'].concat(
22 | 	codeImports.filter((i) => i !== '').map((i) => `<TYPES>${i}`)
23 | )
24 | 
25 | /** @type {import("prettier").Config} */
26 | const config = {
27 | 	trailingComma: 'es5',
28 | 	tabWidth: 2,
29 | 	useTabs: true,
30 | 	semi: false,
31 | 	singleQuote: true,
32 | 	printWidth: 100,
33 | 	plugins: ['@ianvs/prettier-plugin-sort-imports'],
34 | 	importOrder: [...codeImports, ...typeImports],
35 | 	importOrderTypeScriptVersion: '5.5.4',
36 | 	overrides: [
37 | 		{
38 | 			files: '*.mdx',
39 | 			options: {
40 | 				parser: 'mdx',
41 | 			},
42 | 		},
43 | 		{
44 | 			files: ['*.jsonc', '*.code-workspace'],
45 | 			options: {
46 | 				trailingComma: 'none',
47 | 			},
48 | 		},
49 | 	],
50 | }
51 | 
52 | module.exports = config
53 | 
```

--------------------------------------------------------------------------------
/.syncpackrc.cjs:
--------------------------------------------------------------------------------

```
 1 | // @ts-check
 2 | /** @type {import("syncpack").RcFile} */
 3 | const config = {
 4 | 	indent: '\t',
 5 | 	lintFormatting: false, // handled by prettier
 6 | 	versionGroups: [
 7 | 		{
 8 | 			label: 'local packages',
 9 | 			packages: ['**'],
10 | 			dependencies: ['@repo/*'],
11 | 			dependencyTypes: ['!local'], // Exclude the local package itself
12 | 			pinVersion: 'workspace:*',
13 | 		},
14 | 		{
15 | 			label: 'Sentry types that are compatible with toucan-js',
16 | 			dependencies: ['@sentry/types', '@sentry/tracing'],
17 | 			pinVersion: '8.9.2',
18 | 		},
19 | 		{
20 | 			label: 'toucan-js that is compatible with pinned sentry types',
21 | 			dependencies: ['toucan-js'],
22 | 			pinVersion: '4.1.1',
23 | 		},
24 | 		{
25 | 			label: 'pin vitest compatible with @cloudflare/vitest-pool-workers',
26 | 			dependencies: ['vitest', '@vitest/ui'],
27 | 			pinVersion: '3.0.9',
28 | 		},
29 | 		{
30 | 			label: 'pin typescript for eslint',
31 | 			dependencies: ['typescript'],
32 | 			pinVersion: '5.5.4',
33 | 		},
34 | 		{
35 | 			label: `pin eslint and all it's plugins for eslint v8`,
36 | 			dependencies: [
37 | 				'eslint',
38 | 				'@types/eslint',
39 | 				'eslint-config-prettier',
40 | 				'eslint-plugin-react-hooks',
41 | 				'eslint-plugin-unused-imports',
42 | 				'@typescript-eslint/eslint-plugin',
43 | 				'@typescript-eslint/parser',
44 | 			],
45 | 			// snapTo removes it from syncpack update list, which is the main goal
46 | 			snapTo: ['@repo/eslint-config'],
47 | 		},
48 | 		{
49 | 			label: 'use zod v4 in packages/tools',
50 | 			dependencies: ['zod'],
51 | 			pinVersion: '4.0.0-beta.20250505T195954',
52 | 			packages: ['@repo/tools'],
53 | 		},
54 | 	],
55 | 	semverGroups: [
56 | 		{
57 | 			label: 'pin all deps',
58 | 			range: '',
59 | 			dependencies: ['**'],
60 | 			packages: ['**'],
61 | 		},
62 | 	],
63 | }
64 | 
65 | module.exports = config
66 | 
```

--------------------------------------------------------------------------------
/apps/workers-bindings/.gitignore:
--------------------------------------------------------------------------------

```
  1 | node_modules
  2 | 
  3 | .nx
  4 | .idea
  5 | .vscode
  6 | .zed
  7 | # Logs
  8 | 
  9 | logs
 10 | _.log
 11 | npm-debug.log_
 12 | yarn-debug.log*
 13 | yarn-error.log*
 14 | lerna-debug.log*
 15 | .pnpm-debug.log*
 16 | 
 17 | # Diagnostic reports (https://nodejs.org/api/report.html)
 18 | 
 19 | report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
 20 | 
 21 | # Runtime data
 22 | 
 23 | pids
 24 | _.pid
 25 | _.seed
 26 | \*.pid.lock
 27 | 
 28 | # Directory for instrumented libs generated by jscoverage/JSCover
 29 | 
 30 | lib-cov
 31 | 
 32 | # Coverage directory used by tools like istanbul
 33 | 
 34 | coverage
 35 | \*.lcov
 36 | 
 37 | # nyc test coverage
 38 | 
 39 | .nyc_output
 40 | 
 41 | # Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
 42 | 
 43 | .grunt
 44 | 
 45 | # Bower dependency directory (https://bower.io/)
 46 | 
 47 | bower_components
 48 | 
 49 | # node-waf configuration
 50 | 
 51 | .lock-wscript
 52 | 
 53 | # Compiled binary addons (https://nodejs.org/api/addons.html)
 54 | 
 55 | build/Release
 56 | 
 57 | # Dependency directories
 58 | 
 59 | node_modules/
 60 | jspm_packages/
 61 | 
 62 | # Snowpack dependency directory (https://snowpack.dev/)
 63 | 
 64 | web_modules/
 65 | 
 66 | # TypeScript cache
 67 | 
 68 | \*.tsbuildinfo
 69 | 
 70 | # Optional npm cache directory
 71 | 
 72 | .npm
 73 | 
 74 | # Optional eslint cache
 75 | 
 76 | .eslintcache
 77 | 
 78 | # Optional stylelint cache
 79 | 
 80 | .stylelintcache
 81 | 
 82 | # Microbundle cache
 83 | 
 84 | .rpt2_cache/
 85 | .rts2_cache_cjs/
 86 | .rts2_cache_es/
 87 | .rts2_cache_umd/
 88 | 
 89 | # Optional REPL history
 90 | 
 91 | .node_repl_history
 92 | 
 93 | # Output of 'npm pack'
 94 | 
 95 | \*.tgz
 96 | 
 97 | # Yarn Integrity file
 98 | 
 99 | .yarn-integrity
100 | 
101 | # dotenv environment variable files
102 | 
103 | .env
104 | .env.development.local
105 | .env.test.local
106 | .env.production.local
107 | .env.local
108 | 
109 | # parcel-bundler cache (https://parceljs.org/)
110 | 
111 | .cache
112 | .parcel-cache
113 | 
114 | # Next.js build output
115 | 
116 | .next
117 | out
118 | 
119 | # Nuxt.js build / generate output
120 | 
121 | .nuxt
122 | dist
123 | 
124 | # Gatsby files
125 | 
126 | .cache/
127 | 
128 | # Comment in the public line in if your project uses Gatsby and not Next.js
129 | 
130 | # https://nextjs.org/blog/next-9-1#public-directory-support
131 | 
132 | # public
133 | 
134 | # vuepress build output
135 | 
136 | .vuepress/dist
137 | 
138 | # vuepress v2.x temp and cache directory
139 | 
140 | .temp
141 | .cache
142 | 
143 | # Docusaurus cache and generated files
144 | 
145 | .docusaurus
146 | 
147 | # Serverless directories
148 | 
149 | .serverless/
150 | 
151 | # FuseBox cache
152 | 
153 | .fusebox/
154 | 
155 | # DynamoDB Local files
156 | 
157 | .dynamodb/
158 | 
159 | # TernJS port file
160 | 
161 | .tern-port
162 | 
163 | # Stores VSCode versions used for testing VSCode extensions
164 | 
165 | .vscode-test
166 | 
167 | # yarn v2
168 | 
169 | .yarn/cache
170 | .yarn/unplugged
171 | .yarn/build-state.yml
172 | .yarn/install-state.gz
173 | .pnp.\*
174 | 
175 | # wrangler project
176 | 
177 | .dev.vars
178 | .wrangler/
179 | 
```

--------------------------------------------------------------------------------
/packages/mcp-common/README.md:
--------------------------------------------------------------------------------

```markdown
1 | # MCP Common
2 | 
3 | A place for common things used across MCP packages/apps
4 | 
```

--------------------------------------------------------------------------------
/packages/eslint-config/README.md:
--------------------------------------------------------------------------------

```markdown
1 | # `@repo/eslint-config`
2 | 
3 | Collection of internal eslint configurations.
4 | 
```

--------------------------------------------------------------------------------
/.changeset/README.md:
--------------------------------------------------------------------------------

```markdown
1 | # Changesets
2 | 
3 | Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4 | with multi-package repos, or single-package repos to help you version and publish your code. You can
5 | find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6 | 
7 | We have a quick list of common questions to get you started engaging with this project in
8 | [our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
9 | 
```

--------------------------------------------------------------------------------
/apps/docs-autorag/README.md:
--------------------------------------------------------------------------------

```markdown
 1 | # Model Context Protocol (MCP) Server + Cloudflare Documentation (via Autorag)
 2 | 
 3 | This is a [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) server that supports remote MCP connections. It connects to an autorag instance (in this case, Cloudflare docs)
 4 | 
 5 | To run this server, you'll need access to an autorag instance which has indexed the contents of cloudflare-docs: https://github.com/cloudflare/cloudflare-docs/
 6 | 
 7 | The Cloudflare account this worker is deployed on already has this Autorag instance setup and indexed.
 8 | 
 9 | ## Running locally
10 | 
11 | ```
12 | pnpm run start
13 | ```
14 | 
15 | Then connect to the server via remote MCP at `http://localhost:8976/sse`
16 | 
17 | ## Deploying
18 | 
19 | ```
20 | pnpm run deploy --env [ENVIRONMENT]
21 | ```
22 | 
```

--------------------------------------------------------------------------------
/apps/cloudflare-one-casb/README.md:
--------------------------------------------------------------------------------

```markdown
 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/logpush.tools.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 | ```
32 | 
```

--------------------------------------------------------------------------------
/packages/tools/README.md:
--------------------------------------------------------------------------------

```markdown
 1 | # @repo/tools
 2 | 
 3 | A collection of shared scripts for automating the monorepo while ensuring consistency across packages.
 4 | 
 5 | ## Scripts
 6 | 
 7 | ### Bin Scripts
 8 | 
 9 | Simple shell scripts for common development tasks:
10 | 
11 | - `run-tsc`: Run TypeScript type checking
12 | - `run-eslint-workers`: Run ESLint checks
13 | - `run-vitest`: Run tests
14 | - `run-vitest-ci`: Run tests in CI mode
15 | - `run-turbo`: Run Turbo commands with tracking disabled
16 | - `run-wrangler-deploy`: Deploy using Wrangler
17 | - `run-wrangler-types`: Generate Wrangler types
18 | - `run-fix-deps`: Fix dependencies
19 | 
20 | ### Runx CLI
21 | 
22 | A TypeScript-based CLI for more complex automation tasks. While the bin scripts work well for simple tasks, the runx CLI provides better type safety and more sophisticated programmatic control.
23 | 
24 | Usage:
25 | 
26 | ```bash
27 | pnpm runx <command> [options]
28 | ```
29 | 
30 | Available commands:
31 | 
32 | - `deploy-published-workers`: Deploy Cloudflare Workers (based on which packages changesets marked as published in the release).
33 | 
34 | Note:
35 | 
36 | The CLI will automatically use Bun if available, but falls back to tsx if not installed.
37 | 
```

--------------------------------------------------------------------------------
/apps/logpush/README.md:
--------------------------------------------------------------------------------

```markdown
 1 | # Cloudflare Logpush MCP Server 📜
 2 | 
 3 | This is a [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) server that supports remote MCP
 4 | connections, with Cloudflare OAuth built-in.
 5 | 
 6 | It integrates tools powered by the [Cloudflare Logpush API](https://developers.cloudflare.com/logs/) to provide insights into Logpush jobs.
 7 | 
 8 | ## 🔨 Available Tools
 9 | 
10 | Currently available tools:
11 | 
12 | | **Category**                | **Tool**                     | **Description**                                                         |
13 | | --------------------------- | ---------------------------- | ----------------------------------------------------------------------- |
14 | | **Logpush Jobs By Account** | `logpush_jobs_by_account_id` | Fetches Logpush jobs by specific account or all accounts under the user |
15 | 
16 | This MCP server is still a work in progress, and we plan to add more tools in the future.
17 | 
18 | ### Prompt Examples
19 | 
20 | - `Which Logpush jobs failed recently?`
21 | - `Do any of my Logpush jobs in my <insert name> account have errors?`
22 | - `Can you list all the enabled job failures from today?`
23 | 
24 | ## Access the remote MCP server from any MCP Client
25 | 
26 | 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/)).
27 | 
28 | If your client does not yet support remote MCP servers, you will need to set up its respective configuration file using [mcp-remote](https://www.npmjs.com/package/mcp-remote) to specify which servers your client can access.
29 | 
30 | Replace the content with the following configuration:
31 | 
32 | ```json
33 | {
34 | 	"mcpServers": {
35 | 		"cloudflare": {
36 | 			"command": "npx",
37 | 			"args": ["mcp-remote", "https://logs.mcp.cloudflare.com/sse"]
38 | 		}
39 | 	}
40 | }
41 | ```
42 | 
43 | 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.
44 | 
```

--------------------------------------------------------------------------------
/apps/auditlogs/README.md:
--------------------------------------------------------------------------------

```markdown
 1 | # Cloudflare Audit Logs MCP Server 🕵🏻
 2 | 
 3 | This is a [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) server that supports remote MCP
 4 | connections, with Cloudflare OAuth built-in.
 5 | 
 6 | Audit logs summarize the history of changes made within your Cloudflare account. Audit logs include account level actions like zone configuration changes. The tool is powered by the [Audit Log API](https://developers.cloudflare.com/api/resources/accounts/subresources/logs/subresources/audit/methods/list/)
 7 | 
 8 | ## 🔨 Available Tools
 9 | 
10 | Currently available tools:
11 | 
12 | | **Category**   | **Tool**                  | **Description**                                                                                  |
13 | | -------------- | ------------------------- | ------------------------------------------------------------------------------------------------ |
14 | | **Audit Logs** | `auditlogs_by_account_id` | Fetches the history of changes between within your Cloudflare account over a specific time range |
15 | 
16 | ### Prompt Examples
17 | 
18 | - `Were there any suspicious changes made to my Cloudflare account yesterday around lunch time?`
19 | - `When was the last activity that updated a DNS record?`
20 | 
21 | ## Access the remote MCP server from any MCP Client
22 | 
23 | 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/)).
24 | 
25 | If your client does not yet support remote MCP servers, you will need to set up its respective configuration file using [mcp-remote](https://www.npmjs.com/package/mcp-remote) to specify which servers your client can access.
26 | 
27 | Replace the content with the following configuration:
28 | 
29 | ```json
30 | {
31 | 	"mcpServers": {
32 | 		"cloudflare": {
33 | 			"command": "npx",
34 | 			"args": ["mcp-remote", "https://auditlogs.mcp.cloudflare.com/sse"]
35 | 		}
36 | 	}
37 | }
38 | ```
39 | 
40 | 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.
41 | 
```

--------------------------------------------------------------------------------
/apps/docs-vectorize/README.md:
--------------------------------------------------------------------------------

```markdown
 1 | # Cloudflare Documentation MCP Server (via Vectorize) 🔭
 2 | 
 3 | This is a [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) server that supports remote MCP connections. It connects to a Vectorize DB (in this case, indexed w/ the Cloudflare docs)
 4 | 
 5 | The Cloudflare account this worker is deployed on already has this Vectorize DB setup and indexed.
 6 | 
 7 | ## 🔨 Available Tools
 8 | 
 9 | Currently available tools:
10 | 
11 | | **Category**                 | **Tool**                          | **Description**                      |
12 | | ---------------------------- | --------------------------------- | ------------------------------------ |
13 | | **Cloudflare Documentation** | `search_cloudflare_documentation` | Search the Cloudflare documentation. |
14 | 
15 | ### Prompt Examples
16 | 
17 | - `Do Cloudflare Workers costs depend on response sizes? I want to serve some images (map tiles) from an R2 bucket and I'm concerned about costs.`
18 | - `How many indexes are supported in Workers Analytics Engine? Give an example using the Workers binding api.`
19 | - `Can you give me some information on how to use the Workers AutoRAG binding`
20 | 
21 | ## Access the remote MCP server from any MCP Client
22 | 
23 | If your MCP client has first class support for remote MCP servers, the client will provide a way to accept the server URL (`https://docs.mcp.cloudflare.com`) directly within its interface (for example in [Cloudflare AI Playground](https://playground.ai.cloudflare.com/)).
24 | 
25 | If your client does not yet support remote MCP servers, you will need to set up its respective configuration file using [mcp-remote](https://www.npmjs.com/package/mcp-remote) to specify which servers your client can access.
26 | 
27 | Replace the content with the following configuration:
28 | 
29 | ```json
30 | {
31 | 	"mcpServers": {
32 | 		"cloudflare": {
33 | 			"command": "npx",
34 | 			"args": ["mcp-remote", "https://docs.mcp.cloudflare.com/sse"]
35 | 		}
36 | 	}
37 | }
38 | ```
39 | 
40 | 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.
41 | 
42 | Interested in contributing, and running this server locally? See [CONTRIBUTING.md](CONTRIBUTING.md) to get started.
43 | 
```

--------------------------------------------------------------------------------
/apps/autorag/README.md:
--------------------------------------------------------------------------------

```markdown
 1 | # Cloudflare AutoRAG MCP Server 📡
 2 | 
 3 | This is a [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) server that supports remote MCP
 4 | connections, with Cloudflare OAuth built-in.
 5 | 
 6 | It integrates tools powered by the [Cloudflare AutoRAG API](https://developers.cloudflare.com/autorag/) to allow you to access and query your account's AutoRAG instances.
 7 | 
 8 | ## 🔨 Available Tools
 9 | 
10 | Currently available tools:
11 | 
12 | | **Tool**    | **Description**                                                                  |
13 | | ----------- | -------------------------------------------------------------------------------- |
14 | | `list_rags` | Lists AutoRAGs with pagination support                                           |
15 | | `search`    | Searches documents in a specified AutoRAG using a query (URL, title, or snippet) |
16 | | `ai_search` | Performs AI-powered search on documents in a specified AutoRAG                   |
17 | 
18 | This MCP server is still a work in progress, and we plan to add more tools in the future.
19 | 
20 | ### Prompt Examples
21 | 
22 | - `List all AutoRAGs in my account.`
23 | - `Search for documents in AutoRAG with ID 'rag123' using the query 'cloudflare security'.`
24 | - `Perform an AI search in AutoRAG with ID 'rag456' for 'best practices for vector stores'.`
25 | 
26 | ## Access the remote MCP server from any MCP Client
27 | 
28 | 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/)).
29 | 
30 | If your client does not yet support remote MCP servers, you will need to set up its respective configuration file using mcp-remote (https://www.npmjs.com/package/mcp-remote) to specify which servers your client can access.
31 | 
32 | Replace the content with the following configuration:
33 | 
34 | ```json
35 | {
36 | 	"mcpServers": {
37 | 		"cloudflare": {
38 | 			"command": "npx",
39 | 			"args": ["mcp-remote", "https://autorag.mcp.cloudflare.com/sse"]
40 | 		}
41 | 	}
42 | }
43 | ```
44 | 
45 | 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.
46 | 
47 | Interested in contributing, and running this server locally? See [CONTRIBUTING.md](CONTRIBUTING.md) to get started.
48 | 
```

--------------------------------------------------------------------------------
/apps/browser-rendering/README.md:
--------------------------------------------------------------------------------

```markdown
 1 | # Cloudflare Browser Rendering MCP Server 📡
 2 | 
 3 | This is a [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) server that supports remote MCP
 4 | connections, with Cloudflare OAuth built-in.
 5 | 
 6 | It integrates tools powered by the [Cloudflare Browser Rendering API](https://developers.cloudflare.com/browser-rendering/) to provide global
 7 | Internet traffic insights, trends and other utilities.
 8 | 
 9 | ## 🔨 Available Tools
10 | 
11 | Currently available tools:
12 | 
13 | | **Tool**               | **Description**                                                              |
14 | | ---------------------- | ---------------------------------------------------------------------------- |
15 | | `get_url_html_content` | Retrieves the HTML content of the specified URL.                             |
16 | | `get_url_markdown`     | Fetches the webpage content and converts it into Markdown format.            |
17 | | `get_url_screenshot`   | Captures a screenshot of the webpage. Optionally, specify the viewport size. |
18 | 
19 | **Note:** To use these tools, ensure you have an active account set. If not, use `accounts_list` to list your accounts and `set_active_account` to set one as active.
20 | 
21 | This MCP server is still a work in progress, and we plan to add more tools in the future.
22 | 
23 | ### Prompt Examples
24 | 
25 | - `Get the HTML content of https://example.com.`
26 | - `Convert https://example.com to Markdown.`
27 | - `Take a screenshot of https://example.com.`
28 | 
29 | ## Access the remote MCP server from any MCP Client
30 | 
31 | 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/)).
32 | 
33 | If your client does not yet support remote MCP servers, you will need to set up its respective configuration file using mcp-remote (https://www.npmjs.com/package/mcp-remote) to specify which servers your client can access.
34 | 
35 | Replace the content with the following configuration:
36 | 
37 | ```json
38 | {
39 | 	"mcpServers": {
40 | 		"cloudflare": {
41 | 			"command": "npx",
42 | 			"args": ["mcp-remote", "https://browser.mcp.cloudflare.com/sse"]
43 | 		}
44 | 	}
45 | }
46 | ```
47 | 
48 | 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.
49 | 
50 | Interested in contributing, and running this server locally? See [CONTRIBUTING.md](CONTRIBUTING.md) to get started.
51 | 
```

--------------------------------------------------------------------------------
/apps/workers-builds/README.md:
--------------------------------------------------------------------------------

```markdown
 1 | # Workers Builds MCP Server 🔭
 2 | 
 3 | This is a [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) server that supports remote MCP
 4 | connections, with Cloudflare OAuth built-in.
 5 | 
 6 | It integrates tools to provide insights and management capabilities for your Cloudflare Workers Builds.
 7 | 
 8 | ## 🔨 Available Tools
 9 | 
10 | Currently available tools:
11 | 
12 | | **Category**       | **Tool**                           | **Description**                                                                          |
13 | | ------------------ | ---------------------------------- | ---------------------------------------------------------------------------------------- |
14 | | **Workers Builds** | `workers_builds_set_active_worker` | Sets the active Worker ID for subsequent calls.                                          |
15 | | **Workers Builds** | `workers_builds_list_builds`       | Lists builds for a Cloudflare Worker.                                                    |
16 | | **Workers Builds** | `workers_builds_get_build`         | Retrieves details for a specific build by its UUID, including build and deploy commands. |
17 | | **Workers Builds** | `workers_builds_get_build_logs`    | Fetches the logs for a Cloudflare Workers build by its UUID.                             |
18 | 
19 | This MCP server is still a work in progress, and we plan to add more tools in the future.
20 | 
21 | ### Prompt Examples
22 | 
23 | - `Set my-worker as the active worker.`
24 | - `List the last 5 builds for my worker 'my-ci-worker'.`
25 | - `What were the details for build 'xxxx-xxxx-xxxx-xxxx'?`
26 | - `Show me the logs for build my latest build.`
27 | - `Did the latest build for worker frontend-app succeed?`
28 | 
29 | ## Access the remote MCP server from from any MCP Client
30 | 
31 | If your MCP client has first class support for remote MCP servers, the client will provide a way to accept the server URL (`https://builds.mcp.cloudflare.com`) directly within its interface (for example in [Cloudflare AI Playground](https://playground.ai.cloudflare.com/)).
32 | 
33 | If your client does not yet support remote MCP servers, you will need to set up its respective configuration file using [mcp-remote](https://www.npmjs.com/package/mcp-remote) to specify which servers your client can access.
34 | 
35 | Replace the content with the following configuration:
36 | 
37 | ```json
38 | {
39 | 	"mcpServers": {
40 | 		"cloudflare": {
41 | 			"command": "npx",
42 | 			"args": ["mcp-remote@latest", "https://builds.mcp.cloudflare.com/sse"]
43 | 		}
44 | 	}
45 | }
46 | ```
47 | 
48 | 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.
49 | 
50 | Interested in contributing, and running this server locally? See [CONTRIBUTING.md](CONTRIBUTING.md) to get started.
51 | 
```

--------------------------------------------------------------------------------
/apps/dns-analytics/README.md:
--------------------------------------------------------------------------------

```markdown
 1 | # Cloudflare DNS Analytics MCP Server 📡
 2 | 
 3 | This is a [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) server that supports remote MCP
 4 | connections, with Cloudflare OAuth built-in.
 5 | 
 6 | It integrates tools powered by the [Cloudflare DNS Analytics API](https://developers.cloudflare.com/api/resources/dns/) to provide insights on DNS analytics and optimization.
 7 | 
 8 | ## 🔨 Available Tools
 9 | 
10 | Currently available tools:
11 | 
12 | | **Category**            | **Tool**                    | **Description**                                                |
13 | | ----------------------- | --------------------------- | -------------------------------------------------------------- |
14 | | **Zone Information**    | `zones_list`                | List zones under the current active account.                   |
15 | | **DNS Analytics**       | `dns_report`                | Fetch the DNS Report for a given zone over a given time frame. |
16 | | **Account DNS Setting** | `show_account_dns_settings` | Fetch the DNS setting for the current active account.          |
17 | | **Zone DNS Setting**    | `show_zone_dns_settings`    | Fetch the DNS setting for a given zone.                        |
18 | 
19 | This MCP server is still a work in progress, and we plan to add more tools in the future.
20 | 
21 | ### Prompt Examples
22 | 
23 | - `List zones under my Cloudflare account.`
24 | - `What are the DNS Settings for my account?`
25 | - `Show me the zones under my account and fetch DNS Report for them.`
26 | - `How can I optimize my DNS Setting based on my DNS Report?`
27 | - `Which of my zones has the highest traffic?`
28 | - `Read Cloudflare's documentation on managing DNS records and tell me how to optimize my DNS settings.`
29 | - `Show me DNS Report for https://example.com in the last X days.`
30 | 
31 | ## Access the remote MCP server from any MCP Client
32 | 
33 | 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/)).
34 | 
35 | If your client does not yet support remote MCP servers, you will need to set up its respective configuration file using [mcp-remote](https://www.npmjs.com/package/mcp-remote) to specify which servers your client can access.
36 | 
37 | Replace the content with the following configuration:
38 | 
39 | ```json
40 | {
41 | 	"mcpServers": {
42 | 		"cloudflare": {
43 | 			"command": "npx",
44 | 			"args": ["mcp-remote", "https://dns-analytics.mcp.cloudflare.com/sse"]
45 | 		}
46 | 	}
47 | }
48 | ```
49 | 
50 | 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.
51 | 
52 | Interested in contributing, and running this server locally? See [CONTRIBUTING.md](CONTRIBUTING.md) to get started.
53 | 
```

--------------------------------------------------------------------------------
/apps/graphql/README.md:
--------------------------------------------------------------------------------

```markdown
 1 | # Cloudflare GraphQL MCP Server
 2 | 
 3 | This is a [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) server that supports remote MCP
 4 | connections, with Cloudflare OAuth built-in. It integrates tools powered by the [Cloudflare GraphQL API](https://developers.cloudflare.com/analytics/graphql-api/) to provide insights and utilities for your Cloudflare account.
 5 | 
 6 | ## Available Tools
 7 | 
 8 | Currently available tools:
 9 | 
10 | | **Category**                | **Tool**                  | **Description**                                                                                 |
11 | | --------------------------- | ------------------------- | ----------------------------------------------------------------------------------------------- |
12 | | **GraphQL Schema Search**   | `graphql_schema_search`   | Search the Cloudflare GraphQL API schema for types, fields, and enum values matching a keyword  |
13 | | **GraphQL Schema Overview** | `graphql_schema_overview` | Fetch the high-level overview of the Cloudflare GraphQL API schema                              |
14 | | **GraphQL Type Details**    | `graphql_type_details`    | Fetch detailed information about a specific GraphQL type                                        |
15 | | **GraphQL Complete Schema** | `graphql_complete_schema` | Fetch the complete Cloudflare GraphQL API schema (combines overview and important type details) |
16 | | **GraphQL Query Execution** | `graphql_query`           | Execute a GraphQL query against the Cloudflare API                                              |
17 | | **GraphQL API Explorer**    | `graphql_api_explorer`    | Generate a Cloudflare [GraphQL API Explorer](https://graphql.cloudflare.com/explorer) link      |
18 | 
19 | ### Prompt Examples
20 | 
21 | - `Show me HTTP traffic for the last 7 days for example.com`
22 | - `Show me which GraphQL datatype I need to use to query firewall events`
23 | - `Can you generate a link to the Cloudflare GraphQL API Explorer with a pre-populated query and variables?`
24 | - `I need to monitor HTTP requests and responses for a specific domain. Can you help me with that using the Cloudflare GraphQL API?`
25 | 
26 | ## Access the remote MCP server from Claude Desktop
27 | 
28 | If your MCP client has first class support for remote MCP servers, the client will provide a way to accept the server URL (`https://graphql.mcp.cloudflare.com/sse`) directly within its interface (for example in [Cloudflare AI Playground](https://playground.ai.cloudflare.com/)).
29 | 
30 | If your client does not yet support remote MCP servers, you will need to set up its respective configuration file using [mcp-remote](https://www.npmjs.com/package/mcp-remote) to specify which servers your client can access.
31 | 
32 | Replace the content with the following configuration:
33 | 
34 | ```json
35 | {
36 | 	"mcpServers": {
37 | 		"cloudflare": {
38 | 			"command": "npx",
39 | 			"args": ["mcp-remote", "https://graphql.mcp.cloudflare.com/sse"]
40 | 		}
41 | 	}
42 | }
43 | ```
44 | 
45 | 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.
46 | 
```

--------------------------------------------------------------------------------
/apps/ai-gateway/README.md:
--------------------------------------------------------------------------------

```markdown
 1 | # Cloudflare AI Gateway MCP Server 📡
 2 | 
 3 | This is a [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) server that supports remote MCP
 4 | connections, with Cloudflare OAuth built-in.
 5 | 
 6 | It integrates tools powered by the [Cloudflare AI Gateway API](https://developers.cloudflare.com/ai-gateway/) to provide global
 7 | Internet traffic insights, trends and other utilities.
 8 | 
 9 | ## 🔨 Available Tools
10 | 
11 | Currently available tools:
12 | 
13 | | **Tool**                | **Description**                                                                                                                     |
14 | | ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
15 | | `list_gateways`         | Lists all AI Gateways associated with the account, supporting pagination for easy navigation.                                       |
16 | | `list_logs`             | Retrieves logs for a specified gateway, offering filters such as date ranges, feedback scores, success status, model, and provider. |
17 | | `get_log_details`       | Fetches detailed information about a specific log identified by its log ID within a gateway.                                        |
18 | | `get_log_request_body`  | Retrieves the request body associated with a specific log in a gateway.                                                             |
19 | | `get_log_response_body` | Retrieves the response body associated with a specific log in a gateway.                                                            |
20 | 
21 | **Note:** To use these tools, ensure you have an active account set. If not, use `accounts_list` to list your accounts and `set_active_account` to set one as active.
22 | 
23 | This MCP server is still a work in progress, and we plan to add more tools in the future.
24 | 
25 | ### Prompt Examples
26 | 
27 | - `List all my AI Gateways.`
28 | - `Show logs for gateway 'gateway-001' between January 1, 2023, and January 31, 2023.`
29 | - `Fetch the latest errors from gateway-001 and debug what might have happened wrongly`
30 | 
31 | ## Access the remote MCP server from any MCP Client
32 | 
33 | 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/)).
34 | 
35 | If your client does not yet support remote MCP servers, you will need to set up its respective configuration file using mcp-remote (https://www.npmjs.com/package/mcp-remote) to specify which servers your client can access.
36 | 
37 | Replace the content with the following configuration:
38 | 
39 | ```json
40 | {
41 | 	"mcpServers": {
42 | 		"cloudflare": {
43 | 			"command": "npx",
44 | 			"args": ["mcp-remote", "https://ai-gateway.mcp.cloudflare.com/sse"]
45 | 		}
46 | 	}
47 | }
48 | ```
49 | 
50 | 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.
51 | 
52 | Interested in contributing, and running this server locally? See [CONTRIBUTING.md](CONTRIBUTING.md) to get started.
53 | 
```

--------------------------------------------------------------------------------
/apps/workers-observability/README.md:
--------------------------------------------------------------------------------

```markdown
 1 | # Workers Observability MCP Server 🔭
 2 | 
 3 | This is a [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) server that supports remote MCP
 4 | connections, with Cloudflare OAuth built-in.
 5 | 
 6 | It integrates tools powered by [Workers Observability](https://developers.cloudflare.com/workers/observability/) to provide global
 7 | Internet traffic insights, trends and other utilities.
 8 | 
 9 | ## 🔨 Available Tools
10 | 
11 | Currently available tools:
12 | 
13 | | **Category**          | **Tool**                     | **Description**                                                                                                                                                            |
14 | | --------------------- | ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
15 | | **Workers Analytics** | `query_worker_observability` | Queries Workers Observability API to analyze logs and metrics from your Cloudflare Workers. Supports listing events, calculating metrics, and finding specific invocations |
16 | | **Schema Discovery**  | `observability_keys`         | Discovers available data fields in your Workers logs including metadata fields, worker-specific fields, and custom logged fields                                           |
17 | | **Value Exploration** | `observability_values`       | Finds available values for specific fields in Workers logs to help build precise filters for analytics queries                                                             |
18 | 
19 | This MCP server is still a work in progress, and we plan to add more tools in the future.
20 | 
21 | ### Prompt Examples
22 | 
23 | - `Can you tell me about any potential issues on this particular worker 'my-worker-name'?`
24 | - `Show me the CPU time usage for my worker 'api-gateway' over the last 24 hours`
25 | - `What were the top 5 countries by request count for my worker yesterday?`
26 | - `How many requests were made to my worker 'my-app' broken down by HTTP status code?`
27 | - `Compare the error rates between my production and staging workers`
28 | 
29 | ## Access the remote MCP server from any MCP Client
30 | 
31 | If your MCP client has first class support for remote MCP servers, the client will provide a way to accept the server URL (`https://observability.mcp.cloudflare.com`) directly within its interface (for example in [Cloudflare AI Playground](https://playground.ai.cloudflare.com/)).
32 | 
33 | If your client does not yet support remote MCP servers, you will need to set up its respective configuration file using [mcp-remote](https://www.npmjs.com/package/mcp-remote) to specify which servers your client can access.
34 | 
35 | Replace the content with the following configuration:
36 | 
37 | ```json
38 | {
39 | 	"mcpServers": {
40 | 		"cloudflare": {
41 | 			"command": "npx",
42 | 			"args": ["mcp-remote", "https://observability.mcp.cloudflare.com/sse"]
43 | 		}
44 | 	}
45 | }
46 | ```
47 | 
48 | 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.
49 | 
50 | Interested in contributing, and running this server locally? See [CONTRIBUTING.md](CONTRIBUTING.md) to get started.
51 | 
```

--------------------------------------------------------------------------------
/apps/sandbox-container/README.md:
--------------------------------------------------------------------------------

```markdown
 1 | # Cloudflare Container Sandbox MCP Server
 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 | It integrates tools for running a sandbox container with your MCP client. With this server you can allow your LLM to run arbitrary code, such as Node or Python, in a secure, sandboxed environment.
 6 | 
 7 | ## Tools
 8 | 
 9 | | **Category**            | **Tool**                | **Description**                                                                                                                       |
10 | | ----------------------- | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------- |
11 | | **Container Lifecycle** | `container_initialize`  | (Re)start a container. Containers are intended to be ephemeral and don't save any state. Containers are only guaranteed to last ~10m. |
12 | |                         | `container_ping`        | Ping a container for connectivity                                                                                                     |
13 | | **Filesystem**          | `container_file_write`  | Write to a file                                                                                                                       |
14 | |                         | `container_files_list`  | List all files in the work directory                                                                                                  |
15 | |                         | `container_file_read`   | Read the contents of a single file or directory                                                                                       |
16 | |                         | `container_file_delete` | Delete a single file or directory                                                                                                     |
17 | | **Execution**           | `container_exec`        | Run a command in the shell                                                                                                            |
18 | 
19 | This MCP server is still a work in progress, and we plan to add more tools in the future.
20 | 
21 | ### Prompt Examples
22 | 
23 | - `Create a visualization using matplotlib. Run it in the container that you can start`
24 | - `Clone and explore this github repo: [repo link]. Setup and run the tests in your development environment`
25 | - `Analyze this data using Python`
26 | 
27 | ## Access the remote MCP server from any MCP Client
28 | 
29 | If your MCP client has first class support for remote MCP servers, the client will provide a way to accept the server URL (`https://bindings.mcp.cloudflare.com`) directly within its interface (for example in [Cloudflare AI Playground](https://playground.ai.cloudflare.com/)).
30 | 
31 | If your client does not yet support remote MCP servers, you will need to set up its respective configuration file using [mcp-remote](https://www.npmjs.com/package/mcp-remote) to specify which servers your client can access.
32 | 
33 | Replace the content with the following configuration:
34 | 
35 | ```json
36 | {
37 | 	"mcpServers": {
38 | 		"cloudflare": {
39 | 			"command": "npx",
40 | 			"args": ["mcp-remote", "https://containers.mcp.cloudflare.com/sse"]
41 | 		}
42 | 	}
43 | }
44 | ```
45 | 
46 | 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.
47 | 
48 | Interested in contributing, and running this server locally? See [CONTRIBUTING.md](CONTRIBUTING.md) to get started.
49 | 
```

--------------------------------------------------------------------------------
/apps/radar/README.md:
--------------------------------------------------------------------------------

```markdown
 1 | # Cloudflare Radar MCP Server 📡
 2 | 
 3 | This is a [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) server that supports remote MCP
 4 | connections, with Cloudflare OAuth built-in.
 5 | 
 6 | It integrates tools powered by the [Cloudflare Radar API](https://developers.cloudflare.com/radar/) to provide global
 7 | Internet traffic insights, trends and other utilities.
 8 | 
 9 | ## 🔨 Available Tools
10 | 
11 | Currently available tools:
12 | 
13 | | **Category**           | **Tool**                        | **Description**                                                                                                      |
14 | | ---------------------- | ------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
15 | | **AI**                 | `get_ai_data`                   | Retrieves AI-related data, including traffic from AI user agents, as well as popular models and model tasks          |
16 | | **Autonomous Systems** | `list_autonomous_systems`       | Lists ASes; filter by location and sort by population size                                                           |
17 | |                        | `get_as_details`                | Retrieves detailed info for a specific ASN                                                                           |
18 | | **Domains**            | `get_domains_ranking`           | Gets top or trending domains                                                                                         |
19 | |                        | `get_domain_rank_details`       | Gets domain rank details                                                                                             |
20 | | **DNS**                | `get_dns_data`                  | Retrieves DNS query data to 1.1.1.1, including timeseries, summaries, and breakdowns by dimensions like `queryType`  |
21 | | **Email Routing**      | `get_email_routing_data`        | Retrieves Email Routing data, including timeseries, and breakdowns by dimensions like `encrypted`                    |
22 | | **Email Security**     | `get_email_security_data`       | Retrieves Email Security data, including timeseries, and breakdowns by dimensions like `threatCategory`              |
23 | | **HTTP**               | `get_http_data`                 | Retrieves HTTP request data, including timeseries, and breakdowns by dimensions like `deviceType`                    |
24 | | **IP Addresses**       | `get_ip_details`                | Provides details about a specific IP address                                                                         |
25 | | **Internet Services**  | `get_internet_services_ranking` | Gets top Internet services                                                                                           |
26 | | **Internet Quality**   | `get_internet_quality_data`     | Retrieves a summary or time series of bandwidth, latency, or DNS response time from the Radar Internet Quality Index |
27 | | **Internet Speed**     | `get_internet_speed_data`       | Retrieves summary of bandwidth, latency, jitter, and packet loss, from the previous 90 days of Cloudflare Speed Test |
28 | | **Layer 3 Attacks**    | `get_l3_attack_data`            | Retrieves L3 attack data, including timeseries, top attacks, and breakdowns by dimensions like `protocol`            |
29 | | **Layer 7 Attacks**    | `get_l7_attack_data`            | Retrieves L7 attack data, including timeseries, top attacks, and breakdowns by dimensions like `mitigationProduct`   |
30 | | **Traffic Anomalies**  | `get_traffic_anomalies`         | Lists traffic anomalies and outages; filter by AS, location, start date, and end date                                |
31 | | **URL Scanner**        | `scan_url`                      | Scans a URL via [Cloudflare’s URL Scanner](https://developers.cloudflare.com/radar/investigate/url-scanner/)         |
32 | 
33 | This MCP server is still a work in progress, and we plan to add more tools in the future.
34 | 
35 | ### Prompt Examples
36 | 
37 | - `What are the most used operating systems?`
38 | - `What are the top 5 ASes in Portugal?`
39 | - `Get information about ASN 13335.`
40 | - `What are the details of IP address 1.1.1.1?`
41 | - `List me traffic anomalies in Syria over the last year.`
42 | - `Compare domain rankings in the US and UK.`
43 | - `Give me rank details for google.com in March 2025.`
44 | - `Scan https://example.com.`
45 | - `Show me HTTP traffic trends from Portugal.`
46 | - `Show me application layer attack trends from the last 7 days.`
47 | 
48 | ## Access the remote MCP server from any MCP Client
49 | 
50 | 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/)).
51 | 
52 | If your client does not yet support remote MCP servers, you will need to set up its respective configuration file using [mcp-remote](https://www.npmjs.com/package/mcp-remote) to specify which servers your client can access.
53 | 
54 | Replace the content with the following configuration:
55 | 
56 | ```json
57 | {
58 | 	"mcpServers": {
59 | 		"cloudflare": {
60 | 			"command": "npx",
61 | 			"args": ["mcp-remote", "https://radar.mcp.cloudflare.com/sse"]
62 | 		}
63 | 	}
64 | }
65 | ```
66 | 
67 | 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.
68 | 
69 | Interested in contributing, and running this server locally? See [CONTRIBUTING.md](CONTRIBUTING.md) to get started.
70 | 
```

--------------------------------------------------------------------------------
/apps/workers-bindings/README.md:
--------------------------------------------------------------------------------

```markdown
 1 | # Cloudflare Workers Bindings MCP Server
 2 | 
 3 | This is a [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) server that supports remote MCP
 4 | connections, with Cloudflare OAuth built-in.
 5 | 
 6 | It integrates tools for managing resources in the Cloudflare Workers Platform, which you can connect to your Worker via [Bindings](https://developers.cloudflare.com/workers/runtime-apis/bindings/).
 7 | 
 8 | ## 🔨 Available Tools
 9 | 
10 | Currently available tools:
11 | 
12 | | **Category**      | **Tool**                   | **Description**                                                               |
13 | | ----------------- | -------------------------- | ----------------------------------------------------------------------------- |
14 | | **Account**       | `accounts_list`            | List all accounts in your Cloudflare account                                  |
15 | |                   | `set_active_account`       | Set active account to be used for tool calls that require accountId           |
16 | | **KV Namespaces** | `kv_namespaces_list`       | List all of the kv namespaces in your Cloudflare account                      |
17 | |                   | `kv_namespace_create`      | Create a new kv namespace in your Cloudflare account                          |
18 | |                   | `kv_namespace_delete`      | Delete a kv namespace in your Cloudflare account                              |
19 | |                   | `kv_namespace_get`         | Get details of a kv namespace in your Cloudflare account                      |
20 | |                   | `kv_namespace_update`      | Update the title of a kv namespace in your Cloudflare account                 |
21 | | **Workers**       | `workers_list`             | List all Workers in your Cloudflare account                                   |
22 | |                   | `workers_get_worker`       | Get the details of a Cloudflare Worker                                        |
23 | |                   | `workers_get_worker_code`  | Get the source code of a Cloudflare Worker                                    |
24 | | **R2 Buckets**    | `r2_buckets_list`          | List r2 buckets in your Cloudflare account                                    |
25 | |                   | `r2_bucket_create`         | Create a new r2 bucket in your Cloudflare account                             |
26 | |                   | `r2_bucket_get`            | Get details about a specific R2 bucket                                        |
27 | |                   | `r2_bucket_delete`         | Delete an R2 bucket                                                           |
28 | | **D1 Databases**  | `d1_databases_list`        | List all of the D1 databases in your Cloudflare account                       |
29 | |                   | `d1_database_create`       | Create a new D1 database in your Cloudflare account                           |
30 | |                   | `d1_database_delete`       | Delete a d1 database in your Cloudflare account                               |
31 | |                   | `d1_database_get`          | Get a D1 database in your Cloudflare account                                  |
32 | |                   | `d1_database_query`        | Query a D1 database in your Cloudflare account                                |
33 | | **Hyperdrive**    | `hyperdrive_configs_list`  | List Hyperdrive configurations in your Cloudflare account                     |
34 | |                   | `hyperdrive_config_create` | Create a new Hyperdrive configuration in your Cloudflare account              |
35 | |                   | `hyperdrive_config_delete` | Delete a Hyperdrive configuration in your Cloudflare account                  |
36 | |                   | `hyperdrive_config_get`    | Get details of a specific Hyperdrive configuration in your Cloudflare account |
37 | |                   | `hyperdrive_config_edit`   | Edit (patch) a Hyperdrive configuration in your Cloudflare account            |
38 | 
39 | This MCP server is still a work in progress, and we plan to add more tools in the future.
40 | 
41 | ### Prompt Examples
42 | 
43 | - `List my Cloudflare accounts.`
44 | - `Set my active account to 'YOUR_ACCOUNT_ID'.` (Replace YOUR_ACCOUNT_ID with an actual ID)
45 | - `Show me my KV namespaces.`
46 | - `Create a new KV namespace called 'my-kv-store'.`
47 | - `Get the details for KV namespace 'YOUR_NAMESPACE_ID'.` (Replace YOUR_NAMESPACE_ID)
48 | - `Delete the KV namespace 'NAMESPACE_TO_DELETE_ID'.` (Replace NAMESPACE_TO_DELETE_ID)
49 | - `List my Cloudflare Workers.`
50 | - `Get the code for the 'my-worker-script' worker.`
51 | - `Show me my R2 buckets.`
52 | - `Create an R2 bucket named 'my-new-bucket'.`
53 | - `Get details for the R2 bucket 'my-data-bucket'.`
54 | - `Delete the R2 bucket 'old-bucket'.`
55 | - `List my D1 databases.`
56 | - `Create a D1 database named 'analytics-db'.`
57 | - `Get details for D1 database 'YOUR_D1_DB_ID'.` (Replace YOUR_D1_DB_ID)
58 | - `Run the query 'SELECT * FROM customers LIMIT 10;' on D1 database 'YOUR_D1_DB_ID'.` (Replace YOUR_D1_DB_ID)
59 | - `Delete the D1 database 'TEMP_DB_ID'.` (Replace TEMP_DB_ID)
60 | - `List my Hyperdrive configurations.`
61 | - `Create a Hyperdrive config named 'prod-db-cache' for my database.` (You might need to provide more origin details)
62 | - `Get details for Hyperdrive config 'YOUR_HYPERDRIVE_ID'.` (Replace YOUR_HYPERDRIVE_ID)
63 | - `Update the cache settings for Hyperdrive config 'YOUR_HYPERDRIVE_ID'.` (Replace YOUR_HYPERDRIVE_ID)
64 | - `Delete the Hyperdrive config 'OLD_HYPERDRIVE_ID'.` (Replace OLD_HYPERDRIVE_ID)
65 | 
66 | ## Access the remote MCP server from any MCP Client
67 | 
68 | If your MCP client has first class support for remote MCP servers, the client will provide a way to accept the server URL (`https://bindings.mcp.cloudflare.com`) directly within its interface (for example in [Cloudflare AI Playground](https://playground.ai.cloudflare.com/)).
69 | 
70 | If your client does not yet support remote MCP servers, you will need to set up its respective configuration file using [mcp-remote](https://www.npmjs.com/package/mcp-remote) to specify which servers your client can access.
71 | 
72 | Replace the content with the following configuration:
73 | 
74 | ```json
75 | {
76 | 	"mcpServers": {
77 | 		"cloudflare": {
78 | 			"command": "npx",
79 | 			"args": ["mcp-remote", "https://bindings.mcp.cloudflare.com/sse"]
80 | 		}
81 | 	}
82 | }
83 | ```
84 | 
85 | 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.
86 | 
87 | Interested in contributing, and running this server locally? See [CONTRIBUTING.md](CONTRIBUTING.md) to get started.
88 | 
```

--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------

```markdown
 1 | # Cloudflare MCP Server
 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, 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 | 
 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 | 
 7 | The following servers are included in this repository:
 8 | 
 9 | | Server Name                                                    | Description                                                                                     | Server URL                                     |
10 | | -------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ---------------------------------------------- |
11 | | [**Documentation server**](/apps/docs-vectorize)               | Get up to date reference information on Cloudflare                                              | `https://docs.mcp.cloudflare.com/sse`          |
12 | | [**Workers Bindings server**](/apps/workers-bindings)          | Build Workers applications with storage, AI, and compute primitives                             | `https://bindings.mcp.cloudflare.com/sse`      |
13 | | [**Workers Builds server**](/apps/workers-builds)              | Get insights and manage your Cloudflare Workers Builds                                          | `https://builds.mcp.cloudflare.com/sse`        |
14 | | [**Observability server**](/apps/workers-observability)        | Debug and get insight into your application's logs and analytics                                | `https://observability.mcp.cloudflare.com/sse` |
15 | | [**Radar server**](/apps/radar)                                | Get global Internet traffic insights, trends, URL scans, and other utilities                    | `https://radar.mcp.cloudflare.com/sse`         |
16 | | [**Container server**](/apps/sandbox-container)                | Spin up a sandbox development environment                                                       | `https://containers.mcp.cloudflare.com/sse`    |
17 | | [**Browser rendering server**](/apps/browser-rendering)        | Fetch web pages, convert them to markdown and take screenshots                                  | `https://browser.mcp.cloudflare.com/sse`       |
18 | | [**Logpush server**](/apps/logpush)                            | Get quick summaries for Logpush job health                                                      | `https://logs.mcp.cloudflare.com/sse`          |
19 | | [**AI Gateway server**](/apps/ai-gateway)                      | Search your logs, get details about the prompts and responses                                   | `https://ai-gateway.mcp.cloudflare.com/sse`    |
20 | | [**AutoRAG server**](/apps/autorag)                            | List and search documents on your AutoRAGs                                                      | `https://autorag.mcp.cloudflare.com/sse`       |
21 | | [**Audit Logs server**](/apps/auditlogs)                       | Query audit logs and generate reports for review                                                | `https://auditlogs.mcp.cloudflare.com/sse`     |
22 | | [**DNS Analytics server**](/apps/dns-analytics)                | Optimize DNS performance and debug issues based on current set up                               | `https://dns-analytics.mcp.cloudflare.com/sse` |
23 | | [**Digital Experience Monitoring server**](/apps/dex-analysis) | Get quick insight on critical applications for your organization                                | `https://dex.mcp.cloudflare.com/sse`           |
24 | | [**Cloudflare One CASB server**](/apps/cloudflare-one-casb)    | Quickly identify any security misconfigurations for SaaS applications to safeguard users & data | `https://casb.mcp.cloudflare.com/sse`          |
25 | | [**GraphQL server**](/apps/graphql/)                           | Get analytics data using Cloudflare’s GraphQL API                                               | `https://graphql.mcp.cloudflare.com/sse`       |
26 | 
27 | ## Access the remote MCP server from any MCP client
28 | 
29 | 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/))
30 | 
31 | If your client does not yet support remote MCP servers, you will need to set up its respective configuration file using mcp-remote (https://www.npmjs.com/package/mcp-remote) to specify which servers your client can access.
32 | 
33 | ```json
34 | {
35 | 	"mcpServers": {
36 | 		"cloudflare-observability": {
37 | 			"command": "npx",
38 | 			"args": ["mcp-remote", "https://observability.mcp.cloudflare.com/sse"]
39 | 		},
40 | 		"cloudflare-bindings": {
41 | 			"command": "npx",
42 | 			"args": ["mcp-remote", "https://bindings.mcp.cloudflare.com/sse"]
43 | 		}
44 | 	}
45 | }
46 | ```
47 | 
48 | ## Using Cloudflare's MCP servers from the OpenAI Responses API
49 | 
50 | To use one of Cloudflare's MCP servers with [OpenAI's responses API](https://openai.com/index/new-tools-and-features-in-the-responses-api/), you will need to provide the Responses API with an API token that has the scopes (permissions) required for that particular MCP server.
51 | 
52 | For example, to use the [Browser Rendering MCP server](https://github.com/cloudflare/mcp-server-cloudflare/tree/main/apps/browser-rendering) with OpenAI, create an API token in the Cloudflare dashboard [here](https://dash.cloudflare.com/profile/api-tokens), with the following permissions:
53 | 
54 | <img width="937" alt="Screenshot 2025-05-21 at 10 38 02 AM" src="https://github.com/user-attachments/assets/872e253f-23ce-43b3-983c-45f9d0f66100" />
55 | 
56 | ## Need access to more Cloudflare tools?
57 | 
58 | 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
59 | 
60 | ## Troubleshooting
61 | 
62 | "Claude's response was interrupted ... "
63 | 
64 | If you see this message, Claude likely hit its context-length limit and stopped mid-reply. This happens most often on servers that trigger many chained tool calls such as the observability server.
65 | 
66 | To reduce the chance of running in to this issue:
67 | 
68 | - Try to be specific, keep your queries concise.
69 | - If a single request calls multiple tools, try to to break it into several smaller tool calls to keep the responses short.
70 | 
71 | ## Paid Features
72 | 
73 | 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.
74 | 
75 | ## Contributing
76 | 
77 | Interested in contributing, and running this server locally? See [CONTRIBUTING.md](CONTRIBUTING.md) to get started.
78 | 
```

--------------------------------------------------------------------------------
/apps/dex-analysis/README.md:
--------------------------------------------------------------------------------

```markdown
 1 | # Cloudflare DEX MCP Server 📡
 2 | 
 3 | This is a [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) server that supports remote MCP
 4 | connections, with Cloudflare OAuth built-in.
 5 | 
 6 | It integrates tools powered by the [Cloudflare DEX API](https://developers.cloudflare.com/api/resources/zero_trust/subresources/dex/) to provide visibility into device, network, and application performance across your Zero Trust organization
 7 | 
 8 | ## 🔨 Available Tools
 9 | 
10 | Currently available tools:
11 | 
12 | | **Category**                         | **Tool**                                   | **Description**                                                                                                                                        |
13 | | ------------------------------------ | ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
14 | | **Synthetic Application Monitoring** | `dex_test_statistics`                      | Analyze Cloudflare DEX Test Results by quartile given a Test ID                                                                                        |
15 | |                                      | `dex_list_tests`                           | List configured Cloudflare DEX tests along with overview performance metrics.                                                                          |
16 | |                                      | `dex_http_test_details`                    | Retrieve detailed time series results for an HTTP DEX test by id.                                                                                      |
17 | |                                      | `dex_traceroute_test_details`              | Retrieve detailed time series results for a Traceroute DEX test by id.                                                                                 |
18 | |                                      | `dex_traceroute_test_network_path`         | Retrieve detailed time series results for the network path of a traceroute test by test id and device id.                                              |
19 | |                                      | `dex_traceroute_test_result_network_path`  | Retrieve the hop-by-hop network path for a specific Traceroute DEX test result by id. Use `dex_traceroute_test_network_path` to obain test result ids. |
20 | | **Remote Captures**                  | `dex_list_remote_capture_eligible_devices` | Retrieve a list of devices eligible for remote captures like packet captures or WARP diagnostics.                                                      |
21 | |                                      | `dex_create_remote_pcap`                   | Initiate a remote packet capture on a specific device by id.                                                                                           |
22 | |                                      | `dex_create_remote_warp_diag`              | Initiate a remote Warp diagnostic capture on a specific device by id.                                                                                  |
23 | |                                      | `dex_list_remote_captures`                 | Retrieve a list of previously created remote captures along with their details and status.                                                             |
24 | |                                      | `dex_list_remote_warp_diag_contents`       | List the filenames included in a remote WARP diag capture returned by `dex_list_remote_captures`.                                                      |
25 | |                                      | `dex_explore_remote_warp_diag_output`      | Retreive remote WARP diag file contents by filepath returned by `dex_list_remote_warp_diag_contents`.                                                  |
26 | |                                      | `dex_analyze_warp_diag`                    | Analyze successful WARP-diag remote captures for common issues.                                                                                        |
27 | | **Fleet Status**                     | `dex_fleet_status_live`                    | View live metrics for your fleet of zero trust devices for up to the past 1 hour.                                                                      |
28 | |                                      | `dex_fleet_status_over_time`               | View historical metrics for your fleet of zero trust devices over time.                                                                                |
29 | |                                      | `dex_fleet_status_logs`                    | View historical logs for your fleet of zero trust devices for up to the past 7 days.                                                                   |
30 | |                                      | `dex_list_warp_change_events`              | View logs of users toggling WARP connection or changing configuration.                                                                                 |
31 | | **Misc**                             | `dex_list_colos`                           | List Cloudflare colos, optionally sorted by their frequency of appearance in DEX test or fleet status results.                                         |
32 | 
33 | This MCP server is still a work in progress, and we plan to add more tools in the future.
34 | 
35 | ### Prompt Examples
36 | 
37 | - `Are there any anomolies in the DEX test to the internal wiki in the past 24 hours?`
38 | - `Can you see any bottlenecks in [email protected]'s network path for Zoom today between 1 and 2 PM?`
39 | - `How many macOS devices are connected right now in DFW?`
40 | - `Do you notice any unusual performance metrics for [email protected]'s device in the past few hours?`
41 | - `Capture a WARP diag for [email protected] and make sure to test all routes`
42 | - `Which users have toggled off WARP recently?`
43 | - `Which Cloudflare colo is most used by my users in the EU running DEX application tests?`
44 | - `Look at the latest WARP diag for [email protected] and tell me if you see anything notable in dns logs`
45 | 
46 | ## Access the remote MCP server from any MCP Client
47 | 
48 | If your MCP client has first class support for remote MCP servers, the client will provide a way to accept the server URL (`https://dex.mcp.cloudflare.com`) directly within its interface (for example in [Cloudflare AI Playground](https://playground.ai.cloudflare.com/)).
49 | 
50 | If your client does not yet support remote MCP servers, you will need to set up its respective configuration file using [mcp-remote](https://www.npmjs.com/package/mcp-remote) to specify which servers your client can access.
51 | 
52 | Replace the content with the following configuration:
53 | 
54 | ```json
55 | {
56 | 	"mcpServers": {
57 | 		"cloudflare": {
58 | 			"command": "npx",
59 | 			"args": ["mcp-remote", "https://dex.mcp.cloudflare.com/sse"]
60 | 		}
61 | 	}
62 | }
63 | ```
64 | 
65 | 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.
66 | 
67 | Interested in contributing, and running this server locally? See [CONTRIBUTING.md](CONTRIBUTING.md) to get started.
68 | 
```

--------------------------------------------------------------------------------
/apps/sandbox-container/CONTRIBUTING.md:
--------------------------------------------------------------------------------

```markdown
 1 | # Container MCP Server
 2 | 
 3 | This is a simple MCP-based interface for a sandboxed development environment.
 4 | 
 5 | ## Local dev
 6 | 
 7 | Cloudchamber local dev isn't implemented yet, so we are doing a bit of a hack to just run the server in your local environment. Because of this, testing the container(s) and container manager locally is not possible at this time.
 8 | 
 9 | Do the following from within the sandbox-container app:
10 | 
11 | 1. Copy the `.dev.vars.example` file to a new `.dev.vars` file.
12 | 2. Get the Cloudflare client id and secret from a team member and add them to the `.dev.vars` file.
13 | 3. Run `pnpm i` then `pnpm dev` to start the MCP server.
14 | 4. Run `pnpx @modelcontextprotocol/inspector` to start the MCP inspector client.
15 | 5. Open the inspector client in your browser and connect to the server via `http://localhost:8976/sse`.
16 | 
17 | Note: Temporary files created through files tool calls are stored in the workdir folder of this app.
18 | 
19 | ## Deploying
20 | 
21 | 1. Make sure the docker daemon is running
22 | 
23 | 2. Disable WARP and run
24 | 
25 | ```
26 | npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14387504770/npm-package-wrangler-8740 deploy
27 | ```
28 | 
29 | 3. Add to your Claude config. If using with Claude, you'll need to disable WARP:
30 | 
31 | ```
32 | {
33 |     "mcpServers": {
34 |         "container": {
35 |             "command": "npx",
36 |             "args": [
37 |                 "mcp-remote",
38 |                 // this is my deployed instance
39 |                 "https://container-starter-2.cmsparks.workers.dev/sse"
40 |             ]
41 |         }
42 |     }
43 | }
44 | ```
45 | 
```

--------------------------------------------------------------------------------
/apps/ai-gateway/CONTRIBUTING.md:
--------------------------------------------------------------------------------

```markdown
 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 |    ```
15 | 
16 |    If you're an external contributor, you can provide a development API token:
17 | 
18 |    ```
19 |    DEV_DISABLE_OAUTH=true
20 |    # This is your global api token
21 |    DEV_CLOUDFLARE_API_TOKEN=your_development_api_token
22 |    ```
23 | 
24 | 2. Start the local development server:
25 | 
26 |    ```bash
27 |    npx wrangler dev
28 |    ```
29 | 
30 | 3. To test locally, open Inspector, and connect to `http://localhost:8976/sse`.
31 |    Once you follow the prompts, you'll be able to "List Tools". You can also connect with any MCP client.
32 | 
33 | ## Deploying the Worker ( Cloudflare employees only )
34 | 
35 | Set secrets via Wrangler:
36 | 
37 | ```bash
38 | npx wrangler secret put CLOUDFLARE_CLIENT_ID -e <ENVIRONMENT>
39 | npx wrangler secret put CLOUDFLARE_CLIENT_SECRET -e <ENVIRONMENT>
40 | ```
41 | 
42 | ## Set up a KV namespace
43 | 
44 | Create the KV namespace:
45 | 
46 | ```bash
47 | npx wrangler kv namespace create "OAUTH_KV"
48 | ```
49 | 
50 | Then, update the Wrangler file with the generated KV namespace ID.
51 | 
52 | ## Deploy & Test
53 | 
54 | Deploy the MCP server to make it available on your workers.dev domain:
55 | 
56 | ```bash
57 | npx wrangler deploy -e <ENVIRONMENT>
58 | ```
59 | 
60 | Test the remote server using [Inspector](https://modelcontextprotocol.io/docs/tools/inspector):
61 | 
62 | ```bash
63 | npx @modelcontextprotocol/inspector@latest
64 | ```
65 | 
```

--------------------------------------------------------------------------------
/apps/browser-rendering/CONTRIBUTING.md:
--------------------------------------------------------------------------------

```markdown
 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 |    ```
15 | 
16 |    If you're an external contributor, you can provide a development API token:
17 | 
18 |    ```
19 |    DEV_DISABLE_OAUTH=true
20 |    # This is your global api token
21 |    DEV_CLOUDFLARE_API_TOKEN=your_development_api_token
22 |    ```
23 | 
24 | 2. Start the local development server:
25 | 
26 |    ```bash
27 |    npx wrangler dev
28 |    ```
29 | 
30 | 3. To test locally, open Inspector, and connect to `http://localhost:8976/sse`.
31 |    Once you follow the prompts, you'll be able to "List Tools". You can also connect with any MCP client.
32 | 
33 | ## Deploying the Worker ( Cloudflare employees only )
34 | 
35 | Set secrets via Wrangler:
36 | 
37 | ```bash
38 | npx wrangler secret put CLOUDFLARE_CLIENT_ID -e <ENVIRONMENT>
39 | npx wrangler secret put CLOUDFLARE_CLIENT_SECRET -e <ENVIRONMENT>
40 | ```
41 | 
42 | ## Set up a KV namespace
43 | 
44 | Create the KV namespace:
45 | 
46 | ```bash
47 | npx wrangler kv namespace create "OAUTH_KV"
48 | ```
49 | 
50 | Then, update the Wrangler file with the generated KV namespace ID.
51 | 
52 | ## Deploy & Test
53 | 
54 | Deploy the MCP server to make it available on your workers.dev domain:
55 | 
56 | ```bash
57 | npx wrangler deploy -e <ENVIRONMENT>
58 | ```
59 | 
60 | Test the remote server using [Inspector](https://modelcontextprotocol.io/docs/tools/inspector):
61 | 
62 | ```bash
63 | npx @modelcontextprotocol/inspector@latest
64 | ```
65 | 
```

--------------------------------------------------------------------------------
/apps/workers-builds/CONTRIBUTING.md:
--------------------------------------------------------------------------------

```markdown
 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 |    ```
15 | 
16 |    If you're an external contributor, you can provide a development API token:
17 | 
18 |    ```
19 |    DEV_DISABLE_OAUTH=true
20 |    DEV_CLOUDFLARE_EMAIL=your_cloudflare_email
21 |    # This is your global api token
22 |    DEV_CLOUDFLARE_API_TOKEN=your_development_api_token
23 |    ```
24 | 
25 | 2. Start the local development server:
26 | 
27 | ```bash
28 | pnpm dev
29 | ```
30 | 
31 | 3. To test locally, open Inspector, and connect to `http://localhost:8976/sse`.
32 |    Once you follow the prompts, you'll be able to "List Tools". You can also connect with any MCP client.
33 | 
34 | ## Deploying the Worker ( Cloudflare employees only )
35 | 
36 | Set secrets via Wrangler:
37 | 
38 | ```bash
39 | npx wrangler secret put CLOUDFLARE_CLIENT_ID -e <ENVIRONMENT>
40 | npx wrangler secret put CLOUDFLARE_CLIENT_SECRET -e <ENVIRONMENT>
41 | ```
42 | 
43 | ## Set up a KV namespace
44 | 
45 | Create the KV namespace:
46 | 
47 | ```bash
48 | npx wrangler kv namespace create "OAUTH_KV"
49 | ```
50 | 
51 | Then, update the Wrangler file with the generated KV namespace ID.
52 | 
53 | ## Deploy & Test
54 | 
55 | Deploy the MCP server to make it available on your workers.dev domain:
56 | 
57 | ```bash
58 | npx wrangler deploy -e <ENVIRONMENT>
59 | ```
60 | 
61 | Test the remote server using [Inspector](https://modelcontextprotocol.io/docs/tools/inspector):
62 | 
63 | ```bash
64 | npx @modelcontextprotocol/inspector@latest
65 | ```
66 | 
```

--------------------------------------------------------------------------------
/apps/radar/CONTRIBUTING.md:
--------------------------------------------------------------------------------

```markdown
 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 |    ```
15 | 
16 |    If you're an external contributor, you can provide a development API token:
17 | 
18 |    ```
19 |    DEV_DISABLE_OAUTH=true
20 |    DEV_CLOUDFLARE_EMAIL=your_cloudflare_email
21 |    # This is your global api token
22 |    DEV_CLOUDFLARE_API_TOKEN=your_development_api_token
23 |    ```
24 | 
25 | 2. Start the local development server:
26 | 
27 |    ```bash
28 |    npx wrangler dev
29 |    ```
30 | 
31 | 3. To test locally, open Inspector, and connect to `http://localhost:8976/sse`.
32 |    Once you follow the prompts, you'll be able to "List Tools". You can also connect with any MCP client.
33 | 
34 | ## Deploying the Worker ( Cloudflare employees only )
35 | 
36 | Set secrets via Wrangler:
37 | 
38 | ```bash
39 | npx wrangler secret put CLOUDFLARE_CLIENT_ID -e <ENVIRONMENT>
40 | npx wrangler secret put CLOUDFLARE_CLIENT_SECRET -e <ENVIRONMENT>
41 | ```
42 | 
43 | ## Set up a KV namespace
44 | 
45 | Create the KV namespace:
46 | 
47 | ```bash
48 | npx wrangler kv namespace create "OAUTH_KV"
49 | ```
50 | 
51 | Then, update the Wrangler file with the generated KV namespace ID.
52 | 
53 | ## Deploy & Test
54 | 
55 | Deploy the MCP server to make it available on your workers.dev domain:
56 | 
57 | ```bash
58 | npx wrangler deploy -e <ENVIRONMENT>
59 | ```
60 | 
61 | Test the remote server using [Inspector](https://modelcontextprotocol.io/docs/tools/inspector):
62 | 
63 | ```bash
64 | npx @modelcontextprotocol/inspector@latest
65 | ```
66 | 
```

--------------------------------------------------------------------------------
/apps/workers-bindings/CONTRIBUTING.md:
--------------------------------------------------------------------------------

```markdown
 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 |    ```
15 | 
16 |    If you're an external contributor, you can provide a development API token:
17 | 
18 |    ```
19 |    DEV_DISABLE_OAUTH=true
20 |    DEV_CLOUDFLARE_EMAIL=your_cloudflare_email
21 |    # This is your global api token
22 |    DEV_CLOUDFLARE_API_TOKEN=your_development_api_token
23 |    ```
24 | 
25 | 2. Start the local development server:
26 | 
27 |    ```bash
28 |    npx wrangler dev
29 |    ```
30 | 
31 | 3. To test locally, open Inspector, and connect to `http://localhost:8976/sse`.
32 |    Once you follow the prompts, you'll be able to "List Tools". You can also connect with any MCP client.
33 | 
34 | ## Deploying the Worker ( Cloudflare employees only )
35 | 
36 | Set secrets via Wrangler:
37 | 
38 | ```bash
39 | npx wrangler secret put CLOUDFLARE_CLIENT_ID -e <ENVIRONMENT>
40 | npx wrangler secret put CLOUDFLARE_CLIENT_SECRET -e <ENVIRONMENT>
41 | ```
42 | 
43 | ## Set up a KV namespace
44 | 
45 | Create the KV namespace:
46 | 
47 | ```bash
48 | npx wrangler kv namespace create "OAUTH_KV"
49 | ```
50 | 
51 | Then, update the Wrangler file with the generated KV namespace ID.
52 | 
53 | ## Deploy & Test
54 | 
55 | Deploy the MCP server to make it available on your workers.dev domain:
56 | 
57 | ```bash
58 | npx wrangler deploy -e <ENVIRONMENT>
59 | ```
60 | 
61 | Test the remote server using [Inspector](https://modelcontextprotocol.io/docs/tools/inspector):
62 | 
63 | ```bash
64 | npx @modelcontextprotocol/inspector@latest
65 | ```
66 | 
```

--------------------------------------------------------------------------------
/apps/workers-observability/CONTRIBUTING.md:
--------------------------------------------------------------------------------

```markdown
 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 |    ```
15 | 
16 |    If you're an external contributor, you can provide a development API token:
17 | 
18 |    ```
19 |    DEV_DISABLE_OAUTH=true
20 |    DEV_CLOUDFLARE_EMAIL=your_cloudflare_email
21 |    # This is your global api token
22 |    DEV_CLOUDFLARE_API_TOKEN=your_development_api_token
23 |    ```
24 | 
25 | 2. Start the local development server:
26 | 
27 |    ```bash
28 |    npx wrangler dev
29 |    ```
30 | 
31 | 3. To test locally, open Inspector, and connect to `http://localhost:8976/sse`.
32 |    Once you follow the prompts, you'll be able to "List Tools". You can also connect with any MCP client.
33 | 
34 | ## Deploying the Worker ( Cloudflare employees only )
35 | 
36 | Set secrets via Wrangler:
37 | 
38 | ```bash
39 | npx wrangler secret put CLOUDFLARE_CLIENT_ID -e <ENVIRONMENT>
40 | npx wrangler secret put CLOUDFLARE_CLIENT_SECRET -e <ENVIRONMENT>
41 | ```
42 | 
43 | ## Set up a KV namespace
44 | 
45 | Create the KV namespace:
46 | 
47 | ```bash
48 | npx wrangler kv namespace create "OAUTH_KV"
49 | ```
50 | 
51 | Then, update the Wrangler file with the generated KV namespace ID.
52 | 
53 | ## Deploy & Test
54 | 
55 | Deploy the MCP server to make it available on your workers.dev domain:
56 | 
57 | ```bash
58 | npx wrangler deploy -e <ENVIRONMENT>
59 | ```
60 | 
61 | Test the remote server using [Inspector](https://modelcontextprotocol.io/docs/tools/inspector):
62 | 
63 | ```bash
64 | npx @modelcontextprotocol/inspector@latest
65 | ```
66 | 
```

--------------------------------------------------------------------------------
/apps/autorag/CONTRIBUTING.md:
--------------------------------------------------------------------------------

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

--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------

```markdown
 1 | # Developing
 2 | 
 3 | We welcome contributions to all of our MCP servers! Here's a quick run down on how to get started.
 4 | 
 5 | ## Architecture
 6 | 
 7 | This monorepo has two top-level directories: `/apps` and `/packages`.
 8 | 
 9 | - **/apps**: Containing directories for each server. Within each server, you'll find a `CONTRIBUTING.md` with any special instructions on how to get set up:
10 |   - [apps/workers-observability](apps/workers-observability)
11 |   - [apps/workers-bindings](apps/workers-bindings)
12 |   - [apps/radar](apps/radar)
13 |   - [apps/cloudflare-one-casb](apps/cloudflare-one-casb)
14 | - **/packages**: Containing shared packages used across our various apps.
15 |   - packages/eslint-config: Eslint config used by all apps and packages.
16 |   - packages/typescript-config: tsconfig used by all apps and packages.
17 |   - packages/mcp-common: Shared common tools and scripts to help manage this repo.
18 | 
19 | 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.
20 | 
21 | ## Getting Started
22 | 
23 | This section will guide you through setting up your developer environment and running tests.
24 | 
25 | ### Installation
26 | 
27 | Install dependencies:
28 | 
29 | ```bash
30 | pnpm install
31 | ```
32 | 
33 | ### Testing
34 | 
35 | The project uses Vitest as the testing framework with [fetchMock](https://developers.cloudflare.com/workers/testing/vitest-integration/test-apis/) for API mocking.
36 | 
37 | #### Running Tests
38 | 
39 | To run all tests:
40 | 
41 | ```bash
42 | pnpm test
43 | ```
44 | 
45 | To run a specific test file:
46 | 
47 | ```bash
48 | pnpm test -- tests/tools/queues.test.ts
49 | ```
50 | 
51 | To run tests in watch mode (useful during development):
52 | 
53 | ```bash
54 | pnpm test:watch
55 | ```
56 | 
```

--------------------------------------------------------------------------------
/apps/dns-analytics/CONTRIBUTING.md:
--------------------------------------------------------------------------------

```markdown
 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 |    DEV_CLOUDFLARE_API_TOKEN=your_development_api_token
15 |    ```
16 | 
17 |    If you're an external contributor, you can provide a development API token (See [Cloudflare API](https://developers.cloudflare.com/api/) for information on creating an API Token):
18 | 
19 |    ```
20 |    DEV_DISABLE_OAUTH=true
21 |    DEV_CLOUDFLARE_EMAIL=your_cloudflare_email
22 |    # This is your api token with endpoint access.
23 |    DEV_CLOUDFLARE_API_TOKEN=your_development_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 | ```
43 | 
44 | ## Set up a KV namespace
45 | 
46 | Create the KV namespace:
47 | 
48 | ```bash
49 | npx wrangler kv namespace create "OAUTH_KV"
50 | ```
51 | 
52 | Then, update the Wrangler file with the generated KV namespace ID.
53 | 
54 | ## Deploy & Test
55 | 
56 | Deploy the MCP server to make it available on your workers.dev domain:
57 | 
58 | ```bash
59 | npx wrangler deploy -e <ENVIRONMENT>
60 | ```
61 | 
62 | Test the remote server using [Inspector](https://modelcontextprotocol.io/docs/tools/inspector):
63 | 
64 | ```bash
65 | npx @modelcontextprotocol/inspector@latest
66 | ```
67 | 
```

--------------------------------------------------------------------------------
/packages/tools/src/test/fixtures/changesets/invalid-json/published-packages.json:
--------------------------------------------------------------------------------

```json
1 | this is not valid json
2 | 
```

--------------------------------------------------------------------------------
/pnpm-workspace.yaml:
--------------------------------------------------------------------------------

```yaml
1 | packages:
2 |   - 'apps/*'
3 |   - 'packages/*'
4 | 
```

--------------------------------------------------------------------------------
/packages/tools/src/test/fixtures/changesets/invalid-schema/published-packages.json:
--------------------------------------------------------------------------------

```json
1 | [
2 | 	{
3 | 		"name": "package-a",
4 | 		"version": 123
5 | 	}
6 | ]
7 | 
```

--------------------------------------------------------------------------------
/tsconfig.json:
--------------------------------------------------------------------------------

```json
1 | {
2 | 	"extends": "@repo/typescript-config/tools.json"
3 | }
4 | 
```

--------------------------------------------------------------------------------
/packages/mcp-observability/src/index.ts:
--------------------------------------------------------------------------------

```typescript
1 | export * from './analytics-engine'
2 | export * from './metrics'
3 | 
```

--------------------------------------------------------------------------------
/apps/sandbox-container/shared/consts.ts:
--------------------------------------------------------------------------------

```typescript
1 | // Set this to the open port on your container
2 | export const OPEN_CONTAINER_PORT = 8080
3 | 
```

--------------------------------------------------------------------------------
/apps/docs-autorag/tsconfig.json:
--------------------------------------------------------------------------------

```json
1 | {
2 | 	"extends": "@repo/typescript-config/workers.json",
3 | 	"include": ["*/**.ts", "./vitest.config.ts"]
4 | }
5 | 
```

--------------------------------------------------------------------------------
/apps/docs-vectorize/tsconfig.json:
--------------------------------------------------------------------------------

```json
1 | {
2 | 	"extends": "@repo/typescript-config/workers.json",
3 | 	"include": ["*/**.ts", "./vitest.config.ts"]
4 | }
5 | 
```

--------------------------------------------------------------------------------
/packages/tools/src/test/fixtures/changesets/valid/published-packages.json:
--------------------------------------------------------------------------------

```json
 1 | [
 2 | 	{
 3 | 		"name": "package-a",
 4 | 		"version": "1.0.0"
 5 | 	},
 6 | 	{
 7 | 		"name": "package-b",
 8 | 		"version": "2.1.3"
 9 | 	}
10 | ]
11 | 
```

--------------------------------------------------------------------------------
/packages/eslint-config/CHANGELOG.md:
--------------------------------------------------------------------------------

```markdown
1 | # @repo/eslint-config
2 | 
3 | ## 0.1.36
4 | 
5 | ### Patch Changes
6 | 
7 | - cc6d41f: Update agents deps & modelcontextprotocol
8 | 
```

--------------------------------------------------------------------------------
/apps/workers-bindings/tsconfig.json:
--------------------------------------------------------------------------------

```json
1 | {
2 | 	"extends": "@repo/typescript-config/workers.json",
3 | 	"include": ["*/**.ts", "./vitest.config.evals.ts"]
4 | }
5 | 
```

--------------------------------------------------------------------------------
/apps/ai-gateway/tsconfig.json:
--------------------------------------------------------------------------------

```json
1 | {
2 | 	"extends": "@repo/typescript-config/workers.json",
3 | 	"include": ["*/**.ts", "./vitest.config.ts", "./types.d.ts"]
4 | }
5 | 
```

--------------------------------------------------------------------------------
/apps/autorag/tsconfig.json:
--------------------------------------------------------------------------------

```json
1 | {
2 | 	"extends": "@repo/typescript-config/workers.json",
3 | 	"include": ["*/**.ts", "./vitest.config.ts", "./types.d.ts"]
4 | }
5 | 
```

--------------------------------------------------------------------------------
/apps/browser-rendering/tsconfig.json:
--------------------------------------------------------------------------------

```json
1 | {
2 | 	"extends": "@repo/typescript-config/workers.json",
3 | 	"include": ["*/**.ts", "./vitest.config.ts", "./types.d.ts"]
4 | }
5 | 
```

--------------------------------------------------------------------------------
/apps/cloudflare-one-casb/tsconfig.json:
--------------------------------------------------------------------------------

```json
1 | {
2 | 	"extends": "@repo/typescript-config/workers.json",
3 | 	"include": ["*/**.ts", "./types.d.ts", "./vitest.config.ts"]
4 | }
5 | 
```

--------------------------------------------------------------------------------
/apps/dex-analysis/tsconfig.json:
--------------------------------------------------------------------------------

```json
1 | {
2 | 	"extends": "@repo/typescript-config/workers.json",
3 | 	"include": ["*/**.ts", "./vitest.config.ts", "./types.d.ts"]
4 | }
5 | 
```

--------------------------------------------------------------------------------
/apps/graphql/tsconfig.json:
--------------------------------------------------------------------------------

```json
1 | {
2 | 	"extends": "@repo/typescript-config/workers.json",
3 | 	"include": ["*/**.ts", "./vitest.config.ts", "./types.d.ts"]
4 | }
5 | 
```

--------------------------------------------------------------------------------
/apps/logpush/tsconfig.json:
--------------------------------------------------------------------------------

```json
1 | {
2 | 	"extends": "@repo/typescript-config/workers.json",
3 | 	"include": ["*/**.ts", "./vitest.config.ts", "./types.d.ts"]
4 | }
5 | 
```

--------------------------------------------------------------------------------
/apps/radar/tsconfig.json:
--------------------------------------------------------------------------------

```json
1 | {
2 | 	"extends": "@repo/typescript-config/workers.json",
3 | 	"include": ["*/**.ts", "./vitest.config.ts", "./types.d.ts"]
4 | }
5 | 
```

--------------------------------------------------------------------------------
/apps/workers-builds/tsconfig.json:
--------------------------------------------------------------------------------

```json
1 | {
2 | 	"extends": "@repo/typescript-config/workers.json",
3 | 	"include": ["*/**.ts", "./vitest.config.ts", "./types.d.ts"]
4 | }
5 | 
```

--------------------------------------------------------------------------------
/apps/workers-observability/tsconfig.json:
--------------------------------------------------------------------------------

```json
1 | {
2 | 	"extends": "@repo/typescript-config/workers.json",
3 | 	"include": ["*/**.ts", "./vitest.config.ts", "./types.d.ts"]
4 | }
5 | 
```

--------------------------------------------------------------------------------
/packages/tools/tsconfig.json:
--------------------------------------------------------------------------------

```json
1 | {
2 | 	"extends": "@repo/typescript-config/tools.json",
3 | 	"include": ["**/*.ts"],
4 | 	"exclude": ["node_modules", "tsconfig.json"]
5 | }
6 | 
```

--------------------------------------------------------------------------------
/apps/ai-gateway/types.d.ts:
--------------------------------------------------------------------------------

```typescript
1 | import type { TestEnv } from './vitest.config'
2 | 
3 | declare module 'cloudflare:test' {
4 | 	interface ProvidedEnv extends TestEnv {}
5 | }
6 | 
```

--------------------------------------------------------------------------------
/apps/auditlogs/types.d.ts:
--------------------------------------------------------------------------------

```typescript
1 | import type { TestEnv } from './vitest.config'
2 | 
3 | declare module 'cloudflare:test' {
4 | 	interface ProvidedEnv extends TestEnv {}
5 | }
6 | 
```

--------------------------------------------------------------------------------
/apps/autorag/types.d.ts:
--------------------------------------------------------------------------------

```typescript
1 | import type { TestEnv } from './vitest.config'
2 | 
3 | declare module 'cloudflare:test' {
4 | 	interface ProvidedEnv extends TestEnv {}
5 | }
6 | 
```

--------------------------------------------------------------------------------
/apps/browser-rendering/types.d.ts:
--------------------------------------------------------------------------------

```typescript
1 | import type { TestEnv } from './vitest.config'
2 | 
3 | declare module 'cloudflare:test' {
4 | 	interface ProvidedEnv extends TestEnv {}
5 | }
6 | 
```

--------------------------------------------------------------------------------
/apps/cloudflare-one-casb/types.d.ts:
--------------------------------------------------------------------------------

```typescript
1 | import type { TestEnv } from './vitest.config'
2 | 
3 | declare module 'cloudflare:test' {
4 | 	interface ProvidedEnv extends TestEnv {}
5 | }
6 | 
```

--------------------------------------------------------------------------------
/apps/dex-analysis/types.d.ts:
--------------------------------------------------------------------------------

```typescript
1 | import type { TestEnv } from './vitest.config'
2 | 
3 | declare module 'cloudflare:test' {
4 | 	interface ProvidedEnv extends TestEnv {}
5 | }
6 | 
```

--------------------------------------------------------------------------------
/apps/dns-analytics/types.d.ts:
--------------------------------------------------------------------------------

```typescript
1 | import type { TestEnv } from './vitest.config'
2 | 
3 | declare module 'cloudflare:test' {
4 | 	interface ProvidedEnv extends TestEnv {}
5 | }
6 | 
```

--------------------------------------------------------------------------------
/apps/graphql/types.d.ts:
--------------------------------------------------------------------------------

```typescript
1 | import type { TestEnv } from './vitest.config'
2 | 
3 | declare module 'cloudflare:test' {
4 | 	interface ProvidedEnv extends TestEnv {}
5 | }
6 | 
```

--------------------------------------------------------------------------------
/apps/logpush/types.d.ts:
--------------------------------------------------------------------------------

```typescript
1 | import type { TestEnv } from './vitest.config'
2 | 
3 | declare module 'cloudflare:test' {
4 | 	interface ProvidedEnv extends TestEnv {}
5 | }
6 | 
```

--------------------------------------------------------------------------------
/apps/radar/types.d.ts:
--------------------------------------------------------------------------------

```typescript
1 | import type { TestEnv } from './vitest.config'
2 | 
3 | declare module 'cloudflare:test' {
4 | 	interface ProvidedEnv extends TestEnv {}
5 | }
6 | 
```

--------------------------------------------------------------------------------
/apps/workers-builds/types.d.ts:
--------------------------------------------------------------------------------

```typescript
1 | import type { TestEnv } from './vitest.config'
2 | 
3 | declare module 'cloudflare:test' {
4 | 	interface ProvidedEnv extends TestEnv {}
5 | }
6 | 
```

--------------------------------------------------------------------------------
/apps/workers-observability/types.d.ts:
--------------------------------------------------------------------------------

```typescript
1 | import type { TestEnv } from './vitest.config'
2 | 
3 | declare module 'cloudflare:test' {
4 | 	interface ProvidedEnv extends TestEnv {}
5 | }
6 | 
```

--------------------------------------------------------------------------------
/packages/mcp-common/types.d.ts:
--------------------------------------------------------------------------------

```typescript
1 | import type { TestEnv } from './vitest.config'
2 | 
3 | declare module 'cloudflare:test' {
4 | 	interface ProvidedEnv extends TestEnv {}
5 | }
6 | 
```

--------------------------------------------------------------------------------
/packages/mcp-observability/tsconfig.json:
--------------------------------------------------------------------------------

```json
1 | {
2 | 	"extends": "@repo/typescript-config/workers.json",
3 | 	"include": ["**/*.ts"],
4 | 	"exclude": ["node_modules", "tsconfig.json"]
5 | }
6 | 
```

--------------------------------------------------------------------------------
/apps/workers-bindings/evals/types.d.ts:
--------------------------------------------------------------------------------

```typescript
1 | import type { TestEnv } from '../vitest.config'
2 | 
3 | declare module 'cloudflare:test' {
4 | 	interface ProvidedEnv extends TestEnv {}
5 | }
6 | 
```

--------------------------------------------------------------------------------
/packages/mcp-common/src/env.ts:
--------------------------------------------------------------------------------

```typescript
1 | import { env } from 'cloudflare:workers'
2 | 
3 | // Helper to cast env as any generic Env type
4 | export function getEnv<Env>() {
5 | 	return env as Env
6 | }
7 | 
```

--------------------------------------------------------------------------------
/apps/demo-day/tsconfig.json:
--------------------------------------------------------------------------------

```json
1 | {
2 | 	"extends": "@repo/typescript-config/workers.json",
3 | 	"include": ["src/demo-day.app.ts"],
4 | 	"compilerOptions": {
5 | 		"types": ["@types/node"]
6 | 	}
7 | }
8 | 
```

--------------------------------------------------------------------------------
/apps/auditlogs/tsconfig.json:
--------------------------------------------------------------------------------

```json
1 | {
2 | 	"extends": "@repo/typescript-config/workers.json",
3 | 	"include": ["*/**.ts", "worker-configuration.d.ts", "./vitest.config.ts", "./types.d.ts"]
4 | }
5 | 
```

--------------------------------------------------------------------------------
/apps/dns-analytics/tsconfig.json:
--------------------------------------------------------------------------------

```json
1 | {
2 | 	"extends": "@repo/typescript-config/workers.json",
3 | 	"include": ["*/**.ts", "./worker-configuration.d.ts", "./types.d.ts", "./vitest.config.ts"]
4 | }
5 | 
```

--------------------------------------------------------------------------------
/packages/typescript-config/package.json:
--------------------------------------------------------------------------------

```json
 1 | {
 2 | 	"name": "@repo/typescript-config",
 3 | 	"version": "0.3.1",
 4 | 	"private": true,
 5 | 	"sideEffects": false,
 6 | 	"devDependencies": {
 7 | 		"@types/node": "22.14.1"
 8 | 	}
 9 | }
10 | 
```

--------------------------------------------------------------------------------
/apps/sandbox-container/tsconfig.json:
--------------------------------------------------------------------------------

```json
1 | {
2 | 	"extends": "@repo/typescript-config/workers.json",
3 | 	"include": ["*/**.ts", "./vitest.config.evals.ts", "./types.d.ts"],
4 | 	"exclude": ["container/**.ts"]
5 | }
6 | 
```

--------------------------------------------------------------------------------
/packages/eval-tools/tsconfig.json:
--------------------------------------------------------------------------------

```json
1 | {
2 | 	"extends": "@repo/typescript-config/workers.json",
3 | 	"include": ["**/*.ts", "./worker-configuration.d.ts"],
4 | 	"exclude": ["node_modules", "tsconfig.json"]
5 | }
6 | 
```

--------------------------------------------------------------------------------
/packages/tools/vitest.config.ts:
--------------------------------------------------------------------------------

```typescript
1 | import { defineConfig } from 'vitest/config'
2 | 
3 | export default defineConfig({
4 | 	test: {
5 | 		setupFiles: [`${__dirname}/src/test/setup.ts`],
6 | 		environment: 'node',
7 | 	},
8 | })
9 | 
```

--------------------------------------------------------------------------------
/packages/tools/src/proc.ts:
--------------------------------------------------------------------------------

```typescript
1 | export function getOutcome(exitCode: number | null) {
2 | 	if (exitCode === 0) {
3 | 		return chalk.green('Success!')
4 | 	} else {
5 | 		return chalk.red(`Failed with code: ${exitCode}`)
6 | 	}
7 | }
8 | 
```

--------------------------------------------------------------------------------
/apps/autorag/src/types.ts:
--------------------------------------------------------------------------------

```typescript
1 | import { z } from 'zod'
2 | 
3 | export const pageParam = z.number().int().min(1).optional().default(1)
4 | export const perPageParam = z.number().int().min(1).max(50).optional().default(20)
5 | 
```

--------------------------------------------------------------------------------
/apps/sandbox-container/types.d.ts:
--------------------------------------------------------------------------------

```typescript
 1 | declare module 'cloudflare:test' {
 2 | 	interface ProvidedEnv {
 3 | 		OPENAI_API_KEY: 'TODO'
 4 | 		AI_GATEWAY_TOKEN: string
 5 | 		CLOUDFLARE_ACCOUNT_ID: string
 6 | 		AI_GATEWAY_ID: string
 7 | 		AI: Ai
 8 | 	}
 9 | }
10 | 
```

--------------------------------------------------------------------------------
/apps/demo-day/frontend/public/more.svg:
--------------------------------------------------------------------------------

```
1 | <svg width="476" height="476" viewBox="0 0 476 476" fill="none" xmlns="http://www.w3.org/2000/svg">
2 | <path d="M0 199H200V0H277V199H476V276H277V476H200V276H0V199Z" stroke='#fff' stroke-width="2"/>
3 | </svg>
4 | 
```

--------------------------------------------------------------------------------
/packages/mcp-common/src/get-props.ts:
--------------------------------------------------------------------------------

```typescript
 1 | /**
 2 |  * Gets props from agent or throws if undefined
 3 |  */
 4 | export function getProps<T = unknown>(agent: { props?: T }): T {
 5 | 	if (!agent.props) {
 6 | 		throw new Error('Props required')
 7 | 	}
 8 | 	return agent.props
 9 | }
10 | 
```

--------------------------------------------------------------------------------
/packages/mcp-common/tsconfig.json:
--------------------------------------------------------------------------------

```json
1 | {
2 | 	"extends": "@repo/typescript-config/workers-lib.json",
3 | 	"include": ["**/*.ts"],
4 | 	"exclude": ["node_modules", "tsconfig.json"],
5 | 	"compilerOptions": {
6 | 		"types": ["@cloudflare/vitest-pool-workers"]
7 | 	}
8 | }
9 | 
```

--------------------------------------------------------------------------------
/vitest.workspace.ts:
--------------------------------------------------------------------------------

```typescript
1 | import { defineWorkspace } from 'vitest/config'
2 | 
3 | export default defineWorkspace([
4 | 	'apps/*/vitest.config.ts',
5 | 	'apps/*/vitest.config.node.ts',
6 | 	'packages/*/vitest.config.ts',
7 | 	'packages/*/vitest.config.node.ts',
8 | ])
9 | 
```

--------------------------------------------------------------------------------
/packages/eval-tools/wrangler.json:
--------------------------------------------------------------------------------

```json
 1 | {
 2 | 	"name": "stub-worker",
 3 | 	"compatibility_date": "2025-04-14",
 4 | 	"vars": {
 5 | 		"OPENAI_API_KEY": "TODO",
 6 | 		"AI_GATEWAY_TOKEN": "TODO",
 7 | 		"CLOUDFLARE_ACCOUNT_ID": "TODO",
 8 | 		"AI_GATEWAY_ID": "TODO"
 9 | 	},
10 | 	"ai": {
11 | 		"binding": "AI"
12 | 	}
13 | }
14 | 
```

--------------------------------------------------------------------------------
/packages/mcp-common/src/scopes.ts:
--------------------------------------------------------------------------------

```typescript
1 | // These scopes are required for Cloudflare auth
2 | export const RequiredScopes = {
3 | 	'user:read': 'See your user info such as name, email address, and account memberships.',
4 | 	offline_access: 'Grants refresh tokens for long-lived access.',
5 | } as const
6 | 
```

--------------------------------------------------------------------------------
/packages/tools/src/test/setup.ts:
--------------------------------------------------------------------------------

```typescript
1 | // Ensure chalk doesn't add colors to output for consistent snapshots
2 | delete process.env.FORCE_COLOR
3 | 
4 | // runx uses zx/globals imported in bin/runx.ts
5 | // This import ensures that tests work without
6 | // needing to import this manually.
7 | await import('zx/globals')
8 | 
```

--------------------------------------------------------------------------------
/packages/mcp-common/src/config.ts:
--------------------------------------------------------------------------------

```typescript
1 | import { z } from 'zod'
2 | 
3 | export type MCPEnvironment = z.infer<typeof MCPEnvironment>
4 | export const MCPEnvironment = z.enum(['VITEST', 'development', 'staging', 'production'])
5 | 
6 | export function getEnvironment(environment: string) {
7 | 	return MCPEnvironment.parse(environment)
8 | }
9 | 
```

--------------------------------------------------------------------------------
/apps/sandbox-container/evals/utils.ts:
--------------------------------------------------------------------------------

```typescript
1 | import { MCPClientManager } from 'agents/mcp/client'
2 | 
3 | export async function initializeClient(): Promise<MCPClientManager> {
4 | 	const clientManager = new MCPClientManager('test-client', '0.0.0')
5 | 	await clientManager.connect('http://localhost:8976/sse')
6 | 	return clientManager
7 | }
8 | 
```

--------------------------------------------------------------------------------
/apps/workers-bindings/evals/utils.ts:
--------------------------------------------------------------------------------

```typescript
1 | import { MCPClientManager } from 'agents/mcp/client'
2 | 
3 | export async function initializeClient(): Promise<MCPClientManager> {
4 | 	const clientManager = new MCPClientManager('test-client', '0.0.0')
5 | 	await clientManager.connect('http://localhost:8977/sse')
6 | 	return clientManager
7 | }
8 | 
```

--------------------------------------------------------------------------------
/packages/mcp-common/src/types/shared.types.ts:
--------------------------------------------------------------------------------

```typescript
1 | import { z } from 'zod'
2 | 
3 | export const PaginationPerPageParam = z.number().nullable().optional()
4 | export const PaginationPageParam = z.number().nullable().optional()
5 | 
6 | export const PaginationLimitParam = z.number().optional()
7 | export const PaginationOffsetParam = z.number().optional()
8 | 
```

--------------------------------------------------------------------------------
/apps/radar/src/types/url-scanner.ts:
--------------------------------------------------------------------------------

```typescript
 1 | /**
 2 |  * This file contains the validators for the URL scanner tools.
 3 |  */
 4 | import { z } from 'zod'
 5 | 
 6 | export const UrlParam = z
 7 | 	.string()
 8 | 	.url()
 9 | 	.describe('A valid URL including protocol (e.g., "https://example.com").')
10 | 
11 | export const CreateScanResult = z
12 | 	.object({
13 | 		uuid: z.string(),
14 | 	})
15 | 	.passthrough()
16 | 
```

--------------------------------------------------------------------------------
/packages/typescript-config/workers-lib.json:
--------------------------------------------------------------------------------

```json
 1 | {
 2 | 	"$schema": "https://json.schemastore.org/tsconfig",
 3 | 	"extends": "@repo/typescript-config/workers.json",
 4 | 	"include": ["${configDir}/**/*.ts", "${configDir}/**/*.tsx"],
 5 | 	"exclude": ["${configDir}/node_modules/", "${configDir}/dist/"],
 6 | 	"compilerOptions": {
 7 | 		"types": ["@cloudflare/vitest-pool-workers"]
 8 | 	}
 9 | }
10 | 
```

--------------------------------------------------------------------------------
/apps/sandbox-container/container/tsconfig.json:
--------------------------------------------------------------------------------

```json
 1 | {
 2 | 	"compilerOptions": {
 3 | 		"lib": ["es2023"],
 4 | 		"module": "ES2022",
 5 | 		"target": "es2022",
 6 | 		"types": ["@types/node"],
 7 | 		"strict": true,
 8 | 		"esModuleInterop": true,
 9 | 		"skipLibCheck": true,
10 | 		"moduleResolution": "bundler",
11 | 		"noEmit": true,
12 | 		"allowImportingTsExtensions": true
13 | 	},
14 | 	"include": ["**/*.ts"],
15 | 	"exclude": []
16 | }
17 | 
```

--------------------------------------------------------------------------------
/.changeset/config.json:
--------------------------------------------------------------------------------

```json
 1 | {
 2 | 	"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
 3 | 	"changelog": "@changesets/cli/changelog",
 4 | 	"commit": false,
 5 | 	"fixed": [],
 6 | 	"linked": [],
 7 | 	"access": "restricted",
 8 | 	"baseBranch": "main",
 9 | 	"updateInternalDependencies": "patch",
10 | 	"ignore": [],
11 | 	"privatePackages": {
12 | 		"version": true,
13 | 		"tag": true
14 | 	}
15 | }
16 | 
```

--------------------------------------------------------------------------------
/packages/mcp-common/src/constants.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import type { CallToolResult } from '@modelcontextprotocol/sdk/types.js'
 2 | 
 3 | export const MISSING_ACCOUNT_ID_RESPONSE = {
 4 | 	content: [
 5 | 		{
 6 | 			type: 'text',
 7 | 			text: 'No currently active accountId. Try listing your accounts (accounts_list) and then setting an active account (set_active_account)',
 8 | 		},
 9 | 	],
10 | } satisfies CallToolResult
11 | 
```

--------------------------------------------------------------------------------
/packages/mcp-common/src/types/tools.types.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import type { z } from 'zod'
 2 | 
 3 | export type ToolHandler<T extends Record<string, any>> = (
 4 | 	params: T & { accountId: string | null; apiToken: string }
 5 | ) => Promise<any>
 6 | 
 7 | export interface ToolDefinition<T extends Record<string, any>> {
 8 | 	name: string
 9 | 	description: string
10 | 	params: Record<string, z.ZodType>
11 | 	handler: ToolHandler<T>
12 | }
13 | 
```

--------------------------------------------------------------------------------
/.vscode/tasks.json:
--------------------------------------------------------------------------------

```json
 1 | {
 2 | 	"version": "2.0.0",
 3 | 	"tasks": [
 4 | 		{
 5 | 			"type": "npm",
 6 | 			"script": "changeset:new",
 7 | 			"group": "none",
 8 | 			"label": "changeset: new",
 9 | 			"detail": "Create changeset and commit all changes",
10 | 			"runOptions": { "instanceLimit": 1 },
11 | 			"presentation": {
12 | 				"reveal": "always",
13 | 				"focus": true,
14 | 				"panel": "new",
15 | 				"close": true
16 | 			}
17 | 		}
18 | 	]
19 | }
20 | 
```

--------------------------------------------------------------------------------
/apps/docs-autorag/src/docs-autorag.context.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import type { CloudflareDocumentationMCP } from './docs-autorag.app'
 2 | 
 3 | export interface Env {
 4 | 	ENVIRONMENT: 'development' | 'staging' | 'production'
 5 | 	AUTORAG_NAME: 'cloudflare-docs-autorag'
 6 | 	MCP_SERVER_NAME: string
 7 | 	MCP_SERVER_VERSION: string
 8 | 	MCP_OBJECT: DurableObjectNamespace<CloudflareDocumentationMCP>
 9 | 	MCP_METRICS: AnalyticsEngineDataset
10 | 	AI: Ai
11 | }
12 | 
```

--------------------------------------------------------------------------------
/apps/sandbox-container/vitest.config.evals.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import { defineWorkersConfig } from '@cloudflare/vitest-pool-workers/config'
 2 | 
 3 | export default defineWorkersConfig({
 4 | 	test: {
 5 | 		include: ['**/*.eval.?(c|m)[jt]s?(x)'],
 6 | 		poolOptions: {
 7 | 			workers: {
 8 | 				isolatedStorage: true,
 9 | 				wrangler: { configPath: './wrangler.jsonc' },
10 | 				miniflare: {
11 | 					bindings: {
12 | 						ENVIRONMENT: 'test',
13 | 					},
14 | 				},
15 | 			},
16 | 		},
17 | 	},
18 | })
19 | 
```

--------------------------------------------------------------------------------
/apps/workers-bindings/vitest.config.evals.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import { defineWorkersConfig } from '@cloudflare/vitest-pool-workers/config'
 2 | 
 3 | export default defineWorkersConfig({
 4 | 	test: {
 5 | 		include: ['**/*.eval.?(c|m)[jt]s?(x)'],
 6 | 		poolOptions: {
 7 | 			workers: {
 8 | 				isolatedStorage: true,
 9 | 				wrangler: { configPath: './wrangler.jsonc' },
10 | 				miniflare: {
11 | 					bindings: {
12 | 						ENVIRONMENT: 'test',
13 | 					},
14 | 				},
15 | 			},
16 | 		},
17 | 	},
18 | })
19 | 
```

--------------------------------------------------------------------------------
/packages/typescript-config/CHANGELOG.md:
--------------------------------------------------------------------------------

```markdown
 1 | # @repo/typescript-config
 2 | 
 3 | ## 0.3.1
 4 | 
 5 | ### Patch Changes
 6 | 
 7 | - cc6d41f: Update agents deps & modelcontextprotocol
 8 | 
 9 | ## 0.3.0
10 | 
11 | ### Minor Changes
12 | 
13 | - 6cf52a6: Support AOT tokens
14 | 
15 | ### Patch Changes
16 | 
17 | - 0fc4439: Update agents and modelcontext dependencies
18 | 
19 | ## 0.2.5
20 | 
21 | ### Patch Changes
22 | 
23 | - bdb5b89: chore: remove publishConfig from typescript-config/package.json
24 | 
25 |   This did nothing.
26 | 
```

--------------------------------------------------------------------------------
/packages/mcp-observability/CHANGELOG.md:
--------------------------------------------------------------------------------

```markdown
 1 | # @repo/mcp-observability
 2 | 
 3 | ## 0.32.3
 4 | 
 5 | ### Patch Changes
 6 | 
 7 | - 43f493d: Update agent + modelcontextprotocol deps
 8 | 
 9 | ## 0.32.2
10 | 
11 | ### Patch Changes
12 | 
13 | - 7422e71: Update MCP sdk
14 | 
15 | ## 0.32.1
16 | 
17 | ### Patch Changes
18 | 
19 | - cc6d41f: Update agents deps & modelcontextprotocol
20 | 
21 | ## 0.32.0
22 | 
23 | ### Minor Changes
24 | 
25 | - 6cf52a6: Support AOT tokens
26 | 
27 | ### Patch Changes
28 | 
29 | - 0fc4439: Update agents and modelcontext dependencies
30 | 
```

--------------------------------------------------------------------------------
/apps/sandbox-container/server/metrics.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import { MetricsEvent, MetricsEventIndexIds } from '@repo/mcp-observability'
 2 | 
 3 | export class ContainerEvent extends MetricsEvent {
 4 | 	constructor(
 5 | 		private containers: {
 6 | 			active?: number
 7 | 		}
 8 | 	) {
 9 | 		super()
10 | 	}
11 | 
12 | 	toDataPoint(): AnalyticsEngineDataPoint {
13 | 		return {
14 | 			indexes: [MetricsEventIndexIds.CONTAINER_MANAGER],
15 | 			doubles: this.mapDoubles({
16 | 				double1: this.containers.active,
17 | 			}),
18 | 		}
19 | 	}
20 | }
21 | 
```

--------------------------------------------------------------------------------
/packages/eval-tools/CHANGELOG.md:
--------------------------------------------------------------------------------

```markdown
 1 | # @repo/eval-tools
 2 | 
 3 | ## 0.32.3
 4 | 
 5 | ### Patch Changes
 6 | 
 7 | - 43f493d: Update agent + modelcontextprotocol deps
 8 | 
 9 | ## 0.32.2
10 | 
11 | ### Patch Changes
12 | 
13 | - 24dd872: feat: Add MCP tool titles and hints to all Cloudflare tools
14 | 
15 | ## 0.32.1
16 | 
17 | ### Patch Changes
18 | 
19 | - cc6d41f: Update agents deps & modelcontextprotocol
20 | 
21 | ## 0.32.0
22 | 
23 | ### Minor Changes
24 | 
25 | - 6cf52a6: Support AOT tokens
26 | 
27 | ### Patch Changes
28 | 
29 | - 0fc4439: Update agents and modelcontext dependencies
30 | 
```

--------------------------------------------------------------------------------
/apps/demo-day/frontend/public/webflow.svg:
--------------------------------------------------------------------------------

```
1 | <svg width="529" height="331" viewBox="0 0 529 331" fill="none" xmlns="http://www.w3.org/2000/svg">
2 | <path fill-rule="evenodd" clip-rule="evenodd" d="M527 1L359.159 329H201.51L271.751 193.063H268.6C210.652 268.262 124.192 317.766 1 329V194.945C1 194.945 79.8072 190.291 126.138 141.598H1V1.00364H141.643V116.641L144.8 116.628L202.27 1.00364H308.634V115.907L311.791 115.901L371.418 1H527Z" stroke="white" stroke-width="1"/>
3 | </svg>
4 | 
```

--------------------------------------------------------------------------------
/packages/mcp-common/src/types/workers.types.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import { z } from 'zod'
 2 | 
 3 | export type WorkersService = z.infer<typeof WorkersService>
 4 | export const WorkersService = z.object({
 5 | 	id: z.string(),
 6 | 	default_environment: z.object({
 7 | 		environment: z.string(),
 8 | 		script_tag: z.string(),
 9 | 		created_on: z.string(),
10 | 		modified_on: z.string(),
11 | 		script: z.object({
12 | 			created_on: z.string(),
13 | 			modified_on: z.string(),
14 | 			id: z.string(),
15 | 		}),
16 | 	}),
17 | 	created_on: z.string(),
18 | 	modified_on: z.string(),
19 | })
20 | 
```

--------------------------------------------------------------------------------
/apps/docs-vectorize/src/docs-vectorize.context.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import type { CloudflareDocumentationMCP } from './docs-vectorize.app'
 2 | 
 3 | export interface Env {
 4 | 	ENVIRONMENT: 'development' | 'staging' | 'production'
 5 | 	MCP_SERVER_NAME: string
 6 | 	MCP_SERVER_VERSION: string
 7 | 	MCP_OBJECT: DurableObjectNamespace<CloudflareDocumentationMCP>
 8 | 	MCP_METRICS: AnalyticsEngineDataset
 9 | 	SENTRY_ACCESS_CLIENT_ID: string
10 | 	SENTRY_ACCESS_CLIENT_SECRET: string
11 | 	GIT_HASH: string
12 | 	SENTRY_DSN: string
13 | 	AI: Ai
14 | 	VECTORIZE: VectorizeIndex
15 | }
16 | 
```

--------------------------------------------------------------------------------
/packages/mcp-observability/package.json:
--------------------------------------------------------------------------------

```json
 1 | {
 2 | 	"name": "@repo/mcp-observability",
 3 | 	"version": "0.32.3",
 4 | 	"private": true,
 5 | 	"sideEffects": false,
 6 | 	"type": "module",
 7 | 	"main": "./src/index.ts",
 8 | 	"scripts": {
 9 | 		"types": "wrangler types --include-env=false"
10 | 	},
11 | 	"directories": {
12 | 		"bin": "bin"
13 | 	},
14 | 	"dependencies": {
15 | 		"@modelcontextprotocol/sdk": "1.18.2",
16 | 		"wrangler": "4.10.0",
17 | 		"zod": "3.24.2"
18 | 	},
19 | 	"devDependencies": {
20 | 		"@repo/typescript-config": "workspace:*",
21 | 		"@types/node": "22.14.1"
22 | 	}
23 | }
24 | 
```

--------------------------------------------------------------------------------
/packages/mcp-common/tests/utils/cloudflare-mock.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import { vi } from 'vitest'
 2 | 
 3 | import type { Account } from 'cloudflare/resources/accounts/accounts.mjs'
 4 | 
 5 | /**
 6 |  * Creates a mocked implementation of the Cloudflare client
 7 |  */
 8 | export const cloudflareClientMockImplementation = () => {
 9 | 	return {
10 | 		accounts: {
11 | 			list: vi.fn(async () => {
12 | 				return {
13 | 					success: true,
14 | 					result: [
15 | 						{
16 | 							id: 'mock-account-id',
17 | 							name: 'mock-account-name',
18 | 						},
19 | 					] satisfies Account[],
20 | 				}
21 | 			}),
22 | 		},
23 | 	}
24 | }
25 | 
```

--------------------------------------------------------------------------------
/.vscode/extensions.json:
--------------------------------------------------------------------------------

```json
 1 | {
 2 | 	// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
 3 | 	// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
 4 | 
 5 | 	// List of extensions which should be recommended for users of this workspace.
 6 | 	"recommendations": ["esbenp.prettier-vscode", "dbaeumer.vscode-eslint"],
 7 | 	// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
 8 | 	"unwantedRecommendations": []
 9 | }
10 | 
```

--------------------------------------------------------------------------------
/packages/tools/package.json:
--------------------------------------------------------------------------------

```json
 1 | {
 2 | 	"name": "@repo/tools",
 3 | 	"version": "0.33.1",
 4 | 	"private": true,
 5 | 	"sideEffects": false,
 6 | 	"type": "module",
 7 | 	"directories": {
 8 | 		"bin": "bin"
 9 | 	},
10 | 	"devDependencies": {
11 | 		"@types/fs-extra": "11.0.4",
12 | 		"@types/node": "22.14.1",
13 | 		"vitest": "3.0.9"
14 | 	},
15 | 	"dependencies": {
16 | 		"@commander-js/extra-typings": "13.1.0",
17 | 		"@jahands/cli-tools": "0.10.2",
18 | 		"commander": "13.1.0",
19 | 		"empathic": "1.1.0",
20 | 		"tsx": "4.19.3",
21 | 		"zod": "4.0.0-beta.20250505T195954",
22 | 		"zx": "8.5.4"
23 | 	}
24 | }
25 | 
```

--------------------------------------------------------------------------------
/apps/demo-day/frontend/public/anthropic.svg:
--------------------------------------------------------------------------------

```
1 | <svg width="517" height="364" viewBox="0 0 517 364" fill="none" xmlns="http://www.w3.org/2000/svg">
2 | <path d="M110.465 286.84H109.782L109.534 287.476L80.063 363H1.47142L144.789 1H226.419L369.737 363H291.15L262.238 287.482L261.992 286.84H261.304H110.465ZM135.326 219.719L134.801 221.08H136.259H234.949H236.408L235.882 219.719L186.537 92.0395L185.604 89.626L184.671 92.0395L135.326 219.719ZM515.529 363H438.616L295.298 1H372.211L515.529 363Z" stroke="white" stroke-width="1"/>
3 | </svg>
4 | 
```

--------------------------------------------------------------------------------
/apps/cloudflare-one-casb/src/cf1-casb.context.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import type { CASBMCP, UserDetails } from './cf1-casb.app'
 2 | 
 3 | export interface Env {
 4 | 	ENVIRONMENT: 'development' | 'staging' | 'production'
 5 | 	MCP_SERVER_NAME: string
 6 | 	MCP_SERVER_VERSION: string
 7 | 	MCP_OBJECT: DurableObjectNamespace<CASBMCP>
 8 | 	MCP_METRICS: AnalyticsEngineDataset
 9 | 	AI: Ai
10 | 	CLOUDFLARE_CLIENT_ID: string
11 | 	CLOUDFLARE_CLIENT_SECRET: string
12 | 	USER_DETAILS: DurableObjectNamespace<UserDetails>
13 | 	DEV_DISABLE_OAUTH: string
14 | 	DEV_CLOUDFLARE_API_TOKEN: string
15 | 	DEV_CLOUDFLARE_EMAIL: string
16 | }
17 | 
```

--------------------------------------------------------------------------------
/apps/sandbox-container/server/utils.spec.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import { describe, expect, it } from 'vitest'
 2 | 
 3 | import { stripProtocolFromFilePath } from './utils'
 4 | 
 5 | describe('get_file_name_from_path', () => {
 6 | 	it('strips file:// protocol from path', async () => {
 7 | 		const path = await stripProtocolFromFilePath('file:///files/contents/cats')
 8 | 		expect(path).toBe('/files/contents/cats')
 9 | 	}),
10 | 		it('leaves protocol-less paths untouched', async () => {
11 | 			const path = await stripProtocolFromFilePath('/files/contents/cats')
12 | 			expect(path).toBe('/files/contents/cats')
13 | 		})
14 | })
15 | 
```

--------------------------------------------------------------------------------
/apps/dns-analytics/vitest.config.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import { defineWorkersConfig } from '@cloudflare/vitest-pool-workers/config'
 2 | 
 3 | export interface TestEnv extends Env {
 4 | 	CLOUDFLARE_MOCK_ACCOUNT_ID: string
 5 | 	CLOUDFLARE_MOCK_API_TOKEN: string
 6 | }
 7 | 
 8 | export default defineWorkersConfig({
 9 | 	test: {
10 | 		poolOptions: {
11 | 			workers: {
12 | 				wrangler: { configPath: `${__dirname}/wrangler.jsonc` },
13 | 				miniflare: {
14 | 					bindings: {
15 | 						CLOUDFLARE_MOCK_ACCOUNT_ID: 'mock-account-id',
16 | 						CLOUDFLARE_MOCK_API_TOKEN: 'mock-api-token',
17 | 					} satisfies Partial<TestEnv>,
18 | 				},
19 | 			},
20 | 		},
21 | 	},
22 | })
23 | 
```

--------------------------------------------------------------------------------
/packages/mcp-common/src/types/d1.types.ts:
--------------------------------------------------------------------------------

```typescript
 1 | /**
 2 |  * This file contains the validators for the d1 tools.
 3 |  */
 4 | import { z } from 'zod'
 5 | 
 6 | import type { DatabaseCreateParams } from 'cloudflare/resources/d1.mjs'
 7 | 
 8 | export const D1DatabaseNameParam: z.ZodType<DatabaseCreateParams['name']> = z.string()
 9 | export const D1DatabasePrimaryLocationHintParam: z.ZodType<
10 | 	DatabaseCreateParams['primary_location_hint']
11 | > = z.enum(['wnam', 'enam', 'weur', 'eeur', 'apac', 'oc']).optional()
12 | 
13 | export const D1DatabaseQuerySqlParam = z.string()
14 | export const D1DatabaseQueryParamsParam = z.array(z.string()).optional()
15 | 
```

--------------------------------------------------------------------------------
/packages/mcp-common/vitest.config.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import { defineWorkersProject } from '@cloudflare/vitest-pool-workers/config'
 2 | 
 3 | export interface TestEnv {
 4 | 	CLOUDFLARE_MOCK_ACCOUNT_ID: string
 5 | 	CLOUDFLARE_MOCK_API_TOKEN: string
 6 | }
 7 | 
 8 | export default defineWorkersProject({
 9 | 	test: {
10 | 		poolOptions: {
11 | 			workers: {
12 | 				singleWorker: true,
13 | 				miniflare: {
14 | 					compatibilityDate: '2025-03-10',
15 | 					compatibilityFlags: ['nodejs_compat'],
16 | 					bindings: {
17 | 						CLOUDFLARE_MOCK_ACCOUNT_ID: 'mock-account-id',
18 | 						CLOUDFLARE_MOCK_API_TOKEN: 'mock-api-token',
19 | 					} satisfies Partial<TestEnv>,
20 | 				},
21 | 			},
22 | 		},
23 | 	},
24 | })
25 | 
```

--------------------------------------------------------------------------------
/apps/radar/vitest.config.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import { defineWorkersConfig } from '@cloudflare/vitest-pool-workers/config'
 2 | 
 3 | import type { Env } from './src/radar.context'
 4 | 
 5 | export interface TestEnv extends Env {
 6 | 	CLOUDFLARE_MOCK_ACCOUNT_ID: string
 7 | 	CLOUDFLARE_MOCK_API_TOKEN: string
 8 | }
 9 | 
10 | export default defineWorkersConfig({
11 | 	test: {
12 | 		poolOptions: {
13 | 			workers: {
14 | 				wrangler: { configPath: `${__dirname}/wrangler.jsonc` },
15 | 				miniflare: {
16 | 					bindings: {
17 | 						CLOUDFLARE_MOCK_ACCOUNT_ID: 'mock-account-id',
18 | 						CLOUDFLARE_MOCK_API_TOKEN: 'mock-api-token',
19 | 					} satisfies Partial<TestEnv>,
20 | 				},
21 | 			},
22 | 		},
23 | 	},
24 | })
25 | 
```

--------------------------------------------------------------------------------
/apps/autorag/vitest.config.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import { defineWorkersConfig } from '@cloudflare/vitest-pool-workers/config'
 2 | 
 3 | import type { Env } from './src/autorag.context'
 4 | 
 5 | export interface TestEnv extends Env {
 6 | 	CLOUDFLARE_MOCK_ACCOUNT_ID: string
 7 | 	CLOUDFLARE_MOCK_API_TOKEN: string
 8 | }
 9 | 
10 | export default defineWorkersConfig({
11 | 	test: {
12 | 		poolOptions: {
13 | 			workers: {
14 | 				wrangler: { configPath: `${__dirname}/wrangler.jsonc` },
15 | 				miniflare: {
16 | 					bindings: {
17 | 						CLOUDFLARE_MOCK_ACCOUNT_ID: 'mock-account-id',
18 | 						CLOUDFLARE_MOCK_API_TOKEN: 'mock-api-token',
19 | 					} satisfies Partial<TestEnv>,
20 | 				},
21 | 			},
22 | 		},
23 | 	},
24 | })
25 | 
```

--------------------------------------------------------------------------------
/apps/browser-rendering/vitest.config.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import { defineWorkersConfig } from '@cloudflare/vitest-pool-workers/config'
 2 | 
 3 | import type { Env } from './src/browser.context'
 4 | 
 5 | export interface TestEnv extends Env {
 6 | 	CLOUDFLARE_MOCK_ACCOUNT_ID: string
 7 | 	CLOUDFLARE_MOCK_API_TOKEN: string
 8 | }
 9 | 
10 | export default defineWorkersConfig({
11 | 	test: {
12 | 		poolOptions: {
13 | 			workers: {
14 | 				wrangler: { configPath: `${__dirname}/wrangler.jsonc` },
15 | 				miniflare: {
16 | 					bindings: {
17 | 						CLOUDFLARE_MOCK_ACCOUNT_ID: 'mock-account-id',
18 | 						CLOUDFLARE_MOCK_API_TOKEN: 'mock-api-token',
19 | 					} satisfies Partial<TestEnv>,
20 | 				},
21 | 			},
22 | 		},
23 | 	},
24 | })
25 | 
```

--------------------------------------------------------------------------------
/apps/logpush/vitest.config.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import { defineWorkersConfig } from '@cloudflare/vitest-pool-workers/config'
 2 | 
 3 | import type { Env } from './src/logpush.context'
 4 | 
 5 | export interface TestEnv extends Env {
 6 | 	CLOUDFLARE_MOCK_ACCOUNT_ID: string
 7 | 	CLOUDFLARE_MOCK_API_TOKEN: string
 8 | }
 9 | 
10 | export default defineWorkersConfig({
11 | 	test: {
12 | 		poolOptions: {
13 | 			workers: {
14 | 				wrangler: { configPath: `${__dirname}/wrangler.jsonc` },
15 | 				miniflare: {
16 | 					bindings: {
17 | 						CLOUDFLARE_MOCK_ACCOUNT_ID: 'mock-account-id',
18 | 						CLOUDFLARE_MOCK_API_TOKEN: 'mock-api-token',
19 | 					} satisfies Partial<TestEnv>,
20 | 				},
21 | 			},
22 | 		},
23 | 	},
24 | })
25 | 
```

--------------------------------------------------------------------------------
/apps/cloudflare-one-casb/vitest.config.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import { defineWorkersConfig } from '@cloudflare/vitest-pool-workers/config'
 2 | 
 3 | import type { Env } from './src/cf1-casb.context'
 4 | 
 5 | export interface TestEnv extends Env {
 6 | 	CLOUDFLARE_MOCK_ACCOUNT_ID: string
 7 | 	CLOUDFLARE_MOCK_API_TOKEN: string
 8 | }
 9 | 
10 | export default defineWorkersConfig({
11 | 	test: {
12 | 		poolOptions: {
13 | 			workers: {
14 | 				wrangler: { configPath: `${__dirname}/wrangler.jsonc` },
15 | 				miniflare: {
16 | 					bindings: {
17 | 						CLOUDFLARE_MOCK_ACCOUNT_ID: 'mock-account-id',
18 | 						CLOUDFLARE_MOCK_API_TOKEN: 'mock-api-token',
19 | 					} satisfies Partial<TestEnv>,
20 | 				},
21 | 			},
22 | 		},
23 | 	},
24 | })
25 | 
```

--------------------------------------------------------------------------------
/apps/logpush/src/logpush.context.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import type { UserDetails } from '@repo/mcp-common/src/durable-objects/user_details.do'
 2 | import type { LogsMCP } from './logpush.app'
 3 | 
 4 | export interface Env {
 5 | 	OAUTH_KV: KVNamespace
 6 | 	ENVIRONMENT: 'development' | 'staging' | 'production'
 7 | 	MCP_SERVER_NAME: string
 8 | 	MCP_SERVER_VERSION: string
 9 | 	CLOUDFLARE_CLIENT_ID: string
10 | 	CLOUDFLARE_CLIENT_SECRET: string
11 | 	MCP_OBJECT: DurableObjectNamespace<LogsMCP>
12 | 	USER_DETAILS: DurableObjectNamespace<UserDetails>
13 | 	MCP_METRICS: AnalyticsEngineDataset
14 | 	DEV_DISABLE_OAUTH: string
15 | 	DEV_CLOUDFLARE_API_TOKEN: string
16 | 	DEV_CLOUDFLARE_EMAIL: string
17 | }
18 | 
```

--------------------------------------------------------------------------------
/apps/workers-bindings/vitest.config.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import { defineWorkersConfig } from '@cloudflare/vitest-pool-workers/config'
 2 | 
 3 | import type { Env } from './src/bindings.context'
 4 | 
 5 | export interface TestEnv extends Env {
 6 | 	CLOUDFLARE_MOCK_ACCOUNT_ID: string
 7 | 	CLOUDFLARE_MOCK_API_TOKEN: string
 8 | }
 9 | 
10 | export default defineWorkersConfig({
11 | 	test: {
12 | 		poolOptions: {
13 | 			workers: {
14 | 				wrangler: { configPath: `${__dirname}/wrangler.jsonc` },
15 | 				miniflare: {
16 | 					bindings: {
17 | 						CLOUDFLARE_MOCK_ACCOUNT_ID: 'mock-account-id',
18 | 						CLOUDFLARE_MOCK_API_TOKEN: 'mock-api-token',
19 | 					} satisfies Partial<TestEnv>,
20 | 				},
21 | 			},
22 | 		},
23 | 	},
24 | })
25 | 
```

--------------------------------------------------------------------------------
/packages/tools/CHANGELOG.md:
--------------------------------------------------------------------------------

```markdown
 1 | # @repo/tools
 2 | 
 3 | ## 0.33.1
 4 | 
 5 | ### Patch Changes
 6 | 
 7 | - cc6d41f: Update agents deps & modelcontextprotocol
 8 | 
 9 | ## 0.33.0
10 | 
11 | ### Minor Changes
12 | 
13 | - 6cf52a6: Support AOT tokens
14 | 
15 | ### Patch Changes
16 | 
17 | - 0fc4439: Update agents and modelcontext dependencies
18 | 
19 | ## 0.32.1
20 | 
21 | ### Patch Changes
22 | 
23 | - 86c2e4f: Add API token passthrough auth
24 | 
25 | ## 0.32.0
26 | 
27 | ### Minor Changes
28 | 
29 | - 33e0198: BANDA-899 feat: add runx deploy-published-workers script
30 | 
31 | ### Patch Changes
32 | 
33 | - bdb5b89: chore: remove pnpx from wrangler deploy script
34 | 
35 |   This is redundant because turbo and pnpm already add the bundled wrangler command to $PATH
36 | 
```

--------------------------------------------------------------------------------
/apps/auditlogs/vitest.config.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import { defineWorkersConfig } from '@cloudflare/vitest-pool-workers/config'
 2 | 
 3 | import type { Env } from './src/auditlogs.context'
 4 | 
 5 | export interface TestEnv extends Env {
 6 | 	CLOUDFLARE_MOCK_ACCOUNT_ID: string
 7 | 	CLOUDFLARE_MOCK_API_TOKEN: string
 8 | }
 9 | 
10 | export default defineWorkersConfig({
11 | 	test: {
12 | 		poolOptions: {
13 | 			workers: {
14 | 				wrangler: { configPath: `${__dirname}/wrangler.jsonc` },
15 | 				miniflare: {
16 | 					bindings: {
17 | 						CLOUDFLARE_MOCK_ACCOUNT_ID: 'mock-account-id',
18 | 						CLOUDFLARE_MOCK_API_TOKEN: 'mock-api-token',
19 | 					} satisfies Partial<TestEnv>,
20 | 				},
21 | 			},
22 | 		},
23 | 	},
24 | })
25 | 
```

--------------------------------------------------------------------------------
/apps/ai-gateway/vitest.config.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import { defineWorkersConfig } from '@cloudflare/vitest-pool-workers/config'
 2 | 
 3 | import type { Env } from './src/ai-gateway.context'
 4 | 
 5 | export interface TestEnv extends Env {
 6 | 	CLOUDFLARE_MOCK_ACCOUNT_ID: string
 7 | 	CLOUDFLARE_MOCK_API_TOKEN: string
 8 | }
 9 | 
10 | export default defineWorkersConfig({
11 | 	test: {
12 | 		poolOptions: {
13 | 			workers: {
14 | 				wrangler: { configPath: `${__dirname}/wrangler.jsonc` },
15 | 				miniflare: {
16 | 					bindings: {
17 | 						CLOUDFLARE_MOCK_ACCOUNT_ID: 'mock-account-id',
18 | 						CLOUDFLARE_MOCK_API_TOKEN: 'mock-api-token',
19 | 					} satisfies Partial<TestEnv>,
20 | 				},
21 | 			},
22 | 		},
23 | 	},
24 | })
25 | 
```

--------------------------------------------------------------------------------
/apps/dex-analysis/vitest.config.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import { defineWorkersConfig } from '@cloudflare/vitest-pool-workers/config'
 2 | 
 3 | import type { Env } from './src/dex-analysis.context'
 4 | 
 5 | export interface TestEnv extends Env {
 6 | 	CLOUDFLARE_MOCK_ACCOUNT_ID: string
 7 | 	CLOUDFLARE_MOCK_API_TOKEN: string
 8 | }
 9 | 
10 | export default defineWorkersConfig({
11 | 	test: {
12 | 		poolOptions: {
13 | 			workers: {
14 | 				wrangler: { configPath: `${__dirname}/wrangler.jsonc` },
15 | 				miniflare: {
16 | 					bindings: {
17 | 						CLOUDFLARE_MOCK_ACCOUNT_ID: 'mock-account-id',
18 | 						CLOUDFLARE_MOCK_API_TOKEN: 'mock-api-token',
19 | 					} satisfies Partial<TestEnv>,
20 | 				},
21 | 			},
22 | 		},
23 | 	},
24 | })
25 | 
```

--------------------------------------------------------------------------------
/apps/docs-autorag/vitest.config.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import { defineWorkersConfig } from '@cloudflare/vitest-pool-workers/config'
 2 | 
 3 | import type { Env } from './src/docs-autorag.context'
 4 | 
 5 | export interface TestEnv extends Env {
 6 | 	CLOUDFLARE_MOCK_ACCOUNT_ID: string
 7 | 	CLOUDFLARE_MOCK_API_TOKEN: string
 8 | }
 9 | 
10 | export default defineWorkersConfig({
11 | 	test: {
12 | 		poolOptions: {
13 | 			workers: {
14 | 				wrangler: { configPath: `${__dirname}/wrangler.jsonc` },
15 | 				miniflare: {
16 | 					bindings: {
17 | 						CLOUDFLARE_MOCK_ACCOUNT_ID: 'mock-account-id',
18 | 						CLOUDFLARE_MOCK_API_TOKEN: 'mock-api-token',
19 | 					} satisfies Partial<TestEnv>,
20 | 				},
21 | 			},
22 | 		},
23 | 	},
24 | })
25 | 
```

--------------------------------------------------------------------------------
/packages/tools/src/bin/runx.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import 'zx/globals'
 2 | 
 3 | import { program } from '@commander-js/extra-typings'
 4 | import { catchProcessError } from '@jahands/cli-tools'
 5 | 
 6 | import { deployPublishedWorkersCmd } from '../cmd/deploy-published-packages'
 7 | 
 8 | program
 9 | 	.name('runx')
10 | 	.description('A CLI for scripts that automate this repo')
11 | 
12 | 	// While `packages/tools/bin` scripts work well for simple tasks,
13 | 	// a typescript CLI is nicer for more complex things.
14 | 
15 | 	.addCommand(deployPublishedWorkersCmd)
16 | 
17 | 	// Don't hang for unresolved promises
18 | 	.hook('postAction', () => process.exit(0))
19 | 	.parseAsync()
20 | 	.catch(catchProcessError())
21 | 
```

--------------------------------------------------------------------------------
/apps/autorag/src/autorag.context.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import type { UserDetails } from '@repo/mcp-common/src/durable-objects/user_details.do'
 2 | import type { AutoRAGMCP } from './autorag.app'
 3 | 
 4 | export interface Env {
 5 | 	OAUTH_KV: KVNamespace
 6 | 	ENVIRONMENT: 'development' | 'staging' | 'production'
 7 | 	MCP_SERVER_NAME: string
 8 | 	MCP_SERVER_VERSION: string
 9 | 	CLOUDFLARE_CLIENT_ID: string
10 | 	CLOUDFLARE_CLIENT_SECRET: string
11 | 	MCP_OBJECT: DurableObjectNamespace<AutoRAGMCP>
12 | 	USER_DETAILS: DurableObjectNamespace<UserDetails>
13 | 	MCP_METRICS: AnalyticsEngineDataset
14 | 	DEV_DISABLE_OAUTH: string
15 | 	DEV_CLOUDFLARE_API_TOKEN: string
16 | 	DEV_CLOUDFLARE_EMAIL: string
17 | }
18 | 
```

--------------------------------------------------------------------------------
/apps/browser-rendering/src/browser.context.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import type { UserDetails } from '@repo/mcp-common/src/durable-objects/user_details.do'
 2 | import type { BrowserMCP } from './browser.app'
 3 | 
 4 | export interface Env {
 5 | 	OAUTH_KV: KVNamespace
 6 | 	ENVIRONMENT: 'development' | 'staging' | 'production'
 7 | 	MCP_SERVER_NAME: string
 8 | 	MCP_SERVER_VERSION: string
 9 | 	CLOUDFLARE_CLIENT_ID: string
10 | 	CLOUDFLARE_CLIENT_SECRET: string
11 | 	MCP_OBJECT: DurableObjectNamespace<BrowserMCP>
12 | 	USER_DETAILS: DurableObjectNamespace<UserDetails>
13 | 	MCP_METRICS: AnalyticsEngineDataset
14 | 	DEV_DISABLE_OAUTH: string
15 | 	DEV_CLOUDFLARE_API_TOKEN: string
16 | 	DEV_CLOUDFLARE_EMAIL: string
17 | }
18 | 
```

--------------------------------------------------------------------------------
/apps/docs-vectorize/vitest.config.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import { defineWorkersConfig } from '@cloudflare/vitest-pool-workers/config'
 2 | 
 3 | import type { Env } from './src/docs-vectorize.context'
 4 | 
 5 | export interface TestEnv extends Env {
 6 | 	CLOUDFLARE_MOCK_ACCOUNT_ID: string
 7 | 	CLOUDFLARE_MOCK_API_TOKEN: string
 8 | }
 9 | 
10 | export default defineWorkersConfig({
11 | 	test: {
12 | 		poolOptions: {
13 | 			workers: {
14 | 				wrangler: { configPath: `${__dirname}/wrangler.jsonc` },
15 | 				miniflare: {
16 | 					bindings: {
17 | 						CLOUDFLARE_MOCK_ACCOUNT_ID: 'mock-account-id',
18 | 						CLOUDFLARE_MOCK_API_TOKEN: 'mock-api-token',
19 | 					} satisfies Partial<TestEnv>,
20 | 				},
21 | 			},
22 | 		},
23 | 	},
24 | })
25 | 
```

--------------------------------------------------------------------------------
/apps/workers-builds/vitest.config.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import { defineWorkersConfig } from '@cloudflare/vitest-pool-workers/config'
 2 | 
 3 | import type { Env } from './src/workers-builds.context'
 4 | 
 5 | export interface TestEnv extends Env {
 6 | 	CLOUDFLARE_MOCK_ACCOUNT_ID: string
 7 | 	CLOUDFLARE_MOCK_API_TOKEN: string
 8 | }
 9 | 
10 | export default defineWorkersConfig({
11 | 	test: {
12 | 		poolOptions: {
13 | 			workers: {
14 | 				wrangler: { configPath: `${__dirname}/wrangler.jsonc` },
15 | 				miniflare: {
16 | 					bindings: {
17 | 						CLOUDFLARE_MOCK_ACCOUNT_ID: 'mock-account-id',
18 | 						CLOUDFLARE_MOCK_API_TOKEN: 'mock-api-token',
19 | 					} satisfies Partial<TestEnv>,
20 | 				},
21 | 			},
22 | 		},
23 | 	},
24 | })
25 | 
```

--------------------------------------------------------------------------------
/packages/typescript-config/tools.json:
--------------------------------------------------------------------------------

```json
 1 | {
 2 | 	"$schema": "https://json.schemastore.org/tsconfig",
 3 | 	"display": "Default",
 4 | 	"compilerOptions": {
 5 | 		"target": "es2022",
 6 | 		"module": "es2022",
 7 | 		"composite": false,
 8 | 		"declaration": true,
 9 | 		"declarationMap": true,
10 | 		"esModuleInterop": true,
11 | 		"forceConsistentCasingInFileNames": true,
12 | 		"inlineSources": false,
13 | 		"isolatedModules": true,
14 | 		"moduleResolution": "node",
15 | 		"noUnusedLocals": false,
16 | 		"noUnusedParameters": false,
17 | 		"preserveWatchOutput": true,
18 | 		"skipLibCheck": true,
19 | 		"strict": true,
20 | 		"noEmit": true,
21 | 		"experimentalDecorators": true
22 | 	},
23 | 	"exclude": ["node_modules"]
24 | }
25 | 
```

--------------------------------------------------------------------------------
/apps/ai-gateway/src/ai-gateway.context.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import type { UserDetails } from '@repo/mcp-common/src/durable-objects/user_details.do'
 2 | import type { AIGatewayMCP } from './ai-gateway.app'
 3 | 
 4 | export interface Env {
 5 | 	OAUTH_KV: KVNamespace
 6 | 	ENVIRONMENT: 'development' | 'staging' | 'production'
 7 | 	MCP_SERVER_NAME: string
 8 | 	MCP_SERVER_VERSION: string
 9 | 	CLOUDFLARE_CLIENT_ID: string
10 | 	CLOUDFLARE_CLIENT_SECRET: string
11 | 	MCP_OBJECT: DurableObjectNamespace<AIGatewayMCP>
12 | 	USER_DETAILS: DurableObjectNamespace<UserDetails>
13 | 	MCP_METRICS: AnalyticsEngineDataset
14 | 	DEV_DISABLE_OAUTH: string
15 | 	DEV_CLOUDFLARE_API_TOKEN: string
16 | 	DEV_CLOUDFLARE_EMAIL: string
17 | }
18 | 
```

--------------------------------------------------------------------------------
/apps/workers-observability/vitest.config.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import { defineWorkersConfig } from '@cloudflare/vitest-pool-workers/config'
 2 | 
 3 | import type { Env } from './src/workers-observability.context'
 4 | 
 5 | export interface TestEnv extends Env {
 6 | 	CLOUDFLARE_MOCK_ACCOUNT_ID: string
 7 | 	CLOUDFLARE_MOCK_API_TOKEN: string
 8 | }
 9 | 
10 | export default defineWorkersConfig({
11 | 	test: {
12 | 		poolOptions: {
13 | 			workers: {
14 | 				wrangler: { configPath: `${__dirname}/wrangler.jsonc` },
15 | 				miniflare: {
16 | 					bindings: {
17 | 						CLOUDFLARE_MOCK_ACCOUNT_ID: 'mock-account-id',
18 | 						CLOUDFLARE_MOCK_API_TOKEN: 'mock-api-token',
19 | 					} satisfies Partial<TestEnv>,
20 | 				},
21 | 			},
22 | 		},
23 | 	},
24 | })
25 | 
```

--------------------------------------------------------------------------------
/apps/graphql/src/graphql.context.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import type { GraphQLMCP, UserDetails } from './graphql.app'
 2 | 
 3 | export interface Env {
 4 | 	OAUTH_KV: KVNamespace
 5 | 	ENVIRONMENT: 'development' | 'staging' | 'production'
 6 | 	MCP_SERVER_NAME: string
 7 | 	MCP_SERVER_VERSION: string
 8 | 	CLOUDFLARE_CLIENT_ID: string
 9 | 	CLOUDFLARE_CLIENT_SECRET: string
10 | 	MCP_OBJECT: DurableObjectNamespace<GraphQLMCP>
11 | 	USER_DETAILS: DurableObjectNamespace<UserDetails>
12 | 	MCP_METRICS: AnalyticsEngineDataset
13 | 	SENTRY_ACCESS_CLIENT_ID: string
14 | 	SENTRY_ACCESS_CLIENT_SECRET: string
15 | 	GIT_HASH: string
16 | 	SENTRY_DSN: string
17 | 	DEV_DISABLE_OAUTH: string
18 | 	DEV_CLOUDFLARE_API_TOKEN: string
19 | 	DEV_CLOUDFLARE_EMAIL: string
20 | }
21 | 
```

--------------------------------------------------------------------------------
/apps/auditlogs/src/auditlogs.context.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import type { UserDetails } from '@repo/mcp-common/src/durable-objects/user_details.do'
 2 | import type { AuditlogMCP } from './auditlogs.app'
 3 | 
 4 | export interface Env {
 5 | 	OAUTH_KV: KVNamespace
 6 | 	ENVIRONMENT: 'development' | 'staging' | 'production'
 7 | 	MCP_SERVER_NAME: string
 8 | 	MCP_SERVER_VERSION: string
 9 | 	CLOUDFLARE_ACCESS_TOKEN: string
10 | 	CLOUDFLARE_CLIENT_ID: string
11 | 	CLOUDFLARE_CLIENT_SECRET: string
12 | 	MCP_OBJECT: DurableObjectNamespace<AuditlogMCP>
13 | 	USER_DETAILS: DurableObjectNamespace<UserDetails>
14 | 	MCP_METRICS: AnalyticsEngineDataset
15 | 	DEV_DISABLE_OAUTH: string
16 | 	DEV_CLOUDFLARE_API_TOKEN: string
17 | 	DEV_CLOUDFLARE_EMAIL: string
18 | }
19 | 
```

--------------------------------------------------------------------------------
/packages/eslint-config/package.json:
--------------------------------------------------------------------------------

```json
 1 | {
 2 | 	"name": "@repo/eslint-config",
 3 | 	"version": "0.1.36",
 4 | 	"private": true,
 5 | 	"sideEffects": false,
 6 | 	"files": [
 7 | 		"remix.cjs",
 8 | 		"default.cjs"
 9 | 	],
10 | 	"devDependencies": {
11 | 		"@types/eslint": "8.56.10",
12 | 		"@types/node": "22.14.1",
13 | 		"@typescript-eslint/eslint-plugin": "7.18.0",
14 | 		"@typescript-eslint/parser": "7.18.0",
15 | 		"eslint": "8.57.0",
16 | 		"eslint-config-prettier": "9.1.0",
17 | 		"eslint-config-turbo": "2.4.2",
18 | 		"eslint-import-resolver-typescript": "3.8.3",
19 | 		"eslint-plugin-import": "2.31.0",
20 | 		"eslint-plugin-only-warn": "1.1.0",
21 | 		"eslint-plugin-unused-imports": "3.2.0",
22 | 		"typescript": "5.5.4",
23 | 		"vitest": "3.0.9"
24 | 	}
25 | }
26 | 
```

--------------------------------------------------------------------------------
/packages/mcp-common/src/mcp-error.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import type { ContentfulStatusCode } from 'hono/utils/http-status'
 2 | 
 3 | export class McpError extends Error {
 4 | 	public code: ContentfulStatusCode
 5 | 	public reportToSentry: boolean
 6 | 	// error message for internal use
 7 | 	public internalMessage?: string
 8 | 	public cause?: Error
 9 | 	constructor(
10 | 		message: string,
11 | 		code: ContentfulStatusCode,
12 | 		opts: {
13 | 			reportToSentry: boolean
14 | 			internalMessage?: string
15 | 			cause?: Error
16 | 		} = { reportToSentry: false }
17 | 	) {
18 | 		super(message)
19 | 		this.code = code
20 | 		this.name = 'MCPError'
21 | 		this.reportToSentry = opts.reportToSentry
22 | 		this.internalMessage = opts.internalMessage
23 | 		this.cause = opts.cause
24 | 	}
25 | }
26 | 
```

--------------------------------------------------------------------------------
/apps/sandbox-container/server/utils.ts:
--------------------------------------------------------------------------------

```typescript
 1 | export async function fileToBase64(blob: Blob): Promise<string> {
 2 | 	// Use ArrayBuffer instead of text() for binary data
 3 | 	const arrayBuffer = await blob.arrayBuffer()
 4 | 	const byteArray = new Uint8Array(arrayBuffer)
 5 | 
 6 | 	// Convert byte array to base64 string
 7 | 	let binary = ''
 8 | 	byteArray.forEach((byte) => {
 9 | 		binary += String.fromCharCode(byte)
10 | 	})
11 | 
12 | 	// Apply base64 encoding
13 | 	return btoa(binary)
14 | }
15 | 
16 | // Used for file related tool calls in case the llm sends a full resource URI
17 | export async function stripProtocolFromFilePath(path: string): Promise<string> {
18 | 	return path.startsWith('file://') ? path.replace('file://', '') : path
19 | }
20 | 
```

--------------------------------------------------------------------------------
/.github/actions/setup/action.yml:
--------------------------------------------------------------------------------

```yaml
 1 | name: 'Setup Node.js Environment'
 2 | description: 'Install pnpm, Node.js, and project dependencies'
 3 | 
 4 | inputs:
 5 |   node-version:
 6 |     description: 'Node.js version to use'
 7 |     required: false
 8 |     default: '22'
 9 | 
10 | runs:
11 |   using: "composite"
12 |   steps:
13 |     - name: Install pnpm
14 |       # note: version is inferred from the packageManager field in package.json
15 |       uses: pnpm/action-setup@v4
16 | 
17 |     - name: Use Node.js
18 |       uses: actions/setup-node@v4
19 |       with:
20 |         node-version: ${{ inputs.node-version }}
21 |         cache: 'pnpm'
22 | 
23 |     - name: Install dependencies
24 |       shell: bash
25 |       run: pnpm install --frozen-lockfile --child-concurrency=10
26 | 
```

--------------------------------------------------------------------------------
/apps/demo-day/package.json:
--------------------------------------------------------------------------------

```json
 1 | {
 2 | 	"name": "demo-day",
 3 | 	"version": "0.1.6",
 4 | 	"private": true,
 5 | 	"scripts": {
 6 | 		"check:types": "run-tsc",
 7 | 		"deploy": "run-wrangler-deploy",
 8 | 		"dev": "wrangler dev",
 9 | 		"start": "wrangler dev",
10 | 		"types": "wrangler types --include-env=false",
11 | 		"test": "vitest run"
12 | 	},
13 | 	"dependencies": {
14 | 		"@modelcontextprotocol/sdk": "1.18.2",
15 | 		"@repo/mcp-common": "workspace:*",
16 | 		"@repo/mcp-observability": "workspace:*",
17 | 		"agents": "0.2.7",
18 | 		"zod": "3.24.2"
19 | 	},
20 | 	"devDependencies": {
21 | 		"@cloudflare/vitest-pool-workers": "0.8.14",
22 | 		"@types/node": "22.14.1",
23 | 		"prettier": "3.5.3",
24 | 		"typescript": "5.5.4",
25 | 		"vitest": "3.0.9",
26 | 		"wrangler": "4.10.0"
27 | 	}
28 | }
29 | 
```

--------------------------------------------------------------------------------
/packages/eval-tools/package.json:
--------------------------------------------------------------------------------

```json
 1 | {
 2 | 	"name": "@repo/eval-tools",
 3 | 	"version": "0.32.3",
 4 | 	"private": true,
 5 | 	"sideEffects": false,
 6 | 	"type": "module",
 7 | 	"scripts": {
 8 | 		"types": "wrangler types --include-env=false"
 9 | 	},
10 | 	"directories": {
11 | 		"bin": "bin"
12 | 	},
13 | 	"dependencies": {
14 | 		"@ai-sdk/anthropic": "1.2.11",
15 | 		"@ai-sdk/google": "1.2.17",
16 | 		"@ai-sdk/openai": "1.3.20",
17 | 		"@cloudflare/vitest-pool-workers": "0.8.14",
18 | 		"agents": "0.2.7",
19 | 		"ai": "4.3.10",
20 | 		"ai-gateway-provider": "0.0.6",
21 | 		"workers-ai-provider": "0.3.0",
22 | 		"wrangler": "4.10.0",
23 | 		"zod": "3.24.2"
24 | 	},
25 | 	"devDependencies": {
26 | 		"@repo/typescript-config": "workspace:*",
27 | 		"@types/node": "22.14.1",
28 | 		"vitest-evals": "0.1.4"
29 | 	}
30 | }
31 | 
```

--------------------------------------------------------------------------------
/packages/mcp-common/src/api-handler.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import type { McpAgent } from 'agents/mcp'
 2 | 
 3 | // Support both SSE and Streamable HTTP
 4 | export function createApiHandler<
 5 | 	T extends typeof McpAgent<unknown, unknown, Record<string, unknown>>,
 6 | >(agent: T, opts?: { binding?: string }) {
 7 | 	return {
 8 | 		fetch: (req: Request, env: unknown, ctx: ExecutionContext) => {
 9 | 			const url = new URL(req.url)
10 | 			if (url.pathname === '/sse' || url.pathname === '/sse/message') {
11 | 				return agent.serveSSE('/sse', { binding: opts?.binding }).fetch(req, env, ctx)
12 | 			}
13 | 			if (url.pathname === '/mcp') {
14 | 				return agent.serve('/mcp', { binding: opts?.binding }).fetch(req, env, ctx)
15 | 			}
16 | 			return new Response('Not found', { status: 404 })
17 | 		},
18 | 	}
19 | }
20 | 
```

--------------------------------------------------------------------------------
/apps/workers-builds/src/workers-builds.context.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import type { UserDetails } from '@repo/mcp-common/src/durable-objects/user_details.do'
 2 | import type { BuildsMCP } from './workers-builds.app'
 3 | 
 4 | export interface Env {
 5 | 	OAUTH_KV: KVNamespace
 6 | 	ENVIRONMENT: 'development' | 'staging' | 'production'
 7 | 	MCP_SERVER_NAME: string
 8 | 	MCP_SERVER_VERSION: string
 9 | 	CLOUDFLARE_CLIENT_ID: string
10 | 	CLOUDFLARE_CLIENT_SECRET: string
11 | 	MCP_OBJECT: DurableObjectNamespace<BuildsMCP>
12 | 	USER_DETAILS: DurableObjectNamespace<UserDetails>
13 | 	MCP_METRICS: AnalyticsEngineDataset
14 | 	SENTRY_ACCESS_CLIENT_ID: string
15 | 	SENTRY_ACCESS_CLIENT_SECRET: string
16 | 	GIT_HASH: string
17 | 	SENTRY_DSN: string
18 | 	DEV_DISABLE_OAUTH: string
19 | 	DEV_CLOUDFLARE_API_TOKEN: string
20 | 	DEV_CLOUDFLARE_EMAIL: string
21 | }
22 | 
```

--------------------------------------------------------------------------------
/apps/dns-analytics/src/dns-analytics.context.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import type { UserDetails } from '@repo/mcp-common/src/durable-objects/user_details.do'
 2 | import type { DNSAnalyticsMCP } from './dns-analytics.app'
 3 | 
 4 | export interface Env {
 5 | 	OAUTH_KV: KVNamespace
 6 | 	ENVIRONMENT: 'development' | 'staging' | 'production'
 7 | 	MCP_SERVER_NAME: string
 8 | 	MCP_SERVER_VERSION: string
 9 | 	CLOUDFLARE_CLIENT_ID: string
10 | 	CLOUDFLARE_CLIENT_SECRET: string
11 | 	MCP_OBJECT: DurableObjectNamespace<DNSAnalyticsMCP>
12 | 	USER_DETAILS: DurableObjectNamespace<UserDetails>
13 | 	MCP_METRICS: AnalyticsEngineDataset
14 | 	SENTRY_ACCESS_CLIENT_ID: string
15 | 	SENTRY_ACCESS_CLIENT_SECRET: string
16 | 	GIT_HASH: string
17 | 	SENTRY_DSN: string
18 | 	DEV_DISABLE_OAUTH: string
19 | 	DEV_CLOUDFLARE_API_TOKEN: string
20 | 	DEV_CLOUDFLARE_EMAIL: string
21 | }
22 | 
```

--------------------------------------------------------------------------------
/apps/dex-analysis/src/dex-analysis.context.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import type { UserDetails } from '@repo/mcp-common/src/durable-objects/user_details.do'
 2 | import type { CloudflareDEXMCP } from './dex-analysis.app'
 3 | import type { WarpDiagReader } from './warp_diag_reader'
 4 | 
 5 | export interface Env {
 6 | 	OAUTH_KV: KVNamespace
 7 | 	ENVIRONMENT: 'development' | 'staging' | 'production'
 8 | 	MCP_SERVER_NAME: string
 9 | 	MCP_SERVER_VERSION: string
10 | 	CLOUDFLARE_CLIENT_ID: string
11 | 	CLOUDFLARE_CLIENT_SECRET: string
12 | 	MCP_OBJECT: DurableObjectNamespace<CloudflareDEXMCP>
13 | 	USER_DETAILS: DurableObjectNamespace<UserDetails>
14 | 	WARP_DIAG_READER: DurableObjectNamespace<WarpDiagReader>
15 | 	MCP_METRICS: AnalyticsEngineDataset
16 | 	DEV_DISABLE_OAUTH: string
17 | 	DEV_CLOUDFLARE_API_TOKEN: string
18 | 	DEV_CLOUDFLARE_EMAIL: string
19 | }
20 | 
```

--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------

```json
 1 | {
 2 | 	"editor.detectIndentation": true,
 3 | 	// https://arktype.io/docs/intro/setup#settings
 4 | 	// allow autocomplete for ArkType expressions like "string | num"
 5 | 	"editor.quickSuggestions": {
 6 | 		"strings": "on"
 7 | 	},
 8 | 	// prioritize ArkType's "type" for autoimports
 9 | 	"typescript.preferences.autoImportSpecifierExcludeRegexes": ["^(node:)?os$"],
10 | 	"typescript.preferences.autoImportFileExcludePatterns": ["**/vitest/dist/**"],
11 | 	"typescript.preferences.importModuleSpecifier": "non-relative",
12 | 	"files.associations": {
13 | 		"**/packages/tools/bin/*": "shellscript",
14 | 		"**/*.css": "tailwindcss",
15 | 		"turbo.json": "jsonc",
16 | 		"**/packages/typescript-config/*.json": "jsonc"
17 | 	},
18 | 	"eslint.workingDirectories": [
19 | 		{
20 | 			"mode": "auto"
21 | 		}
22 | 	]
23 | }
24 | 
```

--------------------------------------------------------------------------------
/apps/sandbox-container/server/sandbox.server.context.ts:
--------------------------------------------------------------------------------

```typescript
 1 | import type { ContainerManager, ContainerMcpAgent, UserContainer } from './sandbox.server.app'
 2 | 
 3 | export interface Env {
 4 | 	OAUTH_KV: KVNamespace
 5 | 	CLOUDFLARE_CLIENT_ID: string
 6 | 	CLOUDFLARE_CLIENT_SECRET: string
 7 | 	ENVIRONMENT: 'dev'
 8 | 	MCP_SERVER_NAME: string
 9 | 	MCP_SERVER_VERSION: string
10 | 	OPENAI_API_KEY: string
11 | 	AI_GATEWAY_TOKEN: string
12 | 	CLOUDFLARE_ACCOUNT_ID: string
13 | 	AI_GATEWAY_ID: string
14 | 	MCP_OBJECT: DurableObjectNamespace<ContainerMcpAgent>
15 | 	CONTAINER_MANAGER: DurableObjectNamespace<ContainerManager>
16 | 	USER_CONTAINER: DurableObjectNamespace<UserContainer>
17 | 	USER_BLOCKLIST: KVNamespace
18 | 	MCP_METRICS: AnalyticsEngineDataset
19 | 	AI: Ai
20 | 	DEV_DISABLE_OAUTH: string
21 | 	DEV_CLOUDFLARE_API_TOKEN: string
22 | 	DEV_CLOUDFLARE_EMAIL: string
23 | }
24 | 
```

--------------------------------------------------------------------------------
/packages/typescript-config/workers.json:
--------------------------------------------------------------------------------

```json
 1 | {
 2 | 	"$schema": "https://json.schemastore.org/tsconfig",
 3 | 	"include": [
 4 | 		"${configDir}/worker-configuration.d.ts",
 5 | 		"${configDir}/env.d.ts",
 6 | 		"${configDir}/**/*.ts",
 7 | 		"${configDir}/**/*.tsx"
 8 | 	],
 9 | 	"exclude": ["${configDir}/node_modules/", "${configDir}/dist/"],
10 | 	"compilerOptions": {
11 | 		"target": "es2022",
12 | 		"lib": ["es2022"],
13 | 		"jsx": "react",
14 | 		"module": "es2022",
15 | 		"moduleResolution": "bundler",
16 | 		"types": ["./worker-configuration.d.ts", "@cloudflare/vitest-pool-workers", "@types/node"],
17 | 		"resolveJsonModule": true,
18 | 		"allowJs": true,
19 | 		"checkJs": false,
20 | 		"noEmit": true,
21 | 		"isolatedModules": true,
22 | 		"allowSyntheticDefaultImports": true,
23 | 		"forceConsistentCasingInFileNames": true,
24 | 		"strict": true,
25 | 		"skipLibCheck": true
26 | 	}
27 | }
28 | 
```
Page 1/27FirstPrevNextLast