**webmcpify** is an agent skill that makes an **existing** web app callable by browser
AI agents through [WebMCP](https://webmachinelearning.github.io/webmcp/) —
`document.modelContext`, the proposed standard incubated in the W3C Web Machine
Learning Community Group and in Chrome origin trial. Your coding agent inventories
the app, proposes a tool manifest for your approval, integrates the tools with a
tiny vendored runtime, and **proves each one works in real Chrome**. Unrelated code
stays untouched — from a static landing page to a multi-tenant SaaS.
```sh
npx skills add TueJon/webmcpify # once
/webmcpify # in your app's repo, inside your coding agent
```
> [!TIP]
> **Prepared [v0.7.2](release/v0.7.2.md):** verification preserves the browser's
> original Tool handle and detects output-schema drift. Dated guidance separates
> Chrome 160 registration readiness from registration success and native proof.
> The [latest published release](https://github.com/TueJon/webmcpify/releases/latest)
> is authoritative for shipment status; see the
> [native compatibility evidence](skills/webmcpify/references/native-compatibility.md).
## How it works
- **One human checkpoint.** You approve the tool manifest: names, schemas, examples,
coverage reasons, and a read-only or mutating class per tool. After that the agent
only comes back for what it genuinely can't resolve — an app that won't start, or a
tool that still fails after its capped heal attempts.
- **Loops over persisted state.** Every phase reads and writes
`.webmcpify/manifest.json`, so a run resumes across sessions, context windows and
even different agents. Recorded evidence tells it which checks are still valid.
- **Proof, not promises.** Each tool is enumerated and executed through Chrome's
native `getTools()` / `executeTool()`, asserting on the tool result **and** the
resulting UI state.
## What your agent adds to your app
From the [reproducible proof fixture](proof/README.md). First, the manifest entry
you approve at the gate (abridged):
```jsonc
{
"id": "set_release_filter",
"mutating": "client", // browser state only — no server write
"inputSchema": {
"type": "object",
"properties": { "category": { "type": "string", "enum": ["all", "feature", "fix"] } },
"required": ["category"],
"additionalProperties": false
},
"source": ["proof/demo/app.js:applyFilter"], // the UI's existing code path
"examples": { "valid": { "category": "fix" }, "invalid": { "category": "private" } },
"expect": { "result": "2 release notes visible",
"ui": "only the two synthetic fix notes remain visible" },
"cleanup": "execute the same UI path with category=all"
}
```
Then the integration: a registration that calls the code path the UI already uses,
through the vendored runtime.
```js
import { createToolScope } from './webmcpify.js'; // vendored, MIT, ~290 lines
import { applyFilter } from './app.js'; // existing UI logic, unchanged
createToolScope('proof-release-notes', [{
name: 'set_release_filter',
description: 'Filters the visible synthetic release notes by category '
+ "using the page's existing filter path.",
inputSchema: schema, // the approved schema above
annotations: { readOnlyHint: false, untrustedContentHint: false, consequentialHint: false },
execute: ({ category }) => {
if (!schema.properties.category.enum.includes(category)) {
return 'ERROR: category must be one of all, feature, or fix.';
}
return `${applyFilter(category)} release notes visible for ${category}.`;
},
}]); // feature-detected: a safe no-op in browsers without WebMCP
```
## See it run