Demonstrates a Model Context Protocol (MCP) client/server architecture over WebSockets using Cloudflare Workers and Durable Objects for state management.
This project provides a complete reference implementation of the Model Context Protocol (MCP) over WebSockets. It showcases a full client-server architecture, persistent stateful sessions using Durable Objects, bidirectional real-time communication, and deployment via Cloudflare Workers. It serves as a valuable example for implementing MCP with WebSocket transport, highlighting the advantages of reduced latency, bidirectional communication, and stateful sessions.