Math Demo icon

Math Demo

Demonstrates a Model Context Protocol (MCP) client/server architecture over WebSockets using Cloudflare Workers and Durable Objects for state management.

About

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.

Key Features

  • Persistent stateful sessions via Durable Objects
  • 1 GitHub stars
  • Complete MCP client-server architecture
  • Cloudflare Workers deployment
  • Bidirectional real-time communication over WebSockets
  • Tool discovery and invocation

Use Cases

  • Creating stateful MCP services on Cloudflare Workers
  • Building real-time collaborative applications
  • Implementing interactive agents with quick responses
Craft Better Prompts with AnyPrompt