Cloudflare Remote MCP Server
在 Cloudflare 上构建远程 MCP 服务器(无需身份验证)
此示例允许你在 Cloudflare Workers 上部署一个无需身份验证的远程 MCP 服务器。
开始使用:
这会将你的 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 的 init() 方法中使用 this.server.tool(...) 定义每个工具。
连接到 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 proxy 从本地 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,你应该就能看到这些工具变为可用了。
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
Cloudflare Workers MCP server: ai-gateway
9 remote MCP servers on Cloudflare Workers for AI agents. Free tier + Pro API keys.
Cloudflare Workers MCP server: ai-model-router
Cloudflare Workers MCP server: ai-eval
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceDeploy a remote MCP server on Cloudflare Workers without authentication, enabling integration with AI Playground or Claude Desktop.-
- FlicenseNot gradedqualityDmaintenanceDeploy a remote MCP server on Cloudflare Workers without authentication, enabling integration with AI Playground and Claude Desktop.-
- FlicenseNot gradedqualityDmaintenanceDeploy a remote MCP server on Cloudflare Workers without authentication, enabling integration with AI Playground and Claude Desktop.-
- FlicenseNot gradedqualityDmaintenanceDeploy a remote MCP server on Cloudflare Workers without authentication, enabling integration with AI clients like Cloudflare AI Playground and Claude Desktop.-