Cloudflare Remote MCP Server (Authless)
在 Cloudflare 上构建远程 MCP 服务器(无认证)
此示例允许你在 Cloudflare Workers 上部署一个无需认证的无状态远程 MCP 服务器。它实现了 MCP 2026-07-28 规范,同时与旧版客户端保持兼容,可用于普通工具调用。
开始使用:
这将把你的 MCP 服务器部署到类似这样的 URL:remote-mcp-server-authless.<your-account>.workers.dev/mcp
或者,你可以使用下面的命令行在本地机器上创建远程 MCP 服务器:
npm create cloudflare@latest -- my-mcp-server --template=cloudflare/ai/demos/remote-mcp-authlessRelated MCP server: remote-mcp-server-authless
自定义你的 MCP 服务器
要向 MCP 服务器添加你自己的工具,请在 src/index.ts 的 createServer() 函数中创建的 McpServer 上使用 server.registerTool(...) 注册每个工具。
连接到 Cloudflare AI Playground
你可以从 Cloudflare AI Playground 连接到你的 MCP 服务器,它是一个远程 MCP 客户端:
输入你部署的 MCP 服务器 URL(
remote-mcp-server-authless.<your-account>.workers.dev/mcp)现在你可以直接在 Playground 中使用你的 MCP 工具!
将 Claude Desktop 连接到你的 MCP 服务器
你也可以通过使用 mcp-remote 代理 从本地 MCP 客户端连接到你的远程 MCP 服务器。
要从 Claude Desktop 连接到你的 MCP 服务器,请按照 Anthropic 的快速入门 操作,然后在 Claude Desktop 中进入设置 > 开发者 > 编辑配置。
使用以下配置进行更新:
{
"mcpServers": {
"calculator": {
"command": "npx",
"args": [
"mcp-remote",
"http://localhost:8787/mcp" // or remote-mcp-server-authless.your-account.workers.dev/mcp
]
}
}
}重启 Claude,你应该会看到这些工具变为可用。
This server cannot be deployed
Maintenance
Related MCP Connectors
9 remote MCP servers on Cloudflare Workers for AI agents. Free tier + Pro API keys.
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
Cloudflare Workers MCP server: ai-model-router
Cloudflare Workers MCP server: agent-workflow-engine
Related MCP Servers
- FlicenseNot gradedqualityBmaintenanceEnables deployment of a stateless remote MCP server on Cloudflare Workers without authentication, allowing users to register custom tools and connect from clients like Cloudflare AI Playground and Claude Desktop.-
- FlicenseNot gradedqualityCmaintenanceEnables deploying a stateless remote MCP server on Cloudflare Workers without authentication, allowing MCP clients like Cloudflare AI Playground and Claude Desktop to connect and use registered tools.-
- FlicenseNot gradedqualityCmaintenanceEnables deployment of a stateless remote MCP server on Cloudflare Workers without authentication, allowing custom tool registration and connections from remote MCP clients.-
- FlicenseNot gradedqualityCmaintenanceEnables deploying a stateless remote MCP server on Cloudflare Workers without authentication, allowing custom tools to be called from remote MCP clients like Cloudflare AI Playground and Claude Desktop.-