Repository navigation
0.3.0
Minor Changes
-
556c86dThanks @emingure! - feat(hooks): add before/after/error/denied lifecycle hooks with global/scoped/tool scoping and HITLAdd state-based hook arrays (
hooks: { before, after, error, denied }) forwebmcp(fn),webmcp.configure()global and<WebMCPProvider>scoped. Hooks wrap only the agentexecutepath, support input/output mutation, deny via{action:'deny'}, cooperativeAbortSignal, sharedmetadatabag andinvocationId. Includes HITL demo (checkout approval modal with deny), hook log UI + console, docs for hooks and analytics integrations (PostHog, Mixpanel, Amplitude, GA4, Segment, Sentry, Datadog, Vercel, Plausible), and comprehensive tests.
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog,
and this project adheres to Semantic Versioning.
Unreleased
0.2.0 - 2026-08-29
Added
useWebMCP(fn, opts)/useTool1-line overload — wrap + register while mounted, returnsWebMCPTool & status(optional,useWebMCP(tool)still works) —src/react/useWebMCP.ts:20simple-webmcp/zodas separate entry (5.32KB, keeps core 6.26KB gz lean) —src/zod.ts:1,src/internal/schema.ts:1now uses global convertersimple-webmcp/inspectcore API —listTools(),listToolsAsync(),getTool(),invokeTool(),onToolsChanged(),isSupported()—src/inspect.ts:1(mergesregistry+document.modelContext.getTools())simple-webmcp/devtoolsReactInspector—src/devtools/Inspector.tsx:1(tool list, inputSchema, invoke, status)simple-webmcp/dev-polyfillandsimple-webmcp/testingaliases for dev shim —src/dev-polyfill.ts:1,src/testing.ts:1,tsup.config.ts:1- Live demo with Inspect panel —
examples/demo/index.html:1(shopping cart + inspect, CDN fallback),docs/public/demo/index.html,docs/demo.md:1iframe,docs/guide/inspect.md:1,docs/api/inspect.md:1, VitePressignoreDeadLinks - Release process with semver + changelogs —
RELEASING.md:1,CONTRIBUTING.md:1,.changeset/config.json:1(Changesets +@changesets/changelog-github),.github/workflows/release.yml:1(tagv*→ npm provenance + GitHub Release),.github/workflows/changesets.yml:1 - Docs: VitePress site
docs/repositioned hero to “Make your existing functions agent-ready”, before/after, competitor table, honest inference, framework-agnostic core wording - Package now
emingure/simple-webmcp—package.json:1author, repo,LICENSE,src/internal/utils.ts:97warn link, skills moved to.agents/skillsfor auto-discovery (package.json:1files:[".agents/skills"]) registrynow storescontract+executefor inspect, global singleton__simpleWebmcpRegistryfor cross-entry sharing —src/internal/registry.ts:1examples/demo+docs/public/demostatic demo,fixtures/next-appspike placeholder,.github/workflows/docs.yml:1Pages
Changed
registry:supportedvsregisteredmutually exclusive —status:'unsupported'instead of falseregisteredwhendocument.modelContextmissing —src/internal/registry.ts:53,src/webmcp.ts:142,src/types.ts:128(RegistrationStatus+unsupported)polyfill: documented as dev/testing shim, not interoperability polyfill — recommend@mcp-b/webmcp-polyfillfor real cross-browser —src/polyfill.ts:1,docs/guide/polyfill.md:1,.agents/skills/webmcp-simple/SKILL.md:1README.md+docs/index.mdhero to “Make your existing functions agent-ready” (One function. Two interfaces.), Why, before/afteradd_to_cart, competitor table, complementary MCP-B positioningdocs/api/index.md:1—outputSchemakept internally but not marketed;statusnow includesunsupported
Fixed
useWebMCPraw function now auto-wraps viawebmcp()with stableuseMemodeps (was warn/error) —src/react/useWebMCP.ts:20reacttests — mockdocumentnow patchesmodelContextwithout wipingdocument.body(jsdom) —tests/react.test.tsx:1,tests/scope.test.tsx:1registrationtest — polyfill path now expectsunsupported—tests/registration.test.ts:98- Added
tests/inspect.test.ts:1(3 tests) forlistTools/invokeTool
0.1.0 - 2026-08-29
Added
- Core
webmcp(fn, opts)— callable wrapper,webmcp.global()alias - Hierarchy
schema(whole StandardSchema/JSON) > inferred (runtime) >fieldspatch (Partial<JsonSchema>| per-field StandardSchema) > metadata FieldDefsimplified toPartial<JsonSchema>per review- Single
schemaalias (notschema/inputSchemaboth),annotationsextensibleRecord<string,unknown> - Async
register(): Promise<()=>void>+statusper WebMCP spec (AbortSignal lifecycle) - React
useWebMCP(tool,{enabled})+<Scope tools>insimple-webmcp/react(route-level via layout) - Polyfill adapter
simple-webmcp/polyfill(not hard-coded) - Lean core:
sideEffects:false,peer reactoptional,tsupESM+CJS+DTS,exportssubpaths - Tests: callable-wrapper, schema-merge, fields-patch, standard-schema, registration, normalize, react (StrictMode), scope — 42 tests
- Skills:
.agents/skills/webmcp-simple/SKILL.md+references/{api.md,recipes.md}(auto-discovered) - Examples:
vanilla.js,with-react.tsx,with-zod.ts - Build + CI ready (not yet published)
Deferred
- 0.2
unpluginTS/JSDoc inference (Vite/Webpack) - 0.3
webmcp.server()Next.js — experimental, requiresfixtures/next-appspike vs Turbopack default - 0.4
bind(), DevTools overlay, CLIinspect
Fixed per review
- Hierarchy inverted → corrected,
fieldsis patch webmcp.server()made spike, not promised- Next compiler removed from 0.1 (Turbopack)
Scopemoved to react, not next- Polyfill not hard-coded, no
/__webmcp.jsonin 0.1
What's Changed
- Version Packages by @github-actions[bot] in #2
New Contributors
- @github-actions[bot] made their first contribution in #2
Full Changelog: v0.2.0...v0.3.0