WebMCP
A proposed JavaScript browser API that lets web developers expose app functionality as tools invokable by AI agents and assistive technologies for human-in-the-loop workflows.
At a Glance
Free and open-source web specification and reference implementation available on GitHub.
Engagement
Available On
Alternatives
Listed May 2026
About WebMCP
WebMCP is a proposed web platform API, first published August 13, 2025, that enables web developers to register JavaScript functions as "tools" — complete with natural language descriptions and JSON Schema input definitions — that AI agents, browser assistants, and assistive technologies can discover and invoke. The proposal is authored by contributors from Microsoft and Google and is being developed under the W3C Web Machine Learning Community Group. The specification is currently a Draft Community Group Report, not yet a W3C Standard or on the W3C Standards Track.
What It Is
WebMCP introduces a navigator.modelContext interface that web pages use to register named tools via registerTool(). Each tool has a name, a human-readable description, an optional JSON Schema for its inputs, and an execute callback. When an AI agent or browser assistant is active, it can observe the tools registered on the current page and invoke them directly — bypassing the need to simulate mouse clicks, keyboard input, or DOM scraping. The proposal frames web pages using WebMCP as conceptually similar to Model Context Protocol (MCP) servers, but implemented entirely in client-side JavaScript rather than on a backend server.
How It Differs from Backend MCP
Traditional MCP integrations require developers to write and host a separate server (typically in Python or Node.js) that the AI platform communicates with independently of any browser UI. WebMCP instead runs tools inside the live page, sharing the same authentication session, application state, and visual context that the human user sees. The proposal explicitly positions WebMCP as complementary to — not a replacement for — backend MCP: fully autonomous, headless, or server-to-server agent scenarios are listed as non-goals.
Chrome's developer documentation frames the two as partners with distinct lifecycles and reach. The Chrome team's side-by-side comparison:
| MCP | WebMCP | |
|---|---|---|
| Purpose | Makes data and actions available to agents anywhere, anytime | Makes a live website ready for instant interaction when a user visits |
| Lifecycle | Persistent (server and daemon) | Ephemeral (tab-bound) |
| Connectivity | Global (desktop, mobile, cloud, web) | Environment-specific (browser agents) |
| UI interaction | Headless and external | Browser-integrated and DOM-aware |
| Discovery | Agent-specific registration flows | Tools registered on the page during the user's visit |
| Use case | Performs background API actions | Navigates and actuates on a live web UI |
The Chrome docs argue that the most effective agentic applications use both: MCP handles core business logic and background tasks platform-agnostically, while WebMCP provides the high-fidelity, contextual layer for in-browser interaction.
Human-in-the-Loop Design
The core design principle is cooperative, not autonomous, agent interaction. Key design choices that reflect this:
- Tools are only available while the page is loaded and active in a browser tab
- The
ModelContextClientinterface exposes arequestUserInteraction()method so tools can pause and prompt the user before completing an action - The browser is expected to surface permission prompts when a site first registers tools and when an agent first attempts to call them
- The spec explicitly excludes headless browsing and fully autonomous workflows from its goals
Use cases described in the explainer include collaborative graphic design (filtering templates, editing designs), shopping (filtering product listings by natural language criteria), and code review (fetching test failure logs, adding suggested edits) — all scenarios where a human remains present and in control.
Chrome's Implementation and Two-API Approach
Google's Chrome team is actively building toward WebMCP and has published implementation guidance on developer.chrome.com. The docs describe two parallel APIs developers can use to expose tools:
- Imperative API — Register tools with JavaScript via
navigator.modelContext, suited for navigation, state management, and custom functions likesearch_products()oradd_to_wishlist() - Declarative API — Annotate standard HTML
<form>elements with attributes liketoolname,tooldescription, andtoolparamdescriptionto turn an existing form into a WebMCP tool with no extra JavaScript
Chrome's documentation positions actuation — the act of an agent simulating clicks and keystrokes to drive a UI — as the failure mode WebMCP is designed to replace. By having sites declare a tool's purpose explicitly, agents skip guesswork and call defined functions with structured inputs. The Chrome team also publishes a Model Context Tool Inspector Extension for the Chrome Web Store that lets developers see registered tools, manually invoke them, and validate JSON Schema definitions against a gemini-2.5-flash agent.
The Chrome docs walk through several critical user journeys built on WebMCP, including reordering past grocery purchases, filtering apartment listings against transit and budget criteria, filing warranty claims, and submitting catering inquiries — all framed as scenarios where the agent operates on the user's behalf inside a live tab.
API Shape and Specification Status
The formal specification, published as a Draft Community Group Report dated 19 May 2026, defines the ModelContext interface on Navigator, the ModelContextTool dictionary (with name, title, description, inputSchema, execute, and annotations fields), and the ModelContextClient interface. Tool annotations include readOnlyHint and untrustedContentHint booleans. The spec also defines event loop integration, describing how a browser agent running in parallel can perform "observations" of a page's registered tools.
Update: Chrome Origin Trial and Community Draft, May 2026
The GitHub repository was created on August 5, 2025, and the specification page reflects a last-updated date of May 19, 2026. The repo has accumulated over 2,400 stars and 144 forks since its initial publication. Chrome's developer documentation states that WebMCP is available behind the chrome://flags/#enable-webmcp-testing flag for local development and is scheduled to enter an origin trial in Chrome 149. The Chromium implementation is tracked on Chrome Status as feature 5117755740913664. Future explorations noted in the explainer include Progressive Web App (PWA) offline tool declarations and background model context providers via service workers.
Community Discussions
Be the first to start a conversation about WebMCP
Share your experience with WebMCP, ask questions, or help others learn from your insights.
Pricing
Open Source
Free and open-source web specification and reference implementation available on GitHub.
- Full specification access
- Reference implementation source code
- Community issue tracking and contributions
- W3C Community Contributor License Agreement (CLA)
Capabilities
Key Features
- Register JavaScript functions as AI-invokable tools via navigator.modelContext.registerTool()
- Natural language tool descriptions with JSON Schema input definitions
- Human-in-the-loop workflows with requestUserInteraction() support
- AbortSignal-based tool lifecycle management
- Tool annotations: readOnlyHint and untrustedContentHint
- Browser agent observation model for tool discovery
- Declarative tool registration via HTML forms (in draft)
- Works alongside existing MCP and OpenAPI backend integrations
- Shared auth and app state between user and agent
- Accessibility tree augmentation for assistive technologies
