webmcp-react

webmcp-react

React hooks that expose your app's features as typed tools AI agents can discover and call in the browser

🔗 Visit webmcp-react
📁 Web Development & Frameworks🗣️ English📅 September 5, 2026

Description

For an AI agent to actually use a web app on your behalf — click the right button, fill the right form — it either has to blindly guess at the page's DOM, or the app has to tell it, in a structured way, what actions are available. webmcp-react is the React plumbing for that second, better approach.

webmcp-react provides React bindings that register typed, callable tools on the browser's `document.modelContext` API (the emerging WebMCP standard), so AI agents can discover and invoke a web app's functionality directly. It uses a Zod-first approach with full TypeScript type inference, ships a lightweight polyfill for browsers without native support, and works safely with server-rendered frameworks like Next.js and Remix, including React 18+ StrictMode. Developers define tools with familiar Zod or JSON Schema definitions, and the library handles registering and unregistering them across the component lifecycle automatically.

💬 Our review

The short version: WebMCP itself is a very new, still-evolving browser standard, and webmcp-react is a clean, type-safe way to adopt it early in a React app without hand-rolling the registration boilerplate.

There isn't yet an established competing React library targeting WebMCP specifically, so the real alternative is writing the `document.modelContext` registration calls by hand — more error-prone and without the Zod-based type inference. The tradeoffs come from the standard's youth: WebMCP itself is still evolving, so expect the library to require updates as the spec changes, and with 54 stars there's limited production track record yet. Free and open source, well documented with a live demo; worth adopting if you're building an agent-aware React app early; wait if you need something with a longer track record.

📊 Global score

53Average
🌐Availability15/100Faible

1 language · 0 platform

📄Profile90/100Excellent

Profile completeness

🤖 AI-enriched data

💰 Pricing model
🆓 Gratuit (open source)

Gratuit, licence MIT. Nécessite React 18+ et Zod 3.25+ en peer dependencies.

👥 Target audienceÉquipes frontend qui construisent des applications web conçues pour être utilisées par des agents IA
🗣️ Languagesen
🌍 Target countriesWorldwide
👍

Pros

Inférence de types TypeScript complète grâce à l'approche Zod-first

Polyfill léger intégré pour les navigateurs sans support natif, suit de près la spec Chrome WebMCP

Compatible SSR (Next.js, Remix) et React 18+ StrictMode

Bien documenté, avec une démo live (WebMCP Wordle) et une référence API complète

👎

Cons

Adoption encore précoce (54 étoiles, 59 commits), peu de retours de production

Le standard WebMCP lui-même est jeune et évolue encore

Aucun benchmark de performance public sur le coût du polyfill

❓ Frequently asked questions

What is webmcp-react in one sentence?
Is there a free plan?
Does it work with server-side rendering?
What do I need to define a tool?
Is it worth the money compared to alternatives?
Which tool should you pick for your case?