Skip to main content
Glama
cloudflare

mcp-server-cloudflare

Official
by cloudflare

Cloudflare MCP 服务器

模型上下文协议 (MCP) 是一种用于管理大语言模型 (LLM) 与外部系统之间上下文的标准化新协议。在本仓库中,您可以找到多个 MCP 服务器,它们允许您从 MCP 客户端(例如 Cursor、Claude)连接到 Cloudflare 的服务,并使用自然语言通过您的 Cloudflare 账户完成任务。

这些 MCP 服务器允许您的 MCP 客户端读取您账户的配置、处理信息、根据数据提出建议,甚至为您执行这些建议的更改。所有这些操作都可以跨越 Cloudflare 的众多服务进行,包括应用程序开发、安全和性能。

它们支持通过 /mcp 进行 streamable-http 传输,以及通过 /sse 进行 sse 传输(已弃用)。

本仓库包含以下服务器:

服务器名称

描述

服务器 URL

文档服务器

获取 Cloudflare 的最新参考信息

https://docs.mcp.cloudflare.com/mcp

Workers 绑定服务器

使用存储、AI 和计算原语构建 Workers 应用程序

https://bindings.mcp.cloudflare.com/mcp

Workers 构建服务器

获取洞察并管理您的 Cloudflare Workers 构建

https://builds.mcp.cloudflare.com/mcp

可观测性服务器

调试并深入了解您的应用程序日志和分析

https://observability.mcp.cloudflare.com/mcp

Radar 服务器

获取全球互联网流量洞察、趋势、URL 扫描及其他实用工具

https://radar.mcp.cloudflare.com/mcp

容器服务器

启动沙盒开发环境

https://containers.mcp.cloudflare.com/mcp

浏览器渲染服务器

获取网页、将其转换为 Markdown 并进行截图

https://browser.mcp.cloudflare.com/mcp

Logpush 服务器

获取 Logpush 作业健康状况的快速摘要

https://logs.mcp.cloudflare.com/mcp

AI Gateway 服务器

搜索您的日志,获取有关提示词和响应的详细信息

https://ai-gateway.mcp.cloudflare.com/mcp

审计日志服务器

查询审计日志并生成报告以供审查

https://auditlogs.mcp.cloudflare.com/mcp

DNS 分析服务器

优化 DNS 性能并根据当前设置调试问题

https://dns-analytics.mcp.cloudflare.com/mcp

数字体验监控服务器

快速了解您组织的关键应用程序

https://dex.mcp.cloudflare.com/mcp

Cloudflare One CASB 服务器

快速识别 SaaS 应用程序的任何安全配置错误,以保护用户和数据

https://casb.mcp.cloudflare.com/mcp

GraphQL 服务器

使用 Cloudflare 的 GraphQL API 获取分析数据

https://graphql.mcp.cloudflare.com/mcp

您应该使用哪个 Cloudflare MCP 服务器?

Cloudflare 提供两类 MCP 服务器:

  • 代码模式服务器 (mcp.cloudflare.com),位于 cloudflare/mcp: 当您希望通过代码执行广泛访问 Cloudflare API 时,这是最佳选择。

  • 特定领域服务器 (*.mcp.cloudflare.com),位于本仓库中: 当您需要针对特定 Cloudflare 产品区域的精选、类型化工具时,这是最佳选择。

何时使用哪种服务器?

在以下情况使用代码模式服务器:

  • 您需要跨多个 Cloudflare 产品进行广泛的 API 覆盖

  • 您更喜欢一套较小的通用工具

  • 您的工作流程更适合通过代码执行来完成

在以下情况使用本仓库中的特定领域服务器:

  • 您需要针对特定产品区域的专用工具

  • 您需要更具引导性、类型化的交互

  • 您主要在某个 Cloudflare 领域内工作,例如可观测性、绑定、Radar 或浏览器渲染

在此处了解有关代码模式服务器的更多信息:cloudflare/mcp。

Related MCP server: Cloudflare MCP Server

从任何 MCP 客户端访问远程 MCP 服务器

如果您的 MCP 客户端对远程 MCP 服务器提供了一流的支持,客户端将提供一种直接在其界面内接受服务器 URL 的方式(例如 Cloudflare AI Playground)。

如果您的客户端尚不支持远程 MCP 服务器,您需要使用 mcp-remote (https://www.npmjs.com/package/mcp-remote) 设置其相应的配置文件,以指定您的客户端可以访问哪些服务器。

{
	"mcpServers": {
		"cloudflare-observability": {
			"command": "npx",
			"args": ["mcp-remote", "https://observability.mcp.cloudflare.com/mcp"]
		},
		"cloudflare-bindings": {
			"command": "npx",
			"args": ["mcp-remote", "https://bindings.mcp.cloudflare.com/mcp"]
		}
	}
}

从 OpenAI Responses API 使用 Cloudflare 的 MCP 服务器

要将 Cloudflare 的 MCP 服务器之一与 OpenAI 的 Responses API 一起使用,您需要为 Responses API 提供一个具有该特定 MCP 服务器所需范围(权限)的 API 令牌。

例如,要将 浏览器渲染 MCP 服务器 与 OpenAI 一起使用,请在 Cloudflare 仪表板此处创建一个 API 令牌,并授予以下权限:

需要访问更多 Cloudflare 工具?

我们正在继续向此远程 MCP 服务器仓库添加更多功能。如果您想留下反馈、提交错误或提出功能请求,请在此仓库中开启一个 issue。

故障排除

“Claude 的响应被中断了……”

如果您看到此消息,Claude 很可能达到了其上下文长度限制并在回复中途停止。这种情况最常发生在触发许多链式工具调用的服务器上,例如可观测性服务器。

为了减少遇到此问题的可能性:

  • 尽量具体,保持查询简洁。

  • 如果单个请求调用了多个工具,请尝试将其拆分为几个较小的工具调用,以保持响应简短。

付费功能

某些功能可能需要付费的 Cloudflare Workers 计划。请确保您的 Cloudflare 账户拥有您打算使用的功能所需的订阅级别。

贡献

有兴趣贡献代码并在本地运行此服务器吗?请参阅 CONTRIBUTING.md 以开始。

Available Tools

2 tools
migrate_pages_to_workers_guideA
Read-only

ALWAYS read this guide before migrating Pages projects to Workers.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true; description adds no additional behavioral context beyond the instruction to read the guide, which is sufficient for a static document.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence, front-loaded, no unnecessary words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-parameter guide without output schema, the description adequately conveys the tool's purpose and usage context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

No parameters exist, so schema coverage is 100%. Description does not need to add parameter details; baseline 4 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool is a guide to be read before migrating Pages to Workers, distinguishing it from the sibling search tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicitly states when to use the tool (before migration), though no alternatives or exclusions are discussed.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_cloudflare_documentationA
Read-only

Search the Cloudflare documentation.

	This tool should be used 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 Run
	- 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.
	
ParametersJSON Schema
NameRequiredDescriptionDefault
queryYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultsYes

TDQS

A4.1/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations include readOnlyHint=true, so the read-only nature is known. The description adds that results are 'semantically similar chunks', which gives insight into the behavior. No contradictions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two paragraphs; the first sentence is concise, but the product list in the second paragraph is lengthy. Could be more concise, but overall efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (one parameter, read-only search), the description covers purpose, usage, and return format. Output schema exists, so return values are explained elsewhere. Adequately complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It lists topics to search, implying the query is a search string, but adds no details about format, length, or constraints. With only one parameter, it's minimally acceptable.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Search the Cloudflare documentation' and lists many product areas. The verb 'search' and resource 'Cloudflare documentation' are specific. The sibling tool 'migrate_pages_to_workers_guide' is clearly different, so no confusion.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description says it 'should be used to answer any question about Cloudflare products or features', providing clear usage context. It does not explicitly exclude cases where more specific tools might be better, but given only one sibling, it's adequate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 2 tool updatesv1.0.4
    • Changedmigrate_pages_to_workers_guide1 field changed
      • changedInput schema / $schema
        Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • Changedsearch_cloudflare_documentation2 fields changed
      • changedInput schema / $schema
        Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
      • changedOutput schema / $schema
        Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. 1 tool updatev1.0.3
    • Changedsearch_cloudflare_documentation1 field changed
      • changedOutput schema / (root)
        Previous value: -nullNew value: +{
        +  "$schema": "http://json-schema.org/draft-07/schema#",
        +  "additionalProperties": false,
        +  "properties": {
        +    "results": {
        +      "items": {
        +        "additionalProperties": false,
        +        "properties": {
        +          "id": {
        +            "description": "Source file ID",
        +            "type": "string"
        +          },
        +          "similarity": {
        +            "description": "Similarity score from AI Search",
        +            "type": "number"
        +          },
        +          "text": {
        +            "description": "Matching documentation chunk text",
        +            "type": "string"
        +          },
        +          "title": {
        +            "description": "Documentation page title",
        +            "type": "string"
        +          },
        +          "url": {
        +            "description": "Developer documentation URL",
        +            "type": "string"
        +          }
        +        },
        +        "required": [
        +          "similarity",
        +          "id",
        +          "url",
        +          "title",
        +          "text"
        +        ],
        +        "type": "object"
        +      },
        +      "type": "array"
        +    }
        +  },
        +  "required": [
        +    "results"
        +  ],
        +  "type": "object"
        +}
  3. 2 tool updatesv1.0.2
    • Changedmigrate_pages_to_workers_guide1 field changed
      • removedInput schema / additionalProperties
        Removed value: -false
    • Changedsearch_cloudflare_documentation1 field changed
      • removedInput schema / additionalProperties
        Removed value: -false
  4. 2 tool updates
    • First observedmigrate_pages_to_workers_guide
    • First observedsearch_cloudflare_documentation

TDQS

A3.9/5.0

Scored across 2 tools

Disambiguation5/5

The two tools have clearly distinct purposes: one for general documentation search and one specifically for migrating Pages to Workers. There is no overlap.

Naming Consistency4/5

Both tool names follow a verb_noun pattern in snake_case, with 'search_cloudflare_documentation' and 'migrate_pages_to_workers_guide', though the second is much longer.

Tool Count2/5

With only 2 tools, the server feels very thin for the broad domain of Cloudflare products. It likely needs more tools to be useful.

Completeness2/5

Only documentation search and a specific migration guide are provided. Many core Cloudflare operations (e.g., managing resources, troubleshooting) are missing, leading to significant gaps.

Maintenance

ActivityActive
ResponsivenessWithin a week

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    B
    maintenance
    A token-efficient MCP server that provides access to the entire Cloudflare API (2500+ endpoints) using a code execution pattern, enabling natural language management of Cloudflare services.
    3 npm
    950
    Apache 2.0
  • A
    license
    C
    quality
    D
    maintenance
    A high-performance MCP server providing AI assistants with read-only access to the Cloudflare ecosystem. Query your entire Cloudflare infrastructure using natural language through Claude, Cursor, or any MCP-compatible client.
    390
    5
    MIT