Skip to content
Scalekit Docs

Cloudflare MCP

Vendor MCP3 toolsOAuth 2.1/DCRDeveloper ToolsAutomation

Connect to Cloudflare MCP to manage your Cloudflare account — execute API calls, search the OpenAPI spec, and interact with Workers, R2, D1, KV, and all...

Cloudflare MCP connector

  1. Terminal window
    npm install @scalekit-sdk/node

    Full SDK reference: Node.js | Python

  2. Add your Scalekit credentials to your .env file. Find values in app.scalekit.com > Developers > API Credentials.

    .env
    SCALEKIT_ENVIRONMENT_URL=<your-environment-url>
    SCALEKIT_CLIENT_ID=<your-client-id>
    SCALEKIT_CLIENT_SECRET=<your-client-secret>
  3. quickstart.ts
    import { ScalekitClient } from '@scalekit-sdk/node'
    import 'dotenv/config'
    const scalekit = new ScalekitClient(
    process.env.SCALEKIT_ENV_URL,
    process.env.SCALEKIT_CLIENT_ID,
    process.env.SCALEKIT_CLIENT_SECRET,
    )
    const actions = scalekit.actions
    const connector = 'cloudfaremcp'
    const identifier = 'user_123'
    // Generate an authorization link for the user
    const { link } = await actions.getAuthorizationLink({ connectionName: connector, identifier })
    console.log('Authorize Cloudflare MCP:', link)
    process.stdout.write('Press Enter after authorizing...')
    await new Promise(r => process.stdin.once('data', r))
    // Make your first call
    const result = await actions.executeTool({
    connector,
    identifier,
    toolName: 'cloudfaremcp_search',
    toolInput: { code: 'YOUR_CODE' },
    })
    console.log(result)

Connect this agent connector to let your agent:

  • Docs records — Search the Cloudflare documentation
  • Search records — Search the Cloudflare OpenAPI spec to discover API endpoints, request parameters, and response schemas
  • Execute records — Execute JavaScript code against the Cloudflare API using the cloudflare.request() helper

Use the exact tool names from the Tool list below when you call execute_tool. If you’re not sure which name to use, list the tools available for the current user first.

cloudfaremcp_docs#Search the Cloudflare documentation. Use this tool to answer any question about Cloudflare products or features, including Workers, Pages, R2, Images, Stream, D1, Durable Objects, KV, Workflows, Hyperdrive, Queues, AI Search, Workers AI, Vectorize, AI Gateway, Browser Rendering, Zero Trust, Access, Tunnel, Gateway, Browser Isolation, WARP, DDOS, Magic Transit, Magic WAN, CDN, Cache, DNS, Zaraz, Argo, Rulesets, Terraform, Account and Billing. Results are returned as semantically similar chunks to the query.1 param

Search the Cloudflare documentation. Use this tool to answer any question about Cloudflare products or features, including Workers, Pages, R2, Images, Stream, D1, Durable Objects, KV, Workflows, Hyperdrive, Queues, AI Search, Workers AI, Vectorize, AI Gateway, Browser Rendering, Zero Trust, Access, Tunnel, Gateway, Browser Isolation, WARP, DDOS, Magic Transit, Magic WAN, CDN, Cache, DNS, Zaraz, Argo, Rulesets, Terraform, Account and Billing. Results are returned as semantically similar chunks to the query.

NameTypeRequiredDescription
querystringrequiredCloudflare documentation search query.
cloudfaremcp_execute#Execute JavaScript code against the Cloudflare API using the `cloudflare.request()` helper. Use the search tool first to discover the right endpoint path and schema.2 params

Execute JavaScript code against the Cloudflare API using the `cloudflare.request()` helper. Use the search tool first to discover the right endpoint path and schema.

NameTypeRequiredDescription
codestringrequiredJavaScript async arrow function that calls `cloudflare.request()` to interact with the Cloudflare API.
account_idstringoptionalYour Cloudflare account ID. Auto-selected if you only have one account.