🤖 WebMCP

★ 4,966⑂ 352👁 98⑃ 138● 242▤ 0
BikeshedNOASSERTIONCreated 2025-08-05webmachinelearning.github.io/webmcp/
+6
Daily
4,966
stars
352
forks
98
watchers
138
prs
242
issues
0
releases

README

WebMCP 🧪

WebMCP lets developers expose web application functionality as "tools"—JavaScript functions with natural language descriptions and structured schemas, designed for AI agent ingestion. These tools can be invoked by AI agents, including those built into the browser, hosted in iframes, or running in extensions to actuate web content that was traditionally designed for human interaction. A declarative API based on HTML  elements is also being explored.

TypeScript type definitions for WebMCP are available in the webmcp-types npm package.

See Implementation Status for browser and agent support, and Best Practices for guidance on designing effective tools.

 Background and Motivation

The web platform is the world's largest gateway to information and capabilities. Today, user experiences rely on visual layouts, mouse and touch interactions, and visual cues to communicate functionality and state, but as AI agents become prevalent, the potential for even greater user value is within reach. The motivation of WebMCP is to provide a lightweight way to adapt web content for use by AI agents.


 Backend Integrations vs. In-browser WebMCP Tools

AI platforms such as Copilot, ChatGPT, Claude, and Gemini are increasingly able to interact with external services to perform actions such as checking local weather, finding flight and hotel information, and providing driving directions. This is facilitated by "tools" that external services provide to extend the AI model’s capabilities, and give the AI domain-specific functionality that it cannot obtain on its own.

External tools integrate with each AI platform via bespoke backend integrations, such as Model Context Protocol or OpenAPI. A service registers its tools with an AI platform, and the platform communicates directly with the service's backend servers via an API. In this document, we call this style of tool a “backend integration”; users make use of the tools by chatting with an AI, and the AI platform communicates with the service on the user's behalf.

Backend integrations work well for server-side actions, but they pose significant challenges for interactive web applications:

- UI Disintermediation & Context Loss: Backend integrations take place directly between the agent and the service, bypassing the service's web UI / browser experience.
- Replication of State & Auth: Web developers must replicate the user's state, active context, and authentication credentials on a separate server.
- Developer Burden: Exposing a site's client-side capabilities requires writing a dedicated backend server, rather than reusing familiar client-side JavaScript.

WebMCP introduces a client-side alternative. It allows web developers to define tools directly in the browser page's script. This enables visually rich, cooperative interplay between a user, a web page, and an agent with shared context. Page UI and content remain available to the agent for actuation, but the agent can use WebMCP tools to achieve the user'

Top issues

Snapshot: 2026-11-16T09:23:14Z · Data license Apache-2.0 · JSON