Token导航 LogoToken导航TokenDH.com
研究检索操作浏览器clawhub未标认证来源可访问clear审计通过

webmcpwebmcp 网页抓取

Agent Skill

webmcp 用于处理浏览器自动化、网页检查和页面信息提取,适合在 OpenClaw 中需要让 Agent 打开页面、读取网页或验证前端流程时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

59,970

周安装

2,524

GitHub Stars

3

下载量

20,930
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:webmcp(webmcp 网页抓取)
来源仓库:https://github.com/brunobuddy/webmcp
安装命令:
openclaw skills install webmcp
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install webmcp

简介

当浏览或自动化通过 WebMCP API (window.navigator.modelContext) 公开工具的网页时,应使用此技能。它教代理如何发现、检查和调用网站上的 WebMCP 工具,而不是依赖 DOM 抓取或 UI 驱动。

SKILL.md

name
webmcp
description
This skill should be used when browsing or automating web pages that expose tools via the WebMCP API (window.navigator.modelContext). It teaches agents how to discover, inspect, and invoke WebMCP tools on websites instead of relying on DOM scraping or UI actuation.

WebMCP — Discover and Use Website Tools

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

  1. Navigate to the target website.
  2. Check "modelContext" in window.navigator to confirm WebMCP support.
  3. Discover registered tools (names, descriptions, schemas).
  4. Select the appropriate tool based on the user's goal and the tool description.
  5. Invoke with correct parameters matching inputSchema.
  6. Read the structured response and relay results to the user.
  7. After SPA navigation or state changes, re-discover tools — the set may have changed.
  8. 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.

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

80.2%
按下载量换算16,786

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

未展示

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills