/agent-ready-website:webmcp-implementfrom agent-ready-website
Add or update WebMCP on a website: imperative registerTool tools and declarative form tools, to the current spec.
Ships in agent-ready-website. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
This adds WebMCP to a site, or brings an existing implementation up to the current
spec. Use it on "make the site WebMCP ready", "add WebMCP", "update the WebMCP
tools" or "expose this form to agents", or after a webmcp-audit with fails.
webmcp-audit first, at least its
static and source passes.Read ${PLUGIN_ROOT}/references/webmcp-spec.md. Refresh it first if it is
stale. Write code only against the shape it records.
Choose the tools. Work from what visitors do on the site:
execute call it and import
the tool definitions from one shared module, so the two surfaces don't drift.location.assign with setTimeout(…, 0) so the
result is delivered first.Imperative module. Write one script that every page loads, through the base layout or head component. Its pattern:
const mc = document.modelContext; // no navigator fallback: removed in Chromium 150
if (mc && typeof mc.registerTool === 'function') {
const controller = new AbortController(); // the only way to unregister
for (const tool of tools) {
try {
Promise.resolve(mc.registerTool(tool, { signal: controller.signal }))
.catch(err => console.warn('WebMCP: could not register', tool.name, err));
} catch (err) { console.warn('WebMCP: could not register', tool.name, err); }
}
}
Each tool needs:
name matching [A-Za-z0-9_.-]{1,128}description that says what the tool returns and when to use itinputSchemaannotationsexecute: async (input, { signal } = {}) => …Inside execute:
signal to fetch.{ error: "…" } instead of throwing, and rethrow only when
signal.aborted.Set readOnlyHint on reads. Set untrustedContentHint where the output
includes user-generated, listener-submitted or scraped text. Set
consequentialHint on tools with real-world effects.
Declarative forms. On each chosen <form>:
toolname="verb_noun".tooldescription that ends by saying the visitor reviews the form and
submits it.toolparamdescription to any field whose label is unclear.toolparamdescription="Spam trap. Always leave this empty.".toolautosubmit only to harmless forms such as search. Never put it on a
form that sends, buys, posts or subscribes.Some frameworks type-check unknown attributes. If the build rejects these, spread
them as an object ({...{toolname: 'x'}}), or use the framework's escape hatch.
Migrate superseded code. Use the Superseded table in the spec reference:
navigator.modelContext fallback.unregisterTool, provideContext and clearContext.window.ontool* handlers to addEventListener on document.modelContext.Document it. List the tools by name in llms.txt, and on any agents, API or
MCP page the site has, using the llms-txt skill. The spec has no discovery tag,
so text docs are how a text-only agent learns the tools exist. Record what you
built in the repo's docs, in the same commit.
Verify.
python3 -I ${PLUGIN_ROOT}/scripts/check_surfaces.py <site> --page …, and the live pass of webmcp-audit where a WebMCP browser
is available.unknown.document.modelContext. It must not break
browsers that lack WebMCP.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
5 skills in this plugin
/agent-readiness-auditAudit any website for AI-agent readiness (WebMCP, llms.txt, AI crawlers, structured data, machine-readable text) and fix the gaps./crawler-accessFix AI crawler and agent access on a website: robots.txt AI user agents, bot blocks, static HTML, JSON-LD and machine-readable alternates./llms-txtCreate, audit or update a website's llms.txt and llms-full.txt so AI agents can find its content, data endpoints and tools./webmcp-auditCheck a website's WebMCP readiness: registered tools, declarative form tools, spec drift, and a live tool test in a browser.agent-ready-website@danielrosehill is listed by danielrosehill/claude-code-plugins — review the source before installing
npx claudepluginhub danielrosehill/claude-code-plugins --plugin agent-ready-website