Make any website callable by AI agents
The open-source SDK for the WebMCP browser standard. Register typed tools on your website. AI agents discover and call them directly. No scraping.
import { chromium } from 'playwright'; const browser = await chromium.launch();const page = await browser.newPage();await page.goto('https://shop.com'); // Wait for JS to render... hope it loadsawait page.waitForSelector('.search-input');await page.fill('.search-input', 'shoes');await page.click('button.search-btn'); // Parse DOM... guess the structureconst items = await page.$$eval( '.product-card', cards => cards.map(c => ({ name: c.querySelector('h3')?.textContent, price: c.querySelector('.price')?.textContent, })));// Discover tools the site publishesconst tools = await navigator.modelContext .getTools(); // Call with typed inputs — returns JSONconst results = await tools .search_products.execute({ query: 'shoes', maxResults: 10, }); // Structured response — no parsing neededconsole.log(results.products);// => [{ name: "Air Max", price: 129, ... }]The Problem
How agents work today
Indirect
Agents simulate clicks and form fills through the UI. Selector-based automation breaks on every DOM change.
Overhead
Every interaction requires browser rendering, JS execution, and DOM parsing. 2-10 seconds of overhead per page.
No Declared Intent
Sites have no structured way to declare what actions agents should take, what inputs they accept, or what is safe.
The Solution
How WebMCP changes it
Typed Inputs (W3C Spec)
Every tool has a JSON Schema defining exactly what parameters it accepts. No guessing, no DOM parsing.
Structured Responses
Tools return JavaScript values, not raw HTML. The spec defines execute() callbacks that return structured data.
Safety Annotations
W3C spec provides readOnlyHint. Our SDK extends this with read/write/danger classification for richer safety signals.
This site uses its own SDK
Right now, 3 WebMCP tools are live on this page: search_docs, get_sdk_packages, and validate_tool_definition.
Click the floating inspector in the bottom-right corner to call them live.
5-Minute Setup
Three steps. That's it.
Add AI-callable tools to any React app. Works the same way for Vue, Angular, Svelte, and plain HTML.
$ npm install @webmcpregistry/reactimport { WebMCPProvider } from '@webmcpregistry/react';
export default function App({ children }) {
return (
<WebMCPProvider mode="suggest" polyfill>
{children}
</WebMCPProvider>
);
}import { useWebMCPTool } from '@webmcpregistry/react';
function SearchProducts() {
useWebMCPTool({
name: 'search_products',
description: 'Search the product catalog',
inputSchema: {
type: 'object',
properties: {
query: { type: 'string', description: 'Search term' },
},
required: ['query'],
},
safetyLevel: 'read',
handler: async ({ query }) => {
const res = await fetch(`/api/search?q=${query}`);
return res.json();
},
});
return null;
}That's it. AI agents can now discover and call your tools via navigator.modelContext.getTools()
Every framework. One API.
Thin adapters over core. Same tools, same API surface, any stack.
@webmcpregistry/react@webmcpregistry/nextjs@webmcpregistry/vue@webmcpregistry/angular@webmcpregistry/svelte@webmcpregistry/browserWhat you get
12 packages covering framework adapters, testing, conformance, evals, and infrastructure.
core0.2.1Polyfill, detector, validator, security
react0.2.1React hooks + provider
nextjs0.2.1Next.js App Router adapter
vue0.2.1Vue 3 plugin + composables
angular0.2.1Angular service + DI
svelte0.2.1Svelte stores + actions
browser0.2.110KB script tag bundle
testing0.2.1Schema-driven + mutation tests
conformance0.2.1W3C spec conformance suite
evals0.2.1AI agent accuracy evaluation
cli0.2.1Test, scan, init commands
mcp-server0.2.1MCP-to-WebMCP bridge
W3C Community Group Draft
Draft spec by engineers at Google and Microsoft. Published by the Web Machine Learning CG.
Apache 2.0 License
0 packages. 0+ tests. Sigstore provenance on every publish. Fully auditable.
Tested + CI Verified
Vitest + jsdom. Conformance suite with 0 W3C scenarios. Mutation testing. AI eval harness.
Ready to make your site agent-ready?
Start with the documentation or jump straight into the code. Works with React, Next.js, Vue, Angular, Svelte, or plain HTML.