This server enables running a Model Context Protocol in a web browser with functionalities including arithmetic operations and session-based key-value storage.
A proof-of-concept implementation of a Model Context Protocol (MCP) server that runs in WebAssembly (WASM) within a web browser. This project demonstrates the integration of MCP tools and resources in a browser environment.
server.ts
: Core MCP server implementation with tool and resource definitionsmain.ts
: Client-side integration and UI interaction handlingbrowser-transport.ts
: Custom transport layer for browser communicationTools
server.tool()
Resources
storage://{key}
)readCallback
mcp-wasm-poc/
├── src/
│ └── web/
│ ├── server.ts # MCP server implementation
│ ├── main.ts # Client-side logic
│ └── browser-transport.ts # Browser transport layer
├── index.html # Web interface
└── package.json # Project dependencies
This is a proof-of-concept implementation demonstrating the feasibility of running an MCP server in a web browser using WebAssembly. The implementation focuses on demonstrating core MCP concepts while maintaining simplicity and clarity.
Discover shared experiences
Shared threads will appear here, showcasing real-world applications and insights from the community. Check back soon for updates!