MCP ExplorerExplorer

Cf Mcp Durable Object

@gingerhendrixon a year ago
31 MIT
FreeCommunity
AI Systems
MCP over Websockets on Cloudflare Durable Objects

Overview

What is Cf Mcp Durable Object

cf-mcp-durable-object is a proof of concept Model Context Protocol (MCP) server that operates on Cloudflare Durable Objects, utilizing Websockets for communication.

Use cases

Use cases include collaborative document editing, multiplayer online games, and real-time data dashboards where multiple users need to interact with shared data seamlessly.

How to use

To use cf-mcp-durable-object, deploy it to Cloudflare using the command ‘npm run deploy’. Then, run the proxy server with ‘npx tsx src/client.ts wss://my-durable-object.foo.workers.dev’. You can test the server using the MCP inspector with ‘npx -y @modelcontextprotocol/inspector npx -y tsx src/client.ts wss://…’.

Key features

Key features include the use of Websockets for real-time communication, integration with Cloudflare Durable Objects for persistence, and a JSON stdio transport for agent-server communication.

Where to use

cf-mcp-durable-object can be used in applications requiring real-time data synchronization, such as collaborative tools, gaming, and any scenario where maintaining state across sessions is crucial.

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://...

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers