Cloudflare

Provides access to Cloudflare API endpoints via codemode MCP server with a dedicated HTTP endpoint.
  • typescript

24

GitHub Stars

typescript

Language

3 months ago

First Indexed

3 weeks ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs

You have a compact MCP server that lets you query the complete Cloudflare API using codemode. It keeps the full Cloudflare OpenAPI spec on the server and only returns the results you need, helping you avoid exposing massive context to the agent while still giving you flexible access to Cloudflare endpoints.

How to use

Use this MCP server with your MCP client to locate endpoints in the Cloudflare API and then perform API calls. You authenticate with a Cloudflare API token, connect to the MCP URL, and leverage the two built-in tools to search for endpoints and execute API requests.

Steps you will follow

  • Add the MCP server to your client using your token
  • Search for relevant Cloudflare endpoints
  • Execute API calls against the discovered endpoints and view responses

Code-assisted workflow you can run in your client environment includes two key blocks. First, search for endpoints. Then, execute a chosen API call against Cloudflare.

// 1. Search for endpoints
search({
  code: `async () => {
    const results = [];
    for (const [path, methods] of Object.entries(spec.paths)) {
      for (const [method, op] of Object.entries(methods)) {
        if (op.tags?.some(t => t.toLowerCase() === 'workers')) {
          results.push({ method: method.toUpperCase(), path, summary: op.summary });
        }
      }
    }
    return results;
  }`,
});

How to install

Prerequisites: you need Node.js and npm installed on your system.

Install dependencies and deploy the MCP server codebase locally if you want to run a local instance, or use the provided remote server for Cloudflare API access.

Install dependencies and deploy locally (example flow seen in the source):

npm i
npm run deploy

Additional notes

Configuration and tokens

  • Create a Cloudflare API token with the permissions you need.
  • Set the token in your environment when configuring your MCP client.

Connection details

Security and usage tips

  • The server keeps the Cloudflare OpenAPI spec on the server and only returns results you request, reducing context leakage.
  • Protect your API token and only grant the minimal permissions needed for your tasks.

Available tools

search

Write JavaScript code to query spec.paths and identify endpoints, returning a list of matching operations.

execute

Write JavaScript code to call cloudflare.request() with the discovered endpoints and return the API response.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational