Content
# MCP over Websockets on Cloudflare Durable Objects
This is a proof of concept Model Context Protocol (MCP) server running on a Cloudflare Durable Object.
The agent connects to the DO Server via a proxy using the JSON stdio transport, which is then forwarded to the DO Server via Websockets.
Agent <-stdio-> Proxy <-ws-> DO Server
## Usage
- Deploy to CloudFlare with `npm run deploy`.
- Run the proxy server with `npx tsx src/client.ts wss://my-durable-object.foo.workers.dev`.
- Use mcp inspector to test the server `npx -y @modelcontextprotocol/inspector npx -y tsx src/client.ts wss://...`