Cloudflare Community MCP Server
Cloudflare Community 论坛 ↗ 的 MCP server 让 AI agent 可以搜索话题、阅读帖子、查找用户和过滤内容。
该服务器由官方 Discourse MCP server @discourse/mcp ↗ 驱动。
安装
终端窗口
npx @discourse/mcp@latest
配置
OpenCode
在 ~/.config/opencode/opencode.jsonc 的 "mcp" 块内添加:
"discourse": {
"type": "local",
"command": ["npx", "-y", "@discourse/mcp@latest"],
"enabled": true
}
Claude Desktop
添加到 claude_desktop_config.json:
{
"mcpServers": {
"discourse": {
"command": "npx",
"args": ["-y", "@discourse/mcp@latest"]
}
}
}
Cursor
添加到项目根目录的 .cursor/mcp.json:
{
"mcpServers": {
"discourse": {
"command": "npx",
"args": ["-y", "@discourse/mcp@latest"]
}
}
}
连接到 Cloudflare Community
配置好客户端后,使用 discourse_select_site 工具连接到:
https://community.cloudflare.com
读取公开数据不需要 API 密钥。只有写操作(发帖、版主操作)才需要 API 密钥。
可用工具
| 工具 | 描述 |
|---|---|
| discourse_select_site | 连接到 community.cloudflare.com |
| discourse_search | 跨话题和帖子的全文搜索 |
| discourse_filter_topics | 按类别、标签、状态、日期过滤 |
| discourse_read_topic | 读取话题的帖子和元数据 |
| discourse_read_post | 读取特定帖子 |
| discourse_get_user | 查找用户的资料 |
| discourse_list_user_posts | 列出某用户的帖子 |
使用示例
连接后,你可以让 AI 助手做这些事情:
- “Search the Cloudflare community for topics about Error 522”
- “Find unanswered topics in the SSL category from the last 3 days”
- “Read topic 42325 and summarize the issue”
- “Show me recent replies from user sandro”
机器可读的发现
AI agent 可以通过 community.cloudflare.com 上的这些端点自动发现 MCP server:
- /.well-known/mcp.json ↗ — MCP Server Card
- /llms.txt ↗ — 包含服务器信息和安装说明的 LLMs.txt
- /.well-known/agent.json ↗ — A2A Agent Card