# Send WebMCP to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "webmcp",
    "name": "WebMCP",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/brunobuddy/webmcp",
    "canonicalUrl": "https://clawhub.ai/brunobuddy/webmcp",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/webmcp",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=webmcp",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "webmcp",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-10T23:54:04.349Z",
      "expiresAt": "2026-05-17T23:54:04.349Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=webmcp",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=webmcp",
        "contentDisposition": "attachment; filename=\"webmcp-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "webmcp"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/webmcp"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/webmcp",
    "downloadUrl": "https://openagent3.xyz/downloads/webmcp",
    "agentUrl": "https://openagent3.xyz/skills/webmcp/agent",
    "manifestUrl": "https://openagent3.xyz/skills/webmcp/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/webmcp/agent.md"
  }
}
```
## Documentation

### What is WebMCP

WebMCP is a browser API that lets websites expose JavaScript functions as structured tools for AI agents. Pages register tools via window.navigator.modelContext, each with a name, description, JSON Schema input, and an execute callback. Think of it as an MCP server running inside the web page itself.

Spec: https://github.com/webmachinelearning/webmcp

### Detecting WebMCP Support

Before interacting with tools, check whether the current page supports WebMCP:

const supported = "modelContext" in window.navigator;

If false, the page does not expose WebMCP tools — fall back to DOM interaction or actuation.

### Discovering Available Tools

Tools are registered by the page via provideContext() or registerTool(). The browser mediates access. To list available tools from an agent's perspective, evaluate:

// Browser-specific — the exact discovery API depends on the agent runtime.
// Typically the browser exposes registered tools to connected agents automatically.
// From page-script perspective, tools are registered like this:
window.navigator.modelContext.provideContext({
  tools: [
    {
      name: "tool-name",
      description: "What this tool does",
      inputSchema: { type: "object", properties: { /* ... */ }, required: [] },
      execute: (params, agent) => { /* ... */ }
    }
  ]
});

Key points:

Each tool has name, description, inputSchema (JSON Schema), and execute.
provideContext() replaces all previously registered tools (useful for SPA state changes).
registerTool() / unregisterTool() add/remove individual tools without resetting.
Tools may change as the user navigates or as SPA state updates — re-check after page transitions.

### Tool Schema Format

Tool input schemas follow JSON Schema (aligned with MCP SDK and Prompt API tool use):

{
  name: "add-stamp",
  description: "Add a new stamp to the collection",
  inputSchema: {
    type: "object",
    properties: {
      name: { type: "string", description: "The name of the stamp" },
      year: { type: "number", description: "Year the stamp was issued" },
      imageUrl: { type: "string", description: "Optional image URL" }
    },
    required: ["name", "year"]
  },
  execute({ name, year, imageUrl }, agent) {
    // Implementation — updates UI and app state
    return {
      content: [{ type: "text", text: \`Stamp "${name}" added.\` }]
    };
  }
}

### Invoking Tools

When connected as an agent, send a tool call by name with parameters matching inputSchema. The execute callback runs on the page's main thread, can update the UI, and returns a structured response:

// Response format from execute():
{
  content: [
    { type: "text", text: "Result description" }
  ]
}

Tools run sequentially on the main thread (one at a time).
execute may be async (returns a Promise).
The second parameter agent provides agent.requestUserInteraction() for user confirmation flows.

### User Interaction During Tool Execution

Tools can request user confirmation before sensitive actions:

async function buyProduct({ product_id }, agent) {
  const confirmed = await agent.requestUserInteraction(async () => {
    return confirm(\`Buy product ${product_id}?\`);
  });
  if (!confirmed) throw new Error("Cancelled by user.");
  executePurchase(product_id);
  return { content: [{ type: "text", text: \`Product ${product_id} purchased.\` }] };
}

Always respect user denials — do not retry cancelled tool calls.

### Agent Workflow

Navigate to the target website.
Check "modelContext" in window.navigator to confirm WebMCP support.
Discover registered tools (names, descriptions, schemas).
Select the appropriate tool based on the user's goal and the tool description.
Invoke with correct parameters matching inputSchema.
Read the structured response and relay results to the user.
After SPA navigation or state changes, re-discover tools — the set may have changed.
If no WebMCP tool fits the task, fall back to DOM-based interaction.

### Important Constraints

Browser context required — tools only exist in a live browsing context (tab/webview), not headlessly.
Sequential execution — tool calls run one at a time on the main thread.
No cross-origin tool sharing — tools are scoped to the page that registered them.
Permission-gated — the browser may prompt the user before allowing tool access.
Tools are dynamic — SPAs may register/unregister tools based on UI state.
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: brunobuddy
- Version: 1.0.0
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-10T23:54:04.349Z
- Expires at: 2026-05-17T23:54:04.349Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/webmcp)
- [Send to Agent page](https://openagent3.xyz/skills/webmcp/agent)
- [JSON manifest](https://openagent3.xyz/skills/webmcp/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/webmcp/agent.md)
- [Download page](https://openagent3.xyz/downloads/webmcp)