{"repo":"beekmarks/mcp-wasm","free":true,"listed":false,"github":"https://github.com/beekmarks/mcp-wasm","clone":"git clone https://github.com/beekmarks/mcp-wasm.git","description":"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.","language":"TypeScript","stars":40,"topics":[],"license":null,"category":"mcp-servers","readme_excerpt":"WASM MCP Server 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. Features Calculator Tool - Performs basic arithmetic operations (addition, subtraction, multiplication, division) - Input validation and error handling - Real-time calculation results Storage System - Key-value storage functionality - Set and retrieve values using string keys - Persistent storage within the browser session - Template-based resource handling Technical Implementation Server Components - server.ts : Core MCP server implementation with tool and resource definitions - main.ts : Client-side integration and UI interaction handling - browser-transport.ts : Custom transport layer for browser communication Architecture - Uses the Model Context Protocol SDK for server implementation - Implements a custom browser transport layer - Tools are registered with callback functions - Resources use template paths with parameter substitution Key Concepts 1. Tools - Registered using server.tool() - Execute via callback functions - Schema validation using Zod 2. Resources - Template-based paths (e.g., storage://{key} ) - Accessed via readCallback - Parameterized resource handling Usage Calculator 1. Select an operation (add, subtract, multiply, divide) 2. Enter two numbers 3. Click \"Calculate\" to see the result 4. Error handling for invalid input","default_branch":null,"files":null,"tree":[],"storefront":"/r/beekmarks","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/beekmarks/mcp-wasm/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}