Agent engineering
WebMCP
WebMCP is a proposed browser API for exposing actions in an open web page to an agent. An annotated HTML form can describe a search or submission. A JavaScript handler can expose a richer operation against the page’s current state. [1]
Article revision recorded
Two ways to expose an action
For an existing form, toolname and tooldescription identify the action and its fields supply the parameters. The imperative API uses document.modelContext.registerTool with a description, input schema and execute handler. Both designs let the page reuse the same interaction logic a person encounters. [2] [3]
Where “Script Tools” fits
In August 2025 the WebMCP project combined an early browser proposal called the Script Tools API with its WebMCP explainer. This history explains the name in earlier presentations. A backend tool implemented with a script and a script bundled in an Agent Skill each have a different execution environment. [4]
The browser boundary
WebMCP tool handlers run in the page. They see its current state and may call its application backend using the site’s normal authorization. An MCP server exposes operations to protocol clients over a transport such as stdio or HTTP. A site can support both interfaces by sharing application logic. [1] [5]
When to use it
Use a page tool for work tied to what someone sees, such as selecting available filters or preparing a form to review. A scheduled integration that must run with the page closed needs a server or API. Keep a normal accessible form or equivalent controls so people can complete the task on other browsers. [1] [5]
Status and outlook
Chrome offered an early preview and then a time-limited origin trial. The Web Machine Learning Community Group publishes the evolving draft. Feature-detect the API and test actual browser versions. The ordinary page should remain fully usable as the proposal changes. [1] [5]
Examples
Basic
Annotate a catalog’s existing GET search form. In a supporting browser the agent can fill the field. Without toolautosubmit the person still submits the form, and the same controls work in other browsers. [2]
<form action="/search" method="get" toolname="search_catalog" tooldescription="Find catalog entries by title">
<label>Title <input name="q" required></label>
<button type="submit">Search</button>
</form>Moderate
Register a read-only page tool that reports the titles currently visible in the catalog. Run the script after the page loads. Feature detection preserves the existing page on browsers without WebMCP. [3]
if ("modelContext" in document) {
document.modelContext.registerTool({
name: "visible_titles",
description: "List titles displayed in this catalog view",
inputSchema: { type: "object", properties: {} },
execute: () => Array.from(document.querySelectorAll("[data-catalog-title]"))
.filter(el => el.checkVisibility())
.map(el => el.textContent.trim())
})
}Production
For a booking flow, expose a read-only availability lookup and keep the final booking behind the site’s existing review step. Recheck inventory and the signed-in user on the backend, then test keyboard-only, unsupported-browser and tool-driven paths. [5]
Timeline
Related articles
Linked from
References
- Web Machine Learning Community Group draft webmachinelearning.github.io
- Declarative HTML form API developer.chrome.com
- Imperative JavaScript API developer.chrome.com
- Original merge of the browser API explainers github.com
- Chrome’s WebMCP guidance developer.chrome.com
- Chrome announces the WebMCP early preview developer.chrome.com
- Chrome opens the WebMCP origin trial in Chrome 149 developer.chrome.com
- The draft adds a way to signal when a page’s tool list is ready github.com
Revision history
- 2026-11-25 Publish current guides, examples and practice links
039b44cb5· View changes - 2026-11-25 Index the sourced subject histories
0d3976156· View changes