# Fix: Root HTML exposes WebMCP browser tools

> Web-audit fix skill for the `webmcp` check (MCP & API, MAY).

## Goal

Expose page tools to browser agents via WebMCP.

## Fix

Expose page functionality to browser agents via WebMCP: register a `navigator.modelContext`
provider or declare tools in a `<script type="application/webmcp+json">` block. In-page tools
let a browser-hosted agent act on the page without scraping the DOM.

## Resources

- [WebMCP spec](https://webmachinelearning.github.io/webmcp/)

## Copy-paste prompt

Paste this into your coding agent, replacing the Issue line with the Result line from [your audit](https://anc.dev/web-audit):

```text
Goal: Expose page tools to browser agents via WebMCP
Issue: <the audit's finding for this check>
Fix: Expose page functionality to browser agents via WebMCP: register a `navigator.modelContext` provider or declare tools in a `<script type="application/webmcp+json">` block. In-page tools let a browser-hosted agent act on the page without scraping the DOM.
Skill: https://anc.dev/web-audit/skill/webmcp
Docs: https://webmachinelearning.github.io/webmcp/
```

## Verify

Re-run the audit at [https://anc.dev/web-audit](https://anc.dev/web-audit) or call the `audit_website` MCP tool; the `webmcp` check should report `pass`.
