# WebMCP polyfill

> The W3C Community Group's polyfill for document.modelContext

Source: https://talira.ai/catalog/webmcp-polyfill-2jwyfjh8
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Library
- Categories: [ai / agents / tool integration](https://talira.ai/categories/ai/agents/tool-integration)
- Licence: Apache-2.0[^2]
- Pricing: Free and open source[^1]
- Pricing notes: Free and open source (Apache-2.0).
- Free tier: yes[^1]
- Supports: [WebMCP](https://talira.ai/standards/webmcp.md)[^1]
- Backed by: [World Wide Web Consortium (W3C)](https://talira.ai/orgs/w3c.md)

The WebMCP polyfill adds `document.modelContext`, the WebMCP API that lets a web page register tools for browser agents, to browsers without native support. It follows the Web Machine Learning Community Group's draft and its `webmcp-types`, has no runtime dependencies, and covers tool registration, discovery, execution and cancellation, the tool change and activation events, frame exposure and origin filtering. Pages load it conditionally, only where the browser lacks the API, and it works only in secure contexts. It's a pilot project of the W3C Open Source Program, and changes as the draft does.

## Links

- GitHub: https://github.com/w3c-oss/webmcp-polyfill

## Problems it solves

- add document.modelContext to browsers without native WebMCP support
- let browser agents call tools on my web page before browsers ship WebMCP
- the official WebMCP polyfill for my website

## Features

- document.modelContext in browsers without native WebMCP
- registerTool, getTools and executeTool with cancellation
- toolchange, toolactivated and toolcancel events
- frame exposure and origin filtering
- no runtime dependencies
- conditional loading only where the API is missing

## Limitations

- Declarative tools (from HTML forms) aren't implemented yet[^1]
- Only fills in the page API: a browser agent still needs the browser itself to support WebMCP[^1]

## Trust

Overall: 0.48 out of 1.
Signals: maintenance 0.88, adoption 0.31, momentum 0.34, community 0.36, backing 0.30, extensibility 0.00.

- last commit yesterday
- 42 commits in the last 90 days
- latest release v0.2.0 yesterday
- 35 GitHub stars
- 7 contributors
- backed by World Wide Web Consortium (W3C)

Warnings:

- young project (first commit 2 months ago)

## Alternatives

- [MCP-B](https://talira.ai/catalog/mcp-b-j08fxmey.md): WebMCP runtime and MCP bridge packages for websites

## Sources

[^1]: https://github.com/w3c-oss/webmcp-polyfill (checked 24 Nov 2026)
[^2]: https://github.com/w3c-oss/webmcp-polyfill/blob/main/LICENSE (checked 24 Nov 2026)
