mcp-wasm

mcp-wasm

20

This project is a proof-of-concept Model Context Protocol server developed to operate in a web browser using WebAssembly. It focuses on demonstrating the integration of key MCP tools and resources in a simple browser setup.

WASM MCP Server

A proof-of-concept implementation of a Model Context Protocol (MCP) server that runs in WebAssembly (WASM) within a web browser. The project demonstrates MCP tools and resources integration in a browser environment.

Features

  • Calculator Tool: Performs basic arithmetic operations, input validation, and real-time results.
  • Storage System: Offers key-value storage, persistent within the browser session, and template-based resource handling.

Technical Implementation

  • Server Components: Separation of core server, client-side, and transport layer logic.
  • Architecture: Utilizes Model Context Protocol SDK and a custom browser transport layer.

Usage

  • Calculator: Select an operation, enter numbers, and view results with error handling.
  • Storage: Store and retrieve values using key-entry interface with feedback.

Dependencies

  • Model Context Protocol SDK
  • Zod for validation
  • TypeScript
  • Vite for development

Future Enhancements

  • Additional calculator operations
  • Persistent storage
  • Enhanced UI/UX