WebMCP

Alexandra Klepper
Alexandra Klepper

Published: May 18, 2026

WebMCP is a proposed web standard to help you build and expose structured tools for AI agents. WebMCP provides JavaScript and annotates HTML form elements so that agents know exactly how to interact with page features, to support a user's experience. This can significantly improve the performance and reliability of agent actuation.

AI agents are a newer technology. They can help human users better complete tasks which are highly complex and technical. WebMCP offers higher accuracy for agentic task completion, and it can be added as a progressive enhancement.

Why WebMCP?

WebMCP can help you bridge the gap between web applications and agents, improving efficiency, reliability, and task completion, by providing rules for interaction. Instead of an agent reviewing the element, such as a button or a field, to understand its purpose, the website declares the element's purpose, so it's used correctly

This is more reliable than actuation, which may have numerous steps and leaves each step open to interpretation by the agent.

Websites can share explicit purpose, such as search or purchasing, by defining a tool. These tools execute on your webpage visibly, so users gain trust that tasks are completed as expected. This also keeps your brand and human-centered design choices intact.

WebMCP supports:

  • Discovery: A standard way for pages to register tools with agents, such as checkout or filter_results.
  • JSON Schemas: Explicit definitions of inputs and expected outputs, to reduce hallucination or misunderstanding.
  • State: A shared understanding of the current page context, so the agent knows what resources are available to act on in real time.

Our goal is to build APIs that any browser with agentic capabilities can implement and benefit from, so your users can more easily complete tasks. You can follow along this process on GitHub.

Use cases

There are many ways you could use WebMCP on the web. For example:

  • Help your customers get support. If you provide a software to customers, you may have a complex support flow to address many different questions. You can use WebMCP to help an agent more quickly navigate to the right form and fill in fields with user-provided information.
  • Improve travel booking. Help agents book complex, multi-city and multi-passenger trips with fewer steps.

Some actions may be sensitive, such as making a purchase. You can include a command to request user interaction with a confirmation dialog.

In a practical sense, your tools could accomplish the following tasks:

  • Fill in structured forms: Build a submit_application tool to help agents map data collected from the conversation with the user to form fields correctly. For example, you can differentiate if a field requires a full name versus a separate first and last name.
  • Support agent interactions in human-first interfaces: Certain fields are designed for human users, but may not be understood by agents. You could build a date_pick tool that allows for a complex date and time selection in a reservation or event booking.
  • Quicker application debugging: You can build a run_diagnostics tool on a developer settings page, so an agent can trigger fixes that are otherwise hidden behind nested menus.

Is your use case missing? Or do you have an idea you're excited to share for WebMCP? Join the early preview program and share your feedback.

Get started

WebMCP is available as a Chrome flag for local development. It will be available in an origin trial in Chrome 149.

To enable WebMCP locally:

  1. Open Chrome and navigate to chrome://flags/#enable-webmcp-testing
  2. Set the flag to Enabled.
  3. Relaunch Chrome to apply the changes.

Use WebMCP APIs

There are two APIs you can use to set up your website tools:

  • Imperative API: Define different types of tools with standard JavaScript, such as form input, navigation tools, state management, or other functions.
  • Declarative API: Add annotations to a standard HTML forms to create a WebMCP tool.

Limitations

While WebMCP aims to make complex tasks simpler for agents and humans, there are some limitations:

  • Browsing context required: As tool calls are handled in JavaScript, a browser tab or a webview must be opened to provide a visible interface and browser context. In other words, there is no support for agents or assistive tools to call tools in a headless state.
  • More overhead for complex interfaces: If your site is highly complex, you likely need to refactor or add JavaScript to handle application and interface state.
  • Tool discoverability: Clients and browsers must visit a site directly to know if it has callable tools.

Demo

Examples of demos covering both imperative and declarative implementations are available:

You can also review and explore the demo source code on GitHub.

Imitate agent chat with the inspector extension

Install the Model Context Tool Inspector Extension to experiment with an agent and see how WebMCP tools work in live demos or your own applications. You can enter natural language prompts to see if an agent can correctly interact with WebMCP tools.

With the extension, you can:

  • See which tools are registered on a page, by monitoring the navigator.modelContext API.
  • Manually call tools and execute functions.
  • Verify your JSON Schema is correctly defined and that the browser can parse data as the tool expects.
  • View structured output or error messages returned by your tool to ensure they're written clearly and formatted correctly, so an agent can understand it.

Talk to the agent using natural language, to see if it can correctly identify and invoke the appropriate WebMCP tools. Your prompts are sent by default to the gemini-3-flash-preview model.

Engage and share feedback

WebMCP is under active discussion and subject to change in the future. If you try these APIs and have feedback, we'd love to hear it.