Skip to content

Installation ​

One package, added to an application that already registers WebMCP tools.

Requirements ​

RequirementValue
Node.js22.12 or newer, 24, or 26 or newer. Not 23 or 25.
BrowserA secure context with native document.modelContext
Module typeESM. Import from a bundler or a native module page.
ModelAn OpenAI-compatible HTTP endpoint that you operate

The browser requirement is the strict one. Read Browser setup before you install anything.

Install ​

pnpm
pnpm add actionwire
npm
npm install actionwire
yarn
yarn add actionwire
bun
bun add actionwire

That is the whole install. The widget, the headless bridge, the WebMCP source, the model adapter, and the types all come from this one package. Its only runtime dependency is @cfworker/json-schema, which validates tool input without generating code, so it works under a strict Content-Security-Policy.

Read moreWhat the package exports

Check the install ​

Put this on a page that already registered at least one WebMCP tool:

check.ts
import { createWebMCPSource } from 'actionwire';

const source = createWebMCPSource();
const snapshot = await source.discover();
console.log(snapshot.tools.map((tool) => tool.name));
source.dispose();

The console prints the tool names the page registered. An empty array means the page registered nothing yet, or the tools belong to a different window. A thrown UNSUPPORTED_WEBMCP error means the browser does not expose the API.

Read moreQuickstart

Released under the MIT License.