- Explore MCP Servers
- mcp-server-do
Mcp Server Do
What is Mcp Server Do
mcp-server-do is a server implementation that combines Server-Sent Events (SSE) with a Model Context Protocol (MCP) server using Durable Objects. It facilitates real-time communication between clients and servers.
Use cases
Use cases for mcp-server-do include building real-time messaging systems, implementing live data feeds, and creating interactive applications that require immediate updates from the server.
How to use
To use mcp-server-do, clone the repository, install dependencies with ‘npm install’, start the server using ‘npm start’ at ‘http://localhost:8787’, and run the MCP inspector with ‘npx @modelcontextprotocol/inspector’. Access the SSE endpoint at ‘http://localhost:8787/sse’.
Key features
Key features include a robust SSE transport layer, integration with the Model Context Protocol TypeScript SDK, and the ability to handle multiple simultaneous connections through Durable Objects.
Where to use
mcp-server-do can be used in web applications that require real-time data updates, such as chat applications, live notifications, and collaborative tools.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Overview
What is Mcp Server Do
mcp-server-do is a server implementation that combines Server-Sent Events (SSE) with a Model Context Protocol (MCP) server using Durable Objects. It facilitates real-time communication between clients and servers.
Use cases
Use cases for mcp-server-do include building real-time messaging systems, implementing live data feeds, and creating interactive applications that require immediate updates from the server.
How to use
To use mcp-server-do, clone the repository, install dependencies with ‘npm install’, start the server using ‘npm start’ at ‘http://localhost:8787’, and run the MCP inspector with ‘npx @modelcontextprotocol/inspector’. Access the SSE endpoint at ‘http://localhost:8787/sse’.
Key features
Key features include a robust SSE transport layer, integration with the Model Context Protocol TypeScript SDK, and the ability to handle multiple simultaneous connections through Durable Objects.
Where to use
mcp-server-do can be used in web applications that require real-time data updates, such as chat applications, live notifications, and collaborative tools.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Content
SSE + MCP Server + Durable Objects
- A SSE Transport layer that works with
@modelcontextprotocol/typescript-sdk(/src/sse.ts) - A MCP Server as a Durable Object (
/src/mcp-server-do.ts) - Steps to run it end-to-end
Run it
- Clone this repo
npm installnpm startto start the DO (athttp://localhost:8787)npx @modelcontextprotocol/inspectorto run the MCP inspector- Open the inspector, enter
http://localhost:8787/sse
You should see:
Details
I took this example from @modelcontextprotocol/typescript-sdk:
import express from "express";
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { SSEServerTransport } from "@modelcontextprotocol/sdk/server/sse.js";
const server = new McpServer({
name: "example-server",
version: "1.0.0"
});
// ... set up server resources, tools, and prompts ...
const app = express();
app.get("/sse", async (req, res) => {
const transport = new SSEServerTransport("/messages", res);
await server.connect(transport);
});
app.post("/messages", async (req, res) => {
// Note: to support multiple simultaneous connections, these messages will
// need to be routed to a specific matching transport. (This logic isn't
// implemented here, for simplicity.)
await transport.handlePostMessage(req, res);
});
app.listen(3001);
…and implemented the same thing in Durable Objects. But first needed a transport layer that worked on Workers.
Following sse.ts from @modelcontextprotocol/typescript-sdk, I made one, trying to mirror the shape of the existing one. Some pretty fundamental assumptions baked into the SDK around its use of node:http that leak out beyond the SSE transport through its input types — but really the only meaningful interface change is that handlePostMessage takes a request and returns a response. Seems like there’s probably a clever way somehow to upstream?
Dev Tools Supporting MCP
The following are the main code editors that support the Model Context Protocol. Click the link to visit the official website for more information.










