Remote MCP Server on Cloudflare
在 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
Related MCP Connectors
Zero-dependency Cloudflare Worker gateway turning websites and REST APIs into MCP tools.
91Remote streamable-HTTP MCP server running on a single Cloudflare Worker. Your assistant gets live Airbnb, Amazon, Booking.com, Google Flights, Maps and Reddit data, social search on X, Instagram and TikTok, the Meta Ad Library, and image/video generation without any keys. Connect your own accounts to let it send WhatsApp or Telegram messages, work an IMAP inbox, manage Meta Ads campaigns and publish to X and LinkedIn. OAuth 2.1 with PKCE; stored credentials are AES-256-GCM encrypted.
Cloudflare Workers MCP server: agent-workflow-engine
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceDeploys a stateless, authentication-free remote MCP server on Cloudflare Workers, enabling custom tool registration and seamless connection from clients like Cloudflare AI Playground or Claude Desktop via mcp-remote.-
- FlicenseNot gradedqualityBmaintenanceDeploys a stateless remote MCP server on Cloudflare Workers without authentication, enabling MCP tool calls from clients like Claude Desktop and Cloudflare AI Playground.-
- FlicenseNot gradedqualityCmaintenanceDeploys a stateless remote MCP server on Cloudflare Workers without authentication, allowing custom tools to be registered and used from clients like Claude Desktop and the Cloudflare AI Playground.-
- FlicenseNot gradedqualityCmaintenanceDeploys a stateless remote MCP server on Cloudflare Workers without authentication. Enables tool use from clients like Claude Desktop and AI Playground.-