Home / Insights / Web and SaaS Development
Web and SaaS Development
WebMCP in 2027: Which Parts of Your Web App to Expose to AI Agents, and How to Build It Safely
Chrome has been running the WebMCP origin trial since Chrome 149, extended it to Chrome 162, and the W3C Community Group draft was revised again on 24 November 2026. WebMCP lets a web page hand an AI agent a list of named, typed tools instead of making it guess its way through the interface. This is how I decide which features to expose, how to build them behind a thin adapter so the moving API does not leak into the product, and what the security and test plan has to cover before anything goes to production.
Key takeaways
- WebMCP is still an experiment: a W3C Community Group draft (revised 24 November 2026) and a Chrome origin trial that now runs to Chrome 162, with an Edge trial that expires on 30 March 2027. Build for learning, not for a launch date.
- The useful unit is a tool: a name, a description, a JSON Schema for its input and an
executefunction that calls the same code your buttons call. A good WebMCP surface is a short list of your highest-value tasks, not a mirror of every screen. - Start with read-only and reversible tools. Mark anything consequential with
consequentialHint, keep a human confirmation in the flow, and remember that the server, not the hint, is the authority. - The API has already changed shape between drafts, so put it behind a small adapter with feature detection. Your product code should depend on your own tool registry, never on
document.modelContextdirectly. - Treat every tool as a public API: shared schemas with server-side validation, contract tests in CI, agent-driven evaluation runs, a Permissions Policy decision, and telemetry that separates agent-invoked actions from human ones.
In this article
- What changed in 2026
- What WebMCP is, and how it differs from MCP servers and screen-driving agents
- Should you build it now? Decision criteria
- Choosing which tools to expose
- Implementation pattern: an adapter, not a rewrite
- Security: what can go wrong and the controls that matter
- Testing, CI/CD and observability
- A 90-day plan for 2027
- Frequently asked questions
- Sources and methodology
For most of the last two years, AI agents have used websites the hard way. They read the page, take screenshots, guess which element is the button, click, and check whether anything happened. It works often enough to be impressive and fails often enough to be expensive. Every redesign, every A/B test and every cookie banner is a new chance for the agent to get lost.
WebMCP is the browser vendors’ attempt to give the page a voice in that exchange. Instead of reverse-engineering your interface, an agent running in the browser asks the page which tools it offers, sees their names, descriptions and input schemas, and calls them. Google and Microsoft engineers edit the draft together, Chrome has run an origin trial since June, and the specification was revised again this week. If you own a web product with real tasks in it, such as booking, ordering, filing, searching or configuring, this is the moment to decide what your position is for 2027.
This article is written for the people who will have to answer that question with a plan: CTOs, product owners and engineering leads. It covers what has actually shipped, a set of criteria for deciding whether to invest now, how to choose the first tools, the implementation pattern I recommend, and the security and delivery work that turns an experiment into something you can support.
What changed in 2026
WebMCP has moved quickly from an explainer on GitHub to something developers can switch on for real users. The milestones below come from the Chromium, Chrome, Microsoft Edge and W3C sources listed at the end of this article.
| Date | Event | Why it matters |
|---|---|---|
| 15 May 2026 | Chromium “Intent to Experiment: WebMCP” posted; approved on 18 May to run as an origin trial from Chrome 149 to 156 | Chrome committed to testing the API with real sites, with stated goals around “web commerce and productivity” workflows. |
| 9 June 2026 | Chrome announces the WebMCP origin trial, available from Chrome 149 | Any site can register for a trial token and expose tools to browser agents for real users. |
| 8 September 2026 | Chrome stable moves to a two-week release cycle, starting with Chrome 153 | Milestone numbers now advance twice as fast, so “Chrome 162” is much closer in calendar time than it used to be. |
| 28 September 2026 | Chrome Platform Status adds a trial extension stage that moves the last milestone from 156 to 162 | The experiment continues into early 2027. Status is still “Proposed”, with no shipping milestone set. |
| Late 2026 | Microsoft Edge runs its own WebMCP origin trial, expiring 30 March 2027 | A second Chromium browser is testing the same API, which matters for anyone worried about a single-vendor feature. |
| 15 November 2026 | A WebMCP threat model draft is published on w3c.github.io | The security conversation now has a shared catalogue of threats, from tool-description injection to over-parameterised tools. |
| 24 November 2026 | The WebMCP Draft Community Group Report is revised again | The API is still moving. Code written against early tutorials may not match the current draft. |
Two cautions sit underneath that table. First, a Community Group report is not a W3C Standard, and the Edge trial terms say plainly that the feature “may never be enabled beyond this trial”. Second, by my arithmetic on Chrome’s published two-week cadence, Chrome 162 reaches stable around mid-January 2027. That is an estimate, not a date Google has published, so check the Chromium schedule before you plan around it. Either way, the window for learning on the trial is a few months, not years.
The wider context explains why browser vendors are bothering. Cloudflare reported in July 2026 that more than half of the traffic it sees is non-human and that 52% of crawler requests were for AI training by June 2026, up from 22% in spring 2025. In early June, Cloudflare’s CEO said on X that agentic bots had overtaken human traffic on its Radar view, while calling the data “a bit messy”. Treat those as signals of direction rather than precise forecasts for your own site. The direction is clear enough: more of your visitors will be software acting for a person, and the question is whether they use your product through a contract you designed or through guesswork.
What WebMCP is, and how it differs from MCP servers and screen-driving agents
The name borrows from the Model Context Protocol, which Anthropic donated to the Linux Foundation’s new Agentic AI Foundation in December 2025, alongside Block’s goose and OpenAI’s AGENTS.md. MCP is the protocol agents use to call tools on servers. WebMCP takes the same idea, a named tool with a description and a JSON Schema, and puts it inside the page, so the tool runs in the user’s browser tab with the user’s session.
In the current draft the entry point is document.modelContext, available only in secure contexts. A page calls registerTool() with an object that has a name, a description, an optional inputSchema and outputSchema, an execute callback and optional annotations. The callback receives the parsed input object and an AbortSignal, and whatever it returns is serialised to JSON for the agent. A tool is unregistered by aborting the signal passed at registration. A companion declarative proposal lets an ordinary HTML <form> become a tool with toolname and tooldescription attributes, so simple forms need almost no script.
That puts WebMCP in a specific place among the three ways an agent can use your product:
| Backend MCP server or public API | WebMCP tools in the page | Screen-driving browser agent | |
|---|---|---|---|
| Where the code runs | Your servers | The user’s browser tab, using the page’s own JavaScript | The agent drives the rendered page |
| Whose session | A service account or OAuth token you issue to the agent | The signed-in user’s existing session | The signed-in user’s existing session |
| Contract | Explicit, versioned API | Explicit tool list, defined by the page that is open | None; inferred from the interface |
| Works when the tab is closed | Yes | No | No |
| Reliability through redesigns | High | High, if tools call domain logic rather than the DOM | Low |
| Build effort | High: auth, rate limits, scopes, docs | Moderate: reuse front-end logic and existing endpoints | None for you; the cost moves to failure handling and support |
| Best for | Back-office integrations, partners, headless automation | Tasks a person does in your app with an agent helping | Sites that have not offered anything better |
The practical consequence is that WebMCP is not a replacement for a proper API, and an API is not a replacement for WebMCP. A backend MCP server suits an agent working on its own; WebMCP suits an agent working beside a person who is already in your app. Most products that take agents seriously will end up with both, sharing the same domain services underneath.
Should you build it now? Decision criteria
An origin trial costs engineering time and creates a maintenance obligation against a moving draft. I use the criteria below to decide whether a product should join the trial in the first quarter of 2027, wait for a shipping decision, or skip it for now.
| Criterion | Lean towards building now | Lean towards waiting |
|---|---|---|
| Task shape | Users repeat structured tasks: search with filters, reorder, book, file, configure, compare | Mostly reading content, or one-off creative work |
| Audience browser | A large share of users on desktop Chrome or Edge | Mostly Safari or in-app webviews |
| Front-end architecture | Domain logic sits in services or a state layer that a tool can call directly | Logic is tangled into components and event handlers |
| Existing API | Clean endpoints with server-side validation already exist | Business rules live only in the client |
| Risk profile | Most valuable tasks are read-only or easily reversed | Most valuable tasks move money, sign contracts or touch regulated data |
| Team capacity | One engineer can own the adapter and its tests for a quarter | The team is already behind on a major framework upgrade |
| Commercial signal | Customers or partners already ask how agents can use your product | No one has asked yet |
If four or more rows fall on the left, I would run a contained pilot during the trial. If most fall on the right, the better investment is usually the groundwork that pays off regardless of WebMCP: moving business rules out of components, tightening server-side validation and writing JSON Schemas for your key operations. That work makes your public API, your backend MCP server and any future WebMCP layer cheaper at the same time.
Choosing which tools to expose
The most common mistake I expect to see is the “expose everything” approach: one tool per button. Agents choose tools from their names and descriptions, so a long, overlapping list makes them worse, not better. The threat model draft also lists an agent selecting the wrong tool or the wrong arguments as a threat in its own right. Start small and task-shaped.
Sort candidate tasks into three tiers
| Tier | Examples | Annotations | Controls |
|---|---|---|---|
| 1. Read | Search the catalogue, list my open orders, show invoice status, check availability | readOnlyHint: true | Same authorisation as the page; limit result size; no personal data beyond what the screen shows |
| 2. Reversible write | Add to basket, save a draft, create a filter, schedule a reminder | Default (no hint) | Visible in the UI immediately; easy undo; rate limits |
| 3. Consequential | Place an order, submit a claim, change bank details, delete a project | consequentialHint: true | Human confirmation in the page; server-side checks; audit log; often excluded from the first release |
For the pilot I would expose three to six tools, mostly from tiers 1 and 2, chosen from the tasks your analytics show people repeat most. If a task needs a consequential step, let the agent fill everything in and stop at a confirmation screen the user completes. The declarative proposal already works this way by default: unless a form opts into toolautosubmit, the browser focuses the submit button and leaves the final click to the person.
Write tools like a public API
- Names are verbs on domain nouns.
search_products,add_to_basket,get_order_status. The draft allows 1 to 128 ASCII letters, digits, underscores, hyphens and dots; pick one convention and keep it. - Descriptions say when to use the tool and when not to. “Search the product catalogue by keyword and filters. Does not include discontinued items. Use get_product for details of a known SKU.”
- Input schemas are narrow. Enumerations instead of free text, explicit units, sensible maximums. The draft calls out “privacy leakage through over-parameterization”: do not ask for data the task does not need.
- Outputs are small and structured. Return identifiers and the fields the next step needs, not a page of HTML. If the output includes user-generated content such as reviews or messages, set
untrustedContentHintso the agent can treat it as data, not instructions. - Errors are explicit. “Out of stock”, “Requires sign-in”, “Quantity above limit of 10”. Agents recover from clear errors; they loop on vague ones.
Implementation pattern: an adapter, not a rewrite
Between the Chromium intent, which names the feature navigator.modelContext, and the current draft, which puts it on document.modelContext, the API has already changed shape, and methods shown in some early tutorials are no longer in the draft. That is normal for an incubation, and it tells you how to build: keep WebMCP at the edge of the application and keep your own code stable.
The three layers
- Domain actions. Plain functions or service calls your UI already uses, such as
basket.add(sku, qty). If these do not exist yet because logic lives in components, extracting them is the real first task, and it improves the codebase whether or not WebMCP ships. - A tool registry you own. A list of tool definitions: name, description, a JSON Schema shared with the server, annotations and a handler that calls a domain action. This is framework-agnostic and fully unit-testable.
- A thin WebMCP adapter. Feature-detects the browser API, registers each tool from the registry, wires the abort signal to the component or route lifecycle, and converts results and errors. When the draft changes, this is the only file that changes.
A minimal adapter looks like this. It follows the current draft and is deliberately defensive about where the API lives:
// webmcp-adapter.ts (illustrative)
export function registerTools(tools, lifecycle) {
const mc = document.modelContext ?? navigator.modelContext;
if (!mc?.registerTool) return; // not supported: do nothing
for (const t of tools) {
mc.registerTool({
name: t.name,
description: t.description,
inputSchema: t.inputSchema,
annotations: t.annotations,
async execute(input, { signal }) {
const result = await t.handler(input, { signal, source: 'agent' });
return { content: [{ type: 'text', text: JSON.stringify(result) }] };
}
}, { signal: lifecycle.signal });
}
}A few rules make this hold up in a real React, Next.js, Angular or Vue application:
- Register by route, unregister on leave. Tools should reflect what the user can do on the current screen. Tie the abort signal to the route or component lifecycle so a single-page app does not accumulate stale tools.
- Register only in the browser. With server rendering, run the adapter in a client-only effect after hydration, never during the server render.
- Validate twice. The browser checks the input against your schema; your handler validates again with the same schema; the server validates a third time because it is the only layer an attacker cannot edit.
- Pass a source flag. Every handler receives
source: 'agent'so analytics, rate limits and audit logs can tell agent-invoked actions from clicks. - Load the trial token per environment. Origin trial tokens are tied to an origin. Keep separate tokens for staging and production in configuration, and add a feature flag so you can switch the adapter off without a deploy.
Where the declarative form API fits
For simple, single-step tasks, such as a contact form, a quote request or a newsletter sign-up, the declarative proposal is attractive: add toolname and tooldescription to the form and toolparamdescription to its fields. On submission the event carries an agentInvoked flag, and a page that handles the form in script can call respondWith() to return a result instead of navigating. The explainer is explicit that parts of this design are still under debate, so I would use it only for low-risk forms during the trial and keep anything multi-step in the imperative registry.
Security: what can go wrong and the controls that matter
WebMCP changes who is calling your front-end code. The draft’s security section names five headline risks: prompt injection, misrepresentation of intent, privacy leakage through over-parameterisation, interaction with the same-origin policy, and interaction with private browsing. The separate threat model draft catalogues 28 threats, including page-authored tool metadata that injects instructions, untrusted tool output treated as instructions, third-party scripts that change the tool list, and consequential actions taken without mediation. Most of the mitigation sits with the agent and the browser, but a site owner controls more than you might think.
| Threat | What it looks like on your site | Your control |
|---|---|---|
| Third-party script registers or alters tools | A tag manager or chat widget calls registerTool with an attractive name | Register tools only from first-party bundles; tighten Content Security Policy; review third-party scripts as part of the pilot |
| Embedded frames expose tools | A cross-origin iframe offers tools to the agent on your page | The Permissions Policy feature is tools with a default allowlist of self; grant it to frames only deliberately, or send Permissions-Policy: tools=() on pages that should expose nothing |
| Cross-origin exposure | A tool meant for your app is callable from another origin in the same page tree | Leave exposedTo at its default; cross-origin use needs both sides to opt in |
| Injection through output | A product review or support message contains “ignore previous instructions” | Set untrustedContentHint on tools that return user content; keep outputs structured |
| Consequential action without consent | The agent places an order or changes account details in one step | consequentialHint, a confirmation step the person completes, and server-side limits |
| Misleading annotations | A tool claims to be read-only but writes | Annotations are hints and the draft warns that sites can misrepresent them; enforce read-only on the server, not in the hint |
| Over-collection | A tool asks the agent for a date of birth it does not need | Minimal schemas, data protection review of every input field |
The principle is the one we apply to any client: the browser is not a security boundary. Authorisation, limits and validation live on the server. WebMCP tools should never be able to do anything the signed-in user could not do by clicking, and anything sensitive should still need the user’s own hand on the last step. If you already run agents in your delivery pipeline, the same thinking applies here; I covered the permission model for that in AI agents in the CI/CD pipeline.
Testing, CI/CD and observability
A tool surface is an interface other software depends on, so it needs the same delivery discipline as a public API. This is the minimum I put in place before a pilot reaches real users:
- Registry unit tests. Every tool has a schema, a description under an agreed length, the right annotations and a handler that rejects invalid input. These run on every pull request.
- Contract tests against the server. The same JSON Schemas validate API requests in integration tests, so a back-end change that breaks a tool fails the build, not the agent.
- Browser tests with the adapter switched on. Playwright or similar, in a Chromium build with the feature enabled, checking that the right tools appear and disappear by route and that execution produces the same state change as the click path.
- Agent evaluation runs. A small, fixed set of natural-language tasks run by an agent against staging, scored on completion, wrong-tool calls and unnecessary steps. Rerun when descriptions change; wording is product code here.
- Telemetry. Count tool registrations, invocations, errors and completion by tool, with the
sourceflag. The Chromium intent says Google is also gathering metrics on “tool usage and latency”; your own numbers are what will justify, or end, the investment. - Kill switch. A remote flag that stops registration within minutes, tested before launch, plus a runbook entry for the support team.
Preview environments per pull request make the evaluation runs much cheaper, because the agent can be pointed at the exact build under review. If your team does not have them yet, they are worth setting up first; see preview environments per pull request.
A 90-day plan for 2027
This is the plan I would propose to a product team that passes the criteria above. The durations are illustrative and assume one engineer leading, with design, QA and security time on call.
| Weeks | Work | Exit criteria |
|---|---|---|
| 1 to 2 | Pick three to six candidate tasks from analytics; classify into tiers; data protection review of inputs; register staging and production origins for the trial | Signed-off tool list with schemas and annotations; trial tokens in configuration |
| 3 to 5 | Extract domain actions where needed; build the registry and adapter; feature flag and kill switch; first-party registration only | Unit and contract tests green; adapter can be switched off remotely |
| 6 to 8 | Browser tests by route; agent evaluation set of 20 to 30 tasks; security review against the threat model; Permissions Policy decision for every page template | Evaluation pass rate agreed with product; no high findings open |
| 9 to 10 | Release to a small share of production traffic in supported browsers; monitor invocations, errors and completion | No increase in support tickets or failed orders; telemetry flowing |
| 11 to 13 | Review results; decide to extend, adjust or stop; write the handover note covering registry, tokens, flags and runbook | Go or no-go recorded, with the evidence |
The handover note matters more than usual, because the origin trial will end and someone will need to know which tokens, flags and API shapes are in play when Chrome makes its shipping decision. Our AI project handover checklist covers the same ground for wider AI work.
If you want a second pair of hands on this, our web development team builds and maintains React, Next.js, Angular and Vue applications, and our AI agent development team works on the agent side of the same problem. For related reading on the standards around WebMCP, see Alex Pham’s guide to MCP and A2A and his article on prompt injection in agentic systems.
Frequently asked questions
Is WebMCP a standard yet?
No. It is a Draft Community Group Report from the W3C Web Machine Learning Community Group, last revised on 24 November 2026, and Chrome Platform Status lists it as “Proposed” with no shipping milestone. Chromium’s intent estimated shipping on desktop at Chrome 157, but the trial has since been extended to Chrome 162, so treat every date as provisional.
Which browsers support it?
Today, Chromium browsers taking part in origin trials: Chrome from version 149, with the trial extended to 162, and Microsoft Edge, whose trial page lists an expiry of 30 March 2027. I have found no shipped implementation in Safari or Firefox. Your adapter should do nothing when the API is absent, so unsupported browsers see the normal site.
Do we still need a public API or a backend MCP server?
Yes, if agents need to act when the user is not in your app, or if partners integrate server to server. WebMCP only works while the page is open, in the user’s own session. The best results come from both layers calling the same domain services and the same schemas.
Will WebMCP help our search visibility?
There is no evidence yet that registering tools affects search ranking or AI answer citations, and I am not aware of any statement from Google that it does. Its value is that agents acting for your users complete tasks more reliably on your site. Keep structured data, performance and accessibility work going on their own merits.
Is the code we write now wasted if the API changes?
Mostly not. Extracted domain actions, shared JSON Schemas, server-side validation, contract tests and evaluation sets survive any change to the browser API. Only the thin adapter needs rewriting, which is why it should be thin.
How do we stop agents from doing something harmful?
Expose only what the signed-in user could already do, keep consequential steps behind a confirmation the person completes, enforce limits on the server, and log agent-invoked actions separately. Annotations help a well-behaved agent; they do not protect you from a badly behaved one.
Sources and methodology
Dates, API names and status come from the Chrome, Chromium, Microsoft Edge, W3C Community Group and Linux Foundation sources below, checked on the access date. WebMCP is an incubating draft, so names may change after publication. Traffic figures are Cloudflare’s, describe its own network and are not a forecast for any single site. The Chrome 162 date is the author’s estimate from the published release cadence. The decision criteria, tool tiers, implementation pattern and 90-day plan are the author’s professional practice; durations are illustrative, not measured benchmarks.
- Chrome for Developers: WebMCP origin trial announcement (9 June 2026) — accessed 26 November 2026. Trial availability from Chrome 149, registration route, Google’s stated goal and feedback channels.
- Chromium blink-dev: Intent to Experiment: WebMCP (15 May 2026, approved 18 May 2026) — accessed 26 November 2026. Trial approved for Chrome 149 to 156, estimated desktop shipping at Chrome 157, goals for commerce and productivity, tool usage and latency metrics, feature name navigator.modelContext.
- Chrome Platform Status: WebMCP feature entry (updated 25 November 2026) — accessed 26 November 2026. Status “Proposed”, no shipping milestone, origin trial extension stage moving the last milestone to Chrome 162 (added 28 September 2026).
- Chrome for Developers: Chrome’s two-week release cycle (3 March 2026) — accessed 26 November 2026. Move to a two-week stable cycle from Chrome 153 on 8 September 2026; basis for the author’s estimate of when Chrome 162 reaches stable.
- Microsoft Edge origin trials: WebMCP — accessed 26 November 2026. Edge WebMCP trial, expiry date of 30 March 2027 and the note that the feature may never be enabled beyond the trial.
- W3C Web Machine Learning Community Group: WebMCP, Draft Community Group Report (24 November 2026) — accessed 26 November 2026. document.modelContext, registerTool and tool fields, annotations, execute callback, exposedTo, the tools Permissions Policy feature, security and privacy considerations, editors from Microsoft and Google.
- WebMCP declarative API explainer (GitHub) — accessed 26 November 2026. toolname, tooldescription, toolautosubmit and toolparamdescription attributes, agentInvoked and respondWith on SubmitEvent, open design questions.
- Threat Model for WebMCP, unofficial draft (15 November 2026) — accessed 26 November 2026. Catalogue of 28 threats including tool-metadata injection, untrusted output, third-party script tampering, unmediated consequential actions and wrong tool selection.
- Linux Foundation: formation of the Agentic AI Foundation (9 December 2025) — accessed 26 November 2026. MCP, goose and AGENTS.md as founding projects of the Agentic AI Foundation.
- Cloudflare blog: Content Independence Day, one year on (1 July 2026) — accessed 26 November 2026. More than half of traffic is non-human; AI-training share of crawler requests at 52% in June 2026, up from 22% in spring 2025.
- SiliconANGLE: report of Cloudflare CEO’s statement on agent traffic (4 June 2026) — accessed 26 November 2026. Matthew Prince’s statement that agentic bots had passed human traffic on Cloudflare Radar, with his caveat that the data is messy.
Related reading
Continue your research
Thinking about WebMCP for your web app?
We can review your web application, pick the first tools worth exposing to AI agents, and build the adapter, schemas and test plan so your team can run an origin trial pilot safely.
