@mcp-b/react-webmcp adds MCP output schemas and response formatting to the shared React tool hook:
CalculatorTool.tsx
{ left: 3, right: 4 }, React state holds { total: 7 }; the agent receives MCP text and structuredContent.
Package boundary
Both hooks preserve'use client' and accept React 18 or 19; browser tests run on React 19. This package adds Standard Schema
conversion and validation, MCP responses, prompts, resources, and client hooks on top of the core
registration lifecycle.
Agent failures become MCP error responses; local failures and cancellation reject.
Runtime requirements
MCP
outputSchema discovery and validation require the MCP-B runtime.
Framework setup · API reference ·
Schema guide