WebSockets MCP Math Demo
Demo of MCP client/server using durable objects for trackings state
Overview
MCP Math Demo is a demonstration of the Model Context Protocol (MCP) using Cloudflare Workers and Durable Objects to create a mathematical operations service.
To use MCP Math Demo, you can interact with the client-server architecture via the provided GitHub repository, where you can find the implementation details and instructions for setting up the service.
- Demonstrates MCP client-server architecture for mathematical operations. - Utilizes Durable Objects for stateful agent sessions. - Supports real-time communication through WebSockets. - Enables tool discovery and execution. - Deployed on Cloudflare Workers for edge computing.
- Creating a scalable math operations service.
- Implementing real-time collaborative math applications.
- Demonstrating the capabilities of the Model Context Protocol in educational tools.
Add to your AI client
Use these steps to connect WebSockets MCP Math Demo in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.
Cursor
Add this to your .cursor/mcp.json file in your project root, then restart Cursor.
.cursor/mcp.json
{
"mcpServers": {
"math-mcp-dinasaur404": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-math-mcp-dinasaur404"
]
}
}
}Claude Desktop
Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.
~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)
{
"mcpServers": {
"math-mcp-dinasaur404": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-math-mcp-dinasaur404"
]
}
}
}Claude Code
Add this to your project's .mcp.json file. Claude Code will detect it automatically.
.mcp.json (project root)
{
"mcpServers": {
"math-mcp-dinasaur404": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-math-mcp-dinasaur404"
]
}
}
}VS Code (Copilot)
Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.
.vscode/mcp.json
{
"servers": {
"math-mcp-dinasaur404": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-math-mcp-dinasaur404"
]
}
}
}Windsurf
Add this to your Windsurf MCP config file, then restart Windsurf.
~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"math-mcp-dinasaur404": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-math-mcp-dinasaur404"
]
}
}
}Cline
Open Cline settings, navigate to MCP Servers, and add this server configuration.
Cline MCP Settings (via UI)
{
"mcpServers": {
"math-mcp-dinasaur404": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-math-mcp-dinasaur404"
]
}
}
}FAQ
What is the Model Context Protocol (MCP)?
MCP is a protocol designed for managing stateful interactions in distributed systems, particularly useful in applications requiring real-time communication.
How can I deploy the MCP Math Demo?
You can follow the instructions in the GitHub repository to set up and deploy the demo on Cloudflare Workers.
Is there a license for using MCP Math Demo?
Yes, you can view the license details in the repository.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":2106,"uuid":"1ce2b913-e59c-44fb-9af3-2efb17b9ef77","name":"math-mcp","title":"WebSockets MCP Math Demo","description":"Demo of MCP client/server using durable objects for trackings state","avatar_url":"https://avatars.githubusercontent.com/u/49571477?v=4","created_at":"2025-03-09T03:34:17.008Z","updated_at":"2025-03-12T10:18:25.357Z","status":"created","author_name":"dinasaur404","author_avatar_url":"https://avatars.githubusercontent.com/u/49571477?v=4","tags":"[]","category":"research-and-data","is_featured":false,"sort":1,"url":"https://github.com/dinasaur404/math-mcp","target":"_self","content":"$29","summary":"$2a","img_url":null,"type":null,"metadata":"{\"star\":\"1\",\"license\":\"View license\",\"language\":\"JavaScript\",\"is_official\":false,\"latest_commit_time\":\"2025-03-10 11:09:55\"}","user_uuid":null,"tools":null,"sse_url":null,"sse_provider":null,"sse_params":null,"is_official":false,"server_command":null,"server_params":null,"server_config":null,"allow_call":false,"is_innovation":false,"is_dxt":false,"dxt_manifest":null,"dxt_file_url":null,"is_audit":false},"randomProjects":[],"currentServerKey":"$undefined"}]]}]