内容
# MCP over Websockets on Cloudflare Durable Objects
这是一个在 Cloudflare Durable Object 上运行的 Model Context Protocol (MCP) 服务器的概念验证。
代理通过 JSON stdio 传输连接到 DO Server,然后通过 Websockets 转发到 DO Server。
Agent <-stdio-> Proxy <-ws-> DO Server
## 使用方法
- 使用 `npm run deploy` 部署到 CloudFlare。
- 使用 `npx tsx src/client.ts wss://my-durable-object.foo.workers.dev` 运行代理服务器。
- 使用 mcp inspector 测试服务器 `npx -y @modelcontextprotocol/inspector npx -y tsx src/client.ts wss://...`