webmcp-react
by MCPCat·★ 24·Score 43
React hooks for exposing app functionality as WebMCP tools with type safety and SSR support.
Overview
WebMCP React provides React hooks for registering typed tools with navigator.modelContext. It offers Zod-first type-safe tool definitions, JSON Schema fallback, built-in polyfill for browsers without native WebMCP support, and works seamlessly with SSR frameworks like Next.js and Remix. The library ensures StrictMode safety by avoiding duplicate registrations and orphaned tools.
Try asking AI
After installing, here are 3 things you can ask your AI assistant:
When to choose this
Choose webmcp-react when building React applications that need to expose web-based functionality to AI agents with proper TypeScript typing.
When NOT to choose this
Don't choose if you need server-side tools or are building for non-React environments, as this is specifically a React implementation of WebMCP.
Tools this server exposes
5 tools extracted from the READMEsearch({ query: string }) => Promise<{ content: Array<{ type: 'text', text: string }> }>Search the catalog
translate({ text: string }) => Promise<{ content: Array<{ type: 'text', text: string }> }>Translate text to Spanish
delete_user({ userId: string }) => Promise<any>Permanently delete a user account
checkout({ cartId: string }) => Promise<any>Complete a purchase
calculate({ a: number; b: number; op: string }) => Promise<{ content: Array<{ type: 'text', text: string }> }>Basic arithmetic
Comparable tools
Installation
npm install webmcp-react zodFor Claude Desktop integration:
{
"mcpServers": {
"webmcp": {
"command": "npx",
"args": ["webmcp-bridge"]
}
}
}On Hacker News
Recent discussion from the developer community.
- Story by kashishhora · 2026-03-05
Compare webmcp-react with
Last updated · Auto-generated from public README + GitHub signals.