让 AI 用上你录的脚本

webXport 通过 MCP(Model Context Protocol)暴露你的脚本给 AI agent。 在你的 AI 客户端里注册一次,之后 AI 就能列出 / 调用你录的所有脚本。

💡 也可以让 AI 替你安装:对你的 AI 说「读 https://webxport.kaerai.club/ai-install 按步骤执行」,它会替你装好并告诉你怎么验证。扩展的新手引导里也会直接给你这段提示词。

⚠️ 前置条件

  1. 已在 Chrome 装好 webXport 扩展(已登录 + 试用期 / 付费有效)
  2. 至少录过 1 个脚本
  3. 本机有 Node.js ≥ 18(nodejs.org 下载 LTS)

在你的 AI 客户端注册一行命令

MCP server 走 npx 自动下载, 无需 git clone、无需自己 build、新版自动拉取。

Claude Code

claude mcp add -s user webxport npx -y @webxport/mcp

终端跑一次。-s user 表示全局生效。

Cursor

// 把这段加进 ~/.cursor/mcp.json
{
  "mcpServers": {
    "webxport": {
      "command": "npx",
      "args": ["-y", "@webxport/mcp"]
    }
  }
}

保存后重启 Cursor。

Codex / Cherry Studio / 其他 MCP-capable 客户端

# 通用 MCP 配置(stdio transport)
command: npx
args: ["-y", "@webxport/mcp"]
transport: stdio

各客户端配置入口不同但 command/args 都一样。

让 AI 调一次

重启 AI 客户端,然后随便发一句:

列出我的 webxport 脚本

AI 应该返回你录过的所有脚本名 + 可调参数。然后调一个具体的:

帮我用 webxport 跑「小红书每日数据」,日期取昨天到上周

AI 不会打开浏览器、不会读屏。它只是按参数调你预录好的脚本, 文件直接下到你 ~/Downloads/webxport/<脚本名>/<日期>/

常见问题

AI 说找不到 webxport 工具
检查 AI 客户端是否已重启。Claude Code 用 claude mcp list 看是否注册成功。
脚本调用返回 'license not active'
popup 看下登录状态。试用期内或付费开通后 license 有效才能用——试用到期后整个扩展会锁定,付费开通后自动恢复。
本机没装 Node.js
到 nodejs.org 下载 LTS 版本,或者 brew install node(Mac)/ choco install nodejs(Windows)。
想给团队成员用同一份配置
MCP server 是用户本地的——每个人各自装一份,注册到各自的 AI 客户端。脚本会通过云同步自动到其他设备(会员功能)。