/webmcp-kit:build-webmcp-toolsfrom WebMCP Kit
Designs, evaluates, audits, and implements WebMCP client-side tools for in-browser AI agents on document.modelContext. Use when making a web app agent-ready, analyzing user journeys, writing tool schemas, or fixing Lighthouse/DevTools WebMCP findings.
Ships in WebMCP Kit. 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.
Read when SKILL.md points to them.
build-webmcp-tools)WebMCP lets a web page expose client-side capabilities as structured tools to in-browser AI agents on document.modelContext, instead of agents scraping or clicking the DOM. This skill routes a developer to the right stage of the tool lifecycle and points to the reference file that holds the detailed rules and code for that stage.
Key tenet: WebMCP runs client-side in the browser tab on document.modelContext, inside the user's authenticated session. It supports Tools only (no Resources or Prompts). It is not a backend MCP server over stdio/SSE, and tools execute application logic (state stores, APIs, client routers) directly rather than simulating typing or clicks.
schema.json, source files), read it if it is available in the workspace; otherwise ask for it, and outline how you will apply the stage's key rules from its reference file (for audits, include the verification steps). Never invent the missing artifact.schema.json, or implementation, check your output against references/audit-checklist.md.inputSchema parameters; no implementation jargon (Redux, Pinia, Express, REST, GraphQL, gRPC). → tool-design.mdinitiate_* for tools that open a form or wizard vs. book_*/create_* for immediate execution; never make the model compute values (relative dates, conversions): accept the user's phrasing and resolve it in the app, though unambiguous lookups to standard codes are fine; prefer names over opaque IDs; recommended: consolidate entities that share a lifecycle and annotations into polymorphic, batched tools, keeping trusted and user-authored content in separate tools. → tool-design.mdreadOnlyHint: true only on pure queries; consequentialHint: true only on significant, irreversible real-world actions (payments, bookings, deletions); view navigation, tab switching, and initiate_* hand-offs must not declare readOnlyHint: true (omit it) and do not need consequentialHint, protecting unsaved work inside the tool; routine mutating tools omit annotations; untrustedContentHint: true on any output containing user- or third-party-authored text, even from your own database. → annotations.mduseWebMCP throws Error (→ isError: true); native registerTool resolves { error, code, retryable } because rejections become a generic DOMException: UnknownError; declarative forms resolve structured field errors via event.respondWith. → error-handling.mdtools, default self); delegate only with <iframe allow="tools"> plus registerTool(tool, { exposedTo: ['https://trusted.origin'] }); origin isolation is required (Origin-Agent-Cluster: ?0 disables WebMCP). → vanilla-patterns.md| The developer has / asks for | Go to | Read first | Don't yet |
|---|---|---|---|
| "Add WebMCP to this project" (local code in the workspace, no URL) | Stage 1 | The project's package.json, routes, and main components; conversational-design.md | Ask what the app does; write code or schemas before Stage 1 |
| Wants a starter toolset end-to-end without stopping ("work through the design stages autonomously", "generate starter tools") | Autonomous Mode (Stages 1–6) — inspect app, run Stages 2–4 per goal with self-critique, deliver schema + evals + code | Project files, the framework file (below), conversational-design.md, evals-format.md | Skip Stages 2–4 role-play/variations; stop early to ask questions |
| One specific tool idea ("a tool to search flights") | Stage 2 or 3 for that goal | conversational-design.md, use-case-template.md | Ideate an unrelated portfolio; write code |
| Goals already defined | Stage 2 | conversational-design.md | Re-ideate goals |
| Goal + starting state | Stage 3 | use-case-template.md, conversational-design.md | Skip the critique loop |
| A happy-path transcript to harden | Stage 4 | conversational-design.md | — |
| Approved role-plays → schemas & evals | Stage 5 | tool-design.md, annotations.md, evals-format.md | Invent tools for un-modeled goals |
Existing schema.json → evals.json | Stage 5 (evals) | evals-format.md | Force Stages 1–4 |
Just finished schema.json/evals.json ("what next?") | Stage 5 eval gate | evals-format.md | Start Stage 6 without asking |
Existing schema, tool spec, or named tools to implement in framework code (e.g. "write React useWebMCP tools for list_items and move_items") | Stage 6 | The framework file (below), error-handling.md | Reopen conversational design |
A URL or domain (e.g. example.com, https://...) to add tools to or analyze for journeys | Stage 1, after exploring the site with chrome-devtools MCP | live-site-discovery.md (not conversational-design.md first) | Ask the user to describe the site; use read_url_content or guess instead of calling chrome-devtools MCP; write frontend code |
| Feedback on, review, or audit of existing tools (live site or local code) | Audit | audit-checklist.md, agent-security.md, error-handling.md | Restart Stage 1 ideation |
Testing, DevTools, chrome-devtools-mcp live discovery, Lighthouse, page readiness | — | testing-and-debugging.md | Scrape minified JS bundles |
| Concept questions | — | Budgets/naming/descriptions: tool-design.md; annotations: annotations.md; prompt injection, spotlighting: agent-security.md; errors: error-handling.md | — |
| Wants to skip design for one tool ("can we skip role-play and just code it?", "skip the design, give me the code") | Explicit fast path (below) — must open with 1 sentence noting the skipped design risks, then deliver schema + eval + code | tool-design.md, annotations.md, the framework file | Refuse to write code |
Backend MCP (stdio/SSE server, Node/Python) | Out of scope | — | Use document.modelContext on a server |
Framework files: React → react-patterns.md; Angular → angular-patterns.md; Vanilla JS, Vue, Svelte → vanilla-patterns.md; declarative HTML forms → declarative-patterns.md. All files are in references/.
Unclear entry point: ask which applies — 1) discover user goals, 2) model starting states, 3) role-play conversations, 4) harden with variations, 5) generate schema.json/evals.json, 6) implement in frontend code, or audit existing tools.
Only when the developer asks to skip design (asking "can we skip it?" counts) for a single tool. For greenfield or starter-set requests without intermediate stops, use Autonomous Mode (so Stages 1–4 still run).
evals.json case, and the framework code.document.modelContext, not by headless scraping. If chrome-devtools MCP (or another browser tool) is available in your environment, call it immediately (navigate_page, take_snapshot, check /llms.txt, and check list_webmcp_tools / document.modelContext.getTools()) to inspect the rendered pages before proposing journeys—never rely on static HTTP fetchers (read_url_content, curl) or training-data assumptions. Only if no browser tool is available in your environment, recommend browsing or inspecting the site's pages and checking /llms.txt before proposing journeys.schema.json, evals.json) and Stage 6 (framework code).device_battery, gpu_temp, screen_dpi).page_size and total_count, ≤ 1,500 chars), Site implementation & UI reaction, Agent response. Format with use-case-template.md.initiate_booking returning status: "requires_user_action" and navigating to a dedicated confirmation UI where the user clicks Confirm, rather than autonomously charging the user).Stress-test the baseline: missing required parameters (ask, never guess), prerequisite violations (actionable errors), over-constrained queries (suggest relaxations), coreference ("the second one"), and human-in-the-loop hand-off for sensitive actions (return status: "requires_user_action" and open a dedicated confirmation UI the user completes; consequentialHint: true only on a tool that commits the action itself).
tool-design.md and annotations.md to every tool.schema.json and evals.json per evals-format.md.npx webmcp-evals local -t schema.json -e evals.json now or proceed to Stage 6. If they run it, check that the provider key is set in .env (GOOGLE_AI for Gemini, or OPENAI_API_KEY / ANTHROPIC_API_KEY) and suggest a fast model.useWebMCP from use-webmcp-tool (never raw registerTool in components), schema literals hoisted or stable, and always include a Vitest + React Testing Library test that mocks document.modelContext.registerTool and calls the captured execute. Angular: provideExperimentalWebMcpTools. Vanilla: document.modelContext.registerTool with an AbortController signal. Declarative: <form toolname tooldescription>.testing-and-debugging.md (DevTools Application > WebMCP pane, Lighthouse "Agentic browsing") and self-check against audit-checklist.md.references/audit-checklist.md, references/agent-security.md, and references/error-handling.md (you can request them together), and only then open the code under review. The checklist, not the Non-Negotiables summary, is the audit standard; an audit based only on this file is incomplete.useWebMCP, registerTool, provideExperimentalWebMcpTools, <form toolname>).list_webmcp_tools (chrome-devtools-mcp with --categoryExperimentalWebmcp), await document.modelContext.getTools(), or the DevTools Application > WebMCP pane (see references/testing-and-debugging.md). If document.modelContext is undefined, WebMCP is not enabled in the browser (--enable-features=WebMCP or chrome://flags/#enable-webmcp-testing)—report that prerequisite instead of assuming no tools exist. Never fetch or scrape minified production JS bundles on a live site; only inspect live-site source when unminified or sourcemapped.await document.modelContext.getTools() across routes in the console, list_webmcp_tools via chrome-devtools-mcp, or the DevTools Application > WebMCP pane), list the checklist areas you will audit (budgets and jargon, annotations including navigation and UGC, error handling, security), and end your reply with the verification steps from step 4 (DevTools manual execution, Lighthouse "Agentic browsing").LICENSE.txt (opens in a new tab)NOTICE.txt (opens in a new tab)references/agent-security.md (opens in a new tab)references/angular-patterns.md (opens in a new tab)references/annotations.md (opens in a new tab)references/audit-checklist.md (opens in a new tab)references/conversational-design.md (opens in a new tab)references/declarative-patterns.md (opens in a new tab)references/error-handling.md (opens in a new tab)references/evals-format.md (opens in a new tab)references/live-site-discovery.md (opens in a new tab)references/react-patterns.md (opens in a new tab)references/sources.md (opens in a new tab)references/testing-and-debugging.md (opens in a new tab)references/tool-design.md (opens in a new tab)references/use-case-template.md (opens in a new tab)references/vanilla-patterns.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub nekuda-ai/webmcp-kit --plugin webmcp-kit4 skills in this plugin
/connect-existing-toolsConnect a site's existing WebMCP tools to AgentLane without rebuilding them. Use when a codebase already registers document.modelContext tools — natively or through any SDK — and the developer wants them visible in AgentLane, migrated onto @nekuda/webmcp-sdk with durable stable keys and verified to behave exactly as before, or, when the developer declines that rewrite, reported as they are through a tracking-only install./implementAdd WebMCP tools to a website codebase so browser agents can act through the site's own logic instead of scraping the page. Covers the whole site in one run — every visitor journey planned together, one approval, code on @nekuda/webmcp-sdk, each tool proven in a browser. Use when asked to make a site agent-ready or WebMCP-ready, add WebMCP or document.modelContext tools to this codebase (the whole site, one flow or one tool), or implement site tools with @nekuda/webmcp-sdk. To design one tool in depth (role-play, schema.json, evals.json) or audit existing tools, use build-webmcp-tools./verifyCheck that a locally running site's WebMCP tools register and execute correctly. Use to verify WebMCP tools, confirm document.modelContext tools appear on the right pages and auth states, or test @nekuda/webmcp-sdk tools in a browser.Other plugins' skills for the same job