WASM MCP Server
by beekmarks
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.
Last updated: N/A
What is WASM MCP Server?
This is a Model Context Protocol (MCP) server implemented in WebAssembly (WASM) that runs within a web browser. It showcases how MCP tools and resources can be integrated into a browser environment.
How to use WASM MCP Server?
The server provides a calculator tool and a key-value storage system. The calculator allows basic arithmetic operations with input validation. The storage system allows setting and retrieving values using string keys, with persistent storage within the browser session.
Key features of WASM MCP Server
Basic arithmetic operations via calculator tool
Key-value storage functionality
Template-based resource handling
Custom browser transport layer
Use cases of WASM MCP Server
Demonstrating MCP server implementation in a browser
Testing MCP tools in a web environment
Prototyping web-based MCP applications
Exploring WASM capabilities for server-side logic
FAQ from WASM MCP Server
What is MCP?
What is MCP?
Model Context Protocol (MCP) is a protocol for managing and accessing models and their associated context.
What is WASM?
What is WASM?
WebAssembly (WASM) is a binary instruction format for a stack-based virtual machine. WASM is designed as a portable target for compilation of high-level languages like C/C++/Rust, enabling deployment on the web for client and server applications.
What are the dependencies?
What are the dependencies?
The project depends on @modelcontextprotocol/sdk, Zod, TypeScript, and Vite.
What are the future enhancements?
What are the future enhancements?
Future enhancements include additional calculator operations, persistent storage across sessions, enhanced UI/UX, additional MCP tools and resources, and WASM optimization.
Where can I find the server implementation?
Where can I find the server implementation?
The core MCP server implementation is located in server.ts
within the src/web/
directory.