克劳利奥特工
](https://www.npmjs.com/package/crawlio-browser) 
文档 | API 参考 | Chrome 扩展
MCP服务器,通过CDP让AI完全控制实时Chrome浏览器。100个工具(93个浏览器+3个提取+3个记录+1个编译器),具有框架感知智能、类型化证据基础设施和置信度跟踪发现,可以捕获静态爬虫无法看到的内容。
注: 此回购取代 crawlio-browser-mcp现在所有的发展都发生在这里。链接:
何时使用Crawlio代理
当您的AI需要与…交互时,请使用Crawlio Agent 真实浏览器 --SPA、经过身份验证的页面、动态内容、JS渲染框架。与无头浏览器工具不同,Crawlio Agent连接到 您的实际Chrome 通过轻量级扩展,让人工智能访问您的登录会话、Cookie和完整浏览器状态。
Crawlio代理与无头浏览器工具: 无头工具会启动一个单独的浏览器进程。Crawlio Agent连接到您现有的Chrome浏览器——没有单独的浏览器,没有登录流,可以完全访问您的标签和会话。
快速开始
- 安装 Chrome 扩展
- 运行init向导:
npx crawlio-browser init就是这样。自动检测和配置14个MCP客户端:Claude Code、Cursor、VS Code、Codex、Gemini CLI、Claude Desktop、ChatGPT Desktop、Windsurf、Cline、Zed、Goose、OpenCode、MCPorter和Cline CLI。
初始化向导选项
npx crawlio-browser init # Default: code mode, stdio transport
npx crawlio-browser init --full # Full mode (100 individual tools)
npx crawlio-browser init --portal # Portal mode (persistent HTTP server)
npx crawlio-browser init --cloudflare # Add Cloudflare MCP (89 tools, no wrangler)
npx crawlio-browser init --dry-run # Show what would happen
npx crawlio-browser init --yes # Skip prompts (CI / scripted installs)
npx crawlio-browser init -a claude # Target specific MCP client运输方式
| 模式 | 命令/URL | 协议 | 最适合 |
|---|---|---|---|
| 标准 | npx crawlio-browser | 基于stdin/stdout的JSON-RPC | Claude Desktop、Cursor、Windsurf——客户端管理流程生命周期 |
| 门户(HTTP) | POST http://127.0.0.1:3001/mcp | MCP流式HTTP | 克劳德代码,ChatGPT桌面——服务器在会话重启后仍能存活 |
| 门户网站(SSE) | GET /sse + POST /message | 服务器发送事件 | 需要SSE传输的旧客户端 |
建议对Claude Code使用门户模式——服务器在上下文压缩和会话重启过程中保持不变。在macOS上, --portal 安装一个launchd代理,用于登录时自动启动。
手动设置(任何客户端)
Per-client manual config
克劳德桌面 --添加到 claude_desktop_config.json:
{ "mcpServers": { "crawlio-browser": { "command": "npx", "args": ["-y", "crawlio-browser"] } } }克劳德代码(门户模式) --开始 npx crawlio-browser --portal,然后添加到 .mcp.json:
{ "mcpServers": { "crawlio-browser": { "type": "http", "url": "http://127.0.0.1:3001/mcp" } } }克劳德代码(stdio):
claude mcp add crawlio-browser -- npx -y crawlio-browser光标 --添加到 .cursor/mcp.json:
{ "mcpServers": { "crawlio-browser": { "command": "npx", "args": ["-y", "crawlio-browser"] } } }帆板运动 --添加到Windsurf设置>MCP:
{ "mcpServers": { "crawlio-browser": { "command": "npx", "args": ["-y", "crawlio-browser"] } } }Cline(VS代码) --添加到 settings.json:
{ "cline.mcpServers": { "crawlio-browser": { "command": "npx", "args": ["-y", "crawlio-browser"] } } }ChatGPT桌面 --设置>集成>MCP: 网址: http://127.0.0.1:3001/mcp |类型:流式HTTP
运作原理
AI Client (stdio/http) --> MCP Server (Node.js) --> Chrome Extension (MV3)
crawlio-browser WebSocket -> CDPMCP服务器通过WebSocket与Chrome扩展程序通信。该扩展程序通过Chrome DevTools协议(CDP)控制浏览器。
能力
框架感知智能
每 execute 调用会探测浏览器中的框架签名,并注入变形 smart 带有框架原生访问器的对象。React状态、Vue反应性、Next.js路由、Shopify购物车数据——跨4层的17个框架名称空间,在运行时检测并在每次导航时重建。AI不会查询通用DOM;它查询框架自己的数据结构。
循证分析
方法模式在代码模式的基础上增加了高阶方法和类型化证据系统。 smart.extractPage() 在一次调用中运行7个并行操作——页面捕获、性能指标、安全状态、字体检测、元提取、可访问性审计和移动就绪检查。失败的操作产生类型化 CoverageGap 录制而不是静音 nulls.通过以下方式创建的调查结果 smart.finding() 当支持数据缺失时,自动调整他们的信心。结果:结构化、可审计的研究成果,具有差距跟踪和置信度传播功能。
会话录制和回放
将浏览器交互记录为结构化数据,然后将其编译为可重用的SKILL.md自动化。在录制过程中,会自动拦截12个交互工具——点击、打字、导航、滚动——每个工具都会捕获参数、结果、时间和页面URL compileRecording() 调用将会话转换为确定性自动化脚本。
自动设置和可操作性
每一个变异动作(click, type, navigate, select_option)在执行操作之前运行可操作性检查——轮询可见性、维度、启用状态和覆盖检测。行动后,渐进式回退解决延迟问题([0, 20, 100, 100, 500]ms)等待DOM突变停止。AI不需要手动 sleep() 行动之间的召唤。
体系结构:JIT上下文运行时
JIT上下文MCP运行时是一种分层执行架构,其中每一层都吸收了一类原本会落在模型上的复杂性。该模型包含三个工具和一个干净的SDK。表面之下的一切都是运行时吸收的现实。
┌───────────────────────────────────┐
│ AI Model (LLM) │
│ Writes code, reads errors, loops │
└───────────────┬───────────────────┘
│ 3 tools: search, execute, connect_tab
▼
┌─────────────────────────────────────────────────────────────────┐
│ JIT Context MCP Runtime │
│ │
│ ┌────────────────────────────────────────────────────────────┐ │
│ │ METHOD MODE │ │
│ │ Behavioral protocol + higher-order methods │ │
│ │ scrollCapture · waitForIdle · extractPage · comparePages │ │
│ │ detectTables · extractTable · waitForNetworkIdle · │ │
│ │ extractData │ │
│ │ │ │
│ │ ↳ Absorbs: behavioral variance, ad-hoc composition, │ │
│ │ inconsistent output shapes, data extraction patterns │ │
│ ├────────────────────────────────────────────────────────────┤ │
│ │ POLYMORPHIC CONTEXT │ │
│ │ 17 framework namespaces, injected Just-In-Time │ │
│ │ react · vue · angular · nextjs · shopify · ... │ │
│ │ │ │
│ │ ↳ Absorbs: framework opacity, minified code, │ │
│ │ devtools hook complexity │ │
│ ├────────────────────────────────────────────────────────────┤ │
│ │ ACTIONABILITY ENGINE │ │
│ │ 7 core smart methods with built-in resilience │ │
│ │ click · type · navigate · waitFor · evaluate · │ │
│ │ snapshot · screenshot │ │
│ │ │ │
│ │ ↳ Absorbs: DOM timing, hydration delays, CSS animations, │ │
│ │ disabled states, overlapping elements │ │
│ ├────────────────────────────────────────────────────────────┤ │
│ │ TETHERED IPC BRIDGE │ │
│ │ WebSocket ↔ Chrome extension, message queue, │ │
│ │ heartbeat, auto-reconnect, stale detection │ │
│ │ │ │
│ │ ↳ Absorbs: connection drops, tab refreshes, │ │
│ │ port conflicts, extension lifecycle │ │
│ ├────────────────────────────────────────────────────────────┤ │
│ │ 133 RAW COMMANDS (bridge.send) │ │
│ │ CDP-level browser control via Chrome extension │ │
│ └────────────────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────┘
│
▼
┌───────────────────────────────────┐
│ Live Chrome Browser │
│ Persistent session, real DOM, │
│ framework runtime, user state │
└───────────────────────────────────┘每一层吸收什么
| 层 | 没有它 | 有它 |
|---|---|---|
| 栓系IPC桥 | 选项卡刷新时脚本崩溃,重新连接时挂起的命令丢失,启动时端口冲突 | 具有消息队列的弹性WebSocket(容量为100 msg),心跳过时检测(间隔15秒),自动重新连接排水 |
| 可操作性引擎 | click('#btn') 在按钮渲染之前、CSS转换期间或覆盖它时触发 | 渐进式轮询(存在→ 具有尺寸→ 可见的→ 未禁用→ 未被遮挡) [0, 20, 100, 100, 500]ms 后退 |
| 多态语境 | 模型被缩小 ` | |
| ` 元素;读取React状态需要知道确切的挂钩路径、渲染器映射和光纤根API | 运行时探测实时JS环境,检测17个框架,注入名称空间方法(smart.react.getVersion(), smart.nextjs.getData()) | |
| 方法模式 | 模型由特殊的基元组成——不一致的滚动循环、遗漏的边缘情况、不同的返回形状 | 8种测试方法编码了正确的模式;行为协议约束工作流 |
执行生命周期
- 发现 --模型调用
search("page capture performance")并获取相关命令的文档 - 框架检测 --运行时探测实时DOM,检测活动框架,构造多态
smart具有适当命名空间的对象 - 示波器组装 --Model的代码被编译成一个带有注入参数的异步函数:
bridge(133个命令),crawlio(HTTP客户端),sleep,TIMEOUTS,smart(7个核心+8个高阶+最多17个框架命名空间),compileRecording - 执行 --方法模式方法组成了较低的层:
extractPage()火灾7平行bridge.send()电话;click()运行可操作性引擎;react.getVersion()评估特定于框架的表达式 - 错误恢复(代理REPL) --失败时,浏览器将保持在产生错误的确切状态。模型读取结构化错误,进行调整并调用
execute再一次。框架缓存持续存在——除非URL更改,否则不会重新检测
设计原则
- 向下吸收复杂性 --每一类困难(连接管理、DOM计时、框架检测、多步组合)都由最适合它的层处理。模型只在顶部遇到干净的接口。
- 根据目标塑造SDK --多态上下文系统检测页面是什么,并重塑可用的方法以进行匹配。该模型针对稳定的接口进行写入;运行时在下面进行调整。
- 跨周期保持状态 --系留架构意味着模型可以在相同的实时环境中失败、学习和重试——将错误处理从“从头开始重新启动”转变为“调整并继续”
如何比较
| 维度 | 标准MCP | Cloudflare代码模式 | JIT上下文运行时 |
|---|---|---|---|
| 上下文中的工具 | 50-100多种模式 | 2(search, execute) | 3 (search, execute, connect_tab) |
| 执行环境 | N/A(工具调用) | V8隔离(无状态) | 本地异步沙盒(有状态,连接到实时浏览器) |
| DOM访问 | 通过单独的工具调用 | 无 | 实时、持久、框架感知 |
| 框架意识 | 无 | 无 | 17个命名空间,注入JIT |
| 行动韧性 | 模型必须处理时间 | N/A(无DOM) | 内置可操作性轮询+解决延迟 |
| 错误恢复 | 重新调用单个工具 | 重新创建隔离 | 针对相同的活动状态重新执行(代理REPL) |
| 多步模式 | 模型即兴创作 | 模型写入循环 | 8种经过测试的高阶方法+行为协议 |
两种模式
代码模式(3个工具)--默认
将100个工具拆分为3个高级工具,模式标记减少约95%:
| 工具 | 说明 |
|---|---|
search | 按关键字查找可用命令 |
execute | 使用以下命令运行异步JS bridge, crawlio, smart, sleep,以及 compileRecording 在范围内 |
connect_tab | 连接到浏览器选项卡 |
// Navigate and screenshot
await bridge.send({ type: 'browser_navigate', url: 'https://example.com' }, 30000);
await sleep(2000);
const screenshot = await bridge.send({ type: 'take_screenshot' }, 10000);
return screenshot;全模式(100个工具)
所有直接接触LLM的工具。启用 --full:
npx crawlio-browser init --full智能对象
在代码模式下 smart 对象为框架感知助手提供了自动等待和可操作性检查。
核心方法
| 方法 | 说明 |
|---|---|
smart.evaluate(expression) | 通过CDP在页面中执行JS |
smart.click(selector, opts?) | 自动等待点击,500毫秒结束 |
smart.type(selector, text, opts?) | 自动等待型,300ms稳定 |
smart.navigate(url, opts?) | 以1000ms的稳定时间导航 |
smart.waitFor(selector, timeout?) | 轮询,直到元素可操作 |
smart.snapshot() | 可访问性树快照 |
smart.screenshot() | 全屏截图(base64 PNG) |
高阶方法
| 方法 | 说明 |
|---|---|
smart.scrollCapture(opts?) | 滚动到底部,在每个位置捕捉屏幕截图。处理卡住滚动检测、底部检测、部分封顶和滚动重置。 |
smart.waitForIdle(timeout?) | 基于MutationObserver的空闲检测——等待500毫秒的安静窗口。超时时间严格限制在15秒。替换盲板 sleep() 电话。 |
smart.extractPage(opts?) | 一次调用中有7个并行操作——页面捕获、性能、安全性、字体、元、可访问性、移动就绪性。键入的返回值 PageEvidence 随着 CoverageGap[] 对于任何失败的事情。 |
smart.comparePages(urlA, urlB) | 导航到两个URL,运行 extractPage() 在每一个上,返回一个 ComparisonScaffold 具有11个维度、共享/缺失字段和可比指标。 |
类型化证据
带置信度传播的结构化分析结果方法:
| 方法 | 说明 |
|---|---|
smart.finding(data) | 创建已验证的 Finding 声明、证据、源URL、信心和方法。拒绝具有特定错误的格式错误的输入。 |
smart.findings() | 获取所有会话累积结果(返回一份副本) |
smart.clearFindings() | 重置会议结果和覆盖差距 |
当发现 dimension 如果匹配有效覆盖范围差距,则信心会自动上限:
| 输入置信度 | 有效差距 | 输出 |
|---|---|---|
high | reducesConfidence: true | medium + confidenceCapped: true |
medium | reducesConfidence: true | low + confidenceCapped: true |
low | 任何 | low (地板) |
| 任何 | 无匹配间隙 | 不变 |
框架命名空间
当检测到框架时,智能对象会公开特定于框架的助手:
React — smart.react
| 方法 | 返回 |
|---|---|
getVersion() | 版本字符串和捆绑包类型 |
getRootCount() | React根组件的数量 |
hasProfiler() | 分析器是否可用 |
isHookInstalled() | 是否安装了DevTools挂钩 |
Vue.js — smart.vue
| 方法 | 返回 |
|---|---|
getVersion() | Vue版本字符串 |
getAppCount() | Vue应用程序实例数 |
getConfig() | 应用程序配置对象 |
isDevMode() | 是否启用了DevTools |
Angular — smart.angular
| 方法 | 返回 |
|---|---|
getVersion() | ng版本属性值 |
isDebugMode() | 调试API是否可用 |
isIvy() | Ivy编译器是否处于活动状态 |
getRootCount() | 角根元素的数量 |
getState() | 完整状态对象 |
Svelte — smart.svelte
| 方法 | 返回 |
|---|---|
getVersion() | Svelte版本字符串 |
getMeta() | Svelte元数据对象 |
isDetected() | 是否检测到Svelte |
Redux — smart.redux
| 方法 | 返回 |
|---|---|
isInstalled() | 是否安装了Redux DevTools |
getStoreState() | 满店状态 |
Alpine.js — smart.alpine
| 方法 | 返回 |
|---|---|
getVersion() | Alpine版本字符串 |
getStoreKeys() | 存储对象密钥 |
getComponentCount() | 计数 [x-data] 组件 |
Next.js — smart.nextjs
| 方法 | 返回 |
|---|---|
getData() | __NEXT_DATA__ 对象 |
getRouter() | 路由器状态(路径名、查询、asPath) |
getSSRMode() | SSR模式(混合、应用路由器、静态) |
getRouteManifest() | 当前页面数据 |
Nuxt — smart.nuxt
| 方法 | 返回 |
|---|---|
getData() | __NUXT__ 对象 |
getConfig() | 应用程序配置 |
isSSR() | 服务器是否渲染 |
Remix — smart.remix
| 方法 | 返回 |
|---|---|
getContext() | __remixContext 对象 |
getRouteData() | 来自状态的加载器数据 |
Shopify — smart.shopify
| 方法 | 返回 |
|---|---|
getShop() | 店铺元数据(主题、地区、货币) |
getCart() | 购物车对象 |
WordPress — smart.wordpress
| 方法 | 返回 |
|---|---|
isWP() | WordPress是否存在 |
getRestUrl() | REST API终结点 |
getPlugins() | 活动插件列表 |
More frameworks — Gatsby, WooCommerce, Laravel, Django, Drupal, jQuery
| 命名空间 | 方法 |
|---|---|
smart.gatsby | getData(), getPageData() |
smart.woocommerce | getParams() |
smart.laravel | getCSRF() |
smart.django | getCSRF() |
smart.drupal | getSettings() |
smart.jquery | getVersion() |
方法模式
方法模式是建立在代码模式之上的域层。它增加了高阶方法、类型化证据系统和行为协议 execute 沙盒——无需更改工具表面。该模型仍然有三个工具。相同 smart 对象。下面是相同的133命令目录。变化是什么 *里面* execute.
成熟阶梯
| 层 | 优化 | 行为差异 | 证据质量 |
|---|---|---|---|
| 原始MCP (100个工具) | 完整性 | 高--扁平工具列表,无组合指导 | 无--非结构化文本 |
| 代码模式 (3个工具) | 令牌效率 | 中等——正确的原语,特殊组合 | 无——模型定义的形状 |
| 方法模式v1 (+8种方法+协议) | 一致性 | 低——正确的方法,协议约束 | 约定-- { finding, evidence, url } |
| 方法模式v2 (+类型化证据+差距+置信度) | 正确性 | 最小类型化模式、工具强制发现 | 结构化类型化记录、差距跟踪、置信度传播 |
建筑
┌────────────────────────────────────────────────────────────┐
│ execute sandbox │
│ │
│ ┌──────────────────────────────────────────────────────┐ │
│ │ Behavioral Protocol (web-research skill) │ │
│ │ Acquire → Normalize → Analyze │ │
│ ├──────────────────────────────────────────────────────┤ │
│ │ Evidence Infrastructure │ │
│ │ finding() · findings() · clearFindings() │ │
│ │ Typed records · Coverage gaps · Confidence prop. │ │
│ ├──────────────────────────────────────────────────────┤ │
│ │ Higher-Order Methods [8] │ │
│ │ scrollCapture · waitForIdle · extractPage · │ │
│ │ comparePages · detectTables · extractTable · │ │
│ │ waitForNetworkIdle · extractData │ │
│ ├──────────────────────────────────────────────────────┤ │
│ │ Smart Core [7 methods] │ │
│ │ evaluate · click · type · navigate · waitFor · │ │
│ │ snapshot · screenshot │ │
│ ├──────────────────────────────────────────────────────┤ │
│ │ Framework Namespaces [up to 17, injected JIT] │ │
│ │ react · vue · angular · nextjs · shopify · ... │ │
│ ├──────────────────────────────────────────────────────┤ │
│ │ bridge.send() — 133 raw commands │ │
│ └──────────────────────────────────────────────────────┘ │
└────────────────────────────────────────────────────────────┘每一层都编码了更多的领域知识。 bridge.send({ type: "capture_page" }) 捕获一页。 smart.extractPage() 捕获页面并并行运行性能指标、安全状态、字体检测、可访问性分析和移动就绪性检查——七个操作、一个调用、补充数据的优雅失败、为任何失败的内容键入间隙。
证据基础设施
覆盖缺口 --当补充操作在 extractPage() 失败,他们不会默默地回来 null键入的差距记录了维度、原因、影响以及是否降低了对相关调查结果的信心:
// Example gap from a failed performance metrics call
{ dimension: "performance", reason: "CDP domain disabled", impact: "method-failed", reducesConfidence: true }工具强制调查结果 — smart.finding() 在工具级别验证每个字段。如果不符合模式,模型就无法生成结果——它要么返回有效的 Finding 或者出现明显的错误。调查结果逐渐累积 execute 会话中的呼叫通过 smart.findings().
会话聚合 --调查结果和覆盖范围差距持续存在 execute 电话。一个模型可以在多个调用中进行发现,然后使用 smart.findings().使用重置 smart.clearFindings().
端到端示例:竞争审计
// 1. Extract and compare both sites (scaffold + gaps included)
const comparison = await smart.comparePages(
'https://acme.com',
'https://rival.com'
);
// 2. Make findings — confidence auto-adjusts based on data availability
smart.finding({
claim: 'Rival loads 2.3x faster on Largest Contentful Paint',
evidence: [
`Acme LCP: ${comparison.siteA.performance?.webVitals?.lcp}ms`,
`Rival LCP: ${comparison.siteB.performance?.webVitals?.lcp}ms`,
],
sourceUrl: 'https://acme.com',
confidence: 'high',
method: 'comparePages + extractPage performance metrics',
dimension: 'performance', // if perf data failed, confidence caps to "medium"
});
smart.finding({
claim: 'Acme has 12 images without alt text; Rival has 0',
evidence: [
`Acme imagesWithoutAlt: ${comparison.siteA.accessibility?.imagesWithoutAlt}`,
`Rival imagesWithoutAlt: ${comparison.siteB.accessibility?.imagesWithoutAlt}`,
],
sourceUrl: 'https://acme.com',
confidence: 'high',
method: 'comparePages + extractPage accessibility summary',
dimension: 'accessibility',
});
// 3. Capture visual evidence
await smart.navigate('https://acme.com');
await smart.waitForIdle();
const acmeVisuals = await smart.scrollCapture({ maxSections: 5 });
// 4. Return accumulated session findings + visual evidence
return {
findings: smart.findings(),
scaffold: comparison.scaffold,
gaps: { acme: comparison.siteA.gaps, rival: comparison.siteB.gaps },
visualEvidence: { acme: acmeVisuals.sectionCount + ' sections captured' },
};例子
导航、提取和分析
// Connect to active tab, extract structured page evidence
const page = await smart.extractPage();
const finding = smart.finding({
claim: `Site uses ${page.capture.framework?.name || 'no detected framework'}`,
evidence: [`Framework: ${JSON.stringify(page.capture.framework)}`],
sourceUrl: page.meta?.canonical || 'active tab',
confidence: 'high',
method: 'extractPage framework detection',
});
return { page: page.meta, finding };移动仿真+截图
// Emulate iPhone and capture
await bridge.send({ type: 'emulate_device', device: 'iPhone 14' }, 10000);
await smart.navigate('https://example.com');
await smart.waitForIdle();
const screenshot = await smart.screenshot();
return screenshot;记录和编译自动化
// Record a browser session, then compile to reusable skill
await bridge.send({ type: 'start_recording' }, 10000);
await smart.navigate('https://example.com');
await smart.click('button.submit');
await smart.type('#email', 'test@example.com');
const session = await bridge.send({ type: 'stop_recording' }, 10000);
return compileRecording(session.session, 'signup-flow');拦截和模拟网络
// Block analytics, mock API response
await bridge.send({
type: 'browser_intercept',
pattern: '*analytics*',
action: 'block'
}, 10000);
await bridge.send({
type: 'browser_intercept',
pattern: '*/api/user',
action: 'mock',
body: JSON.stringify({ name: 'Test User' }),
statusCode: 200
}, 10000);
await smart.navigate('https://example.com');
return await smart.snapshot();会话录制
将浏览器会话记录为结构化数据,然后将其编译为可重用的自动化技能。在录制过程中(点击、键入、导航、滚动等),会自动拦截12个交互工具,捕获参数、结果、计时和页面URL。
// In code mode: record, interact, compile
await bridge.send({ type: 'start_recording' }, 10000);
// ... interact with the page ...
const session = await bridge.send({ type: 'stop_recording' }, 10000);
const skill = compileRecording(session.session, 'my-automation');
return skill;在全模式下,录制可作为4个单独的工具使用: start_recording, stop_recording, get_recording_status,以及 compile_recording.
自动设置
可变工具(browser_click, browser_type, browser_navigate, browser_select_option)使用可操作性检查:
- 飞行前:在操作之前轮询元素可见性、稳定性和启用状态
- 行动:分派CDP命令
- 后结算:等待DOM突变随着逐步回退而停止
[0, 20, 100, 100, 500]ms
这意味着AI不需要手动添加 sleep() 或 waitFor() 操作之间的调用——这些工具会自动处理SPA渲染延迟。
框架检测
检测 64项技术 使用全局变量、DOM标记、元标记、HTTP标头和脚本URL跨4层:
| 层级 | 框架 | 信号强度 |
|---|---|---|
| 元框架 | Next.js、Nuxt、SvelteKit、Remix、Gatsby | 独特的全局变量+父级检测 |
| 核心 | React、Vue.js、Angular、Svelte、Astro、Qwik、SolidJS、Lit、Preact | 全局+DOM标记 |
| CMS和平台 | WordPress、Shopify、Webflow、Squarespace、Wix、Drupal、Magento、Ghost、Bubble | 元标签+全局变量 |
| 库和工具 | jQuery、Bootstrap、Tailwind CSS、Alpine.js、HTMX、Turbo、模板、Redux、Ember.js、Backbone.js | DOM+全局变量 |
多框架检测返回 主要的,重要的 框架(元框架优先)加上 subFrameworks 整个堆栈的数组。
工具参考
All 100 tools — Connection, Capture, Navigation, Network, Storage, Emulation, and more
连接和状态
| 工具 | 说明 |
|---|---|
connect_tab | 通过URL、选项卡ID或活动选项卡连接到浏览器选项卡 |
disconnect_tab | 断开与当前选项卡的连接 |
list_tabs | 列出所有打开的带有ID和URL的选项卡 |
get_connection_status | 检查CDP连接状态 |
reconnect_tab | 强制重新连接以修复过时的连接 |
get_capabilities | 列出所有工具及其可用性 |
页面捕获
| 工具 | 说明 |
|---|---|
capture_page | 完整捕获:框架+网络+控制台+DOM |
detect_framework | 检测JS框架和版本 |
start_network_capture | 开始录制网络请求 |
stop_network_capture | 停止录制并返回捕获的请求 |
get_console_logs | 获取控制台日志(错误、警告、信息) |
get_cookies | 获取Cookie(敏感值已编辑) |
get_dom_snapshot | 简化的DOM树,支持shadow DOM和iframe |
take_screenshot | 屏幕截图为base64 PNG |
get_response_body | 获取捕获的网络请求的响应正文 |
导航与交互
| 工具 | 说明 |
|---|---|
browser_navigate | 导航到URL(自动结算) |
browser_click | 通过CSS选择器点击元素(自动定位、左/右/中、修饰符) |
browser_double_click | 双击元素 |
browser_type | 在元素中键入文本(自动结算) |
browser_press_key | 按键盘键(Enter、Tab、Escape、快捷键) |
browser_hover | 将鼠标悬停在元素上 |
browser_select_option | 选择 `` 按价值(自动结算) |
browser_scroll | 滚动页面或元素 |
browser_drag | 从一个元素拖动到另一个元素 |
browser_file_upload | 将文件上传到 `` |
browser_wait | 等待N毫秒 |
browser_wait_for | 等待元素状态(可见、隐藏、已连接、已分离) |
网络
| 工具 | 说明 |
|---|---|
browser_intercept | 阻止、修改URL模式的标头或模拟响应 |
emulate_network | 节流网络(离线、3G、4G、WiFi预设) |
set_cache_disabled | 禁用/启用浏览器缓存 |
set_extra_headers | 向所有请求添加自定义标头 |
get_websocket_connections | 列出活动的WebSocket连接 |
get_websocket_messages | 获取WebSocket消息历史记录 |
框架和标签
| 工具 | 说明 |
|---|---|
get_frame_tree | 获取框架层次结构(main+iframe) |
switch_to_frame | 将执行上下文切换到iframe |
switch_to_main_frame | 切换回主机 |
create_tab | 使用URL创建新选项卡 |
close_tab | 按ID关闭选项卡 |
switch_tab | 按ID聚焦选项卡 |
Cookie和存储
| 工具 | 说明 |
|---|---|
set_cookie | 设置cookie(通过CDP支持httpOnly) |
delete_cookies | 按名称/域/路径删除Cookie |
get_storage | 读取本地存储或会话存储 |
set_storage | 写入存储项 |
clear_storage | 清除所有存储项 |
get_databases | 列出IndexedDB数据库 |
query_object_store | 查询IndexedDB对象存储 |
clear_database | 清除或删除IndexedDB数据库 |
对话
| 工具 | 说明 |
|---|---|
get_dialog | 获取待处理的JS对话框(警报/确认/提示) |
handle_dialog | 接受或取消对话框 |
仿真
| 工具 | 说明 |
|---|---|
set_viewport | 设置视口尺寸 |
set_user_agent | 覆盖用户代理字符串 |
emulate_device | 模拟设备(iPhone、iPad、Pixel、Galaxy、台式机) |
set_geolocation | 覆盖地理位置坐标 |
set_stealth_mode | 反检测模式(选择加入,修补Web驱动程序指纹) |
安全
| 工具 | 说明 |
|---|---|
get_security_state | TLS证书详细信息、协议、密码 |
ignore_certificate_errors | 忽略临时环境的证书错误 |
服务人员
| 工具 | 说明 |
|---|---|
list_service_workers | 列出所有服务人员注册 |
stop_service_worker | 停止/注销服务工作者 |
bypass_service_worker | 绕过服务工作者处理网络请求 |
DOM操作
| 工具 | 说明 |
|---|---|
set_outer_html | 替换元素的HTML |
set_attribute | 设置元素属性 |
remove_attribute | 删除元素属性 |
remove_node | 从DOM中删除元素 |
CSS和JS覆盖率
| 工具 | 说明 |
|---|---|
start_css_coverage / stop_css_coverage | 跟踪使用了哪些CSS规则 |
start_js_coverage / stop_js_coverage | 跟踪执行了哪些JS代码 |
get_computed_style | 获取元素的解析CSS属性 |
force_pseudo_state | 力:悬停、:聚焦、:活动状态 |
性能和内存
| 工具 | 说明 |
|---|---|
get_performance_metrics | Chrome指标+网络重要信息(LCP、CLS、FID) |
get_dom_counters | 统计DOM节点、文档、事件侦听器 |
force_gc | 强制垃圾收集 |
take_heap_snapshot | V8堆快照摘要 |
PDF和辅助功能
| 工具 | 说明 |
|---|---|
print_to_pdf | 生成PDF(自定义纸张、边距、方向) |
get_accessibility_tree | 屏幕阅读器审计的可访问性树 |
目标和背景
| 工具 | 说明 |
|---|---|
get_targets | 列出所有Chrome目标(页面、工作程序、扩展程序) |
attach_to_target | 将CDP会话附加到任何目标 |
create_browser_context | 创建孤立的(类似隐身的)上下文 |
可视化调试
| 工具 | 说明 |
|---|---|
highlight_element | 用彩色覆盖物突出显示元素 |
show_layout_shifts | 可视化CLS区域 |
show_paint_rects | 可视化油漆/重新油漆区域 |
会话录制
| 工具 | 说明 |
|---|---|
start_recording | 开始录制浏览器会话 |
stop_recording | 停止录制并返回会话数据 |
get_recording_status | 检查录制状态 |
compile_recording | 将会话编译为SKILL.md自动化 |
Crawlio应用程序集成
可选--必需 Crawlio.app 在本地运行。
| 工具 | 说明 |
|---|---|
extract_site | 开始对活动选项卡的URL进行爬网 |
get_crawl_status | 获取爬网进度和状态 |
get_enrichment | 获取浏览器丰富数据 |
get_crawled_urls | 获取带有状态和分页的已爬网URL |
enrich_url | 在一次通话中导航+捕获+提交丰富内容 |
需求
- Node.js >= 18
- 铬 (或铬)与 Crawlio代理扩展 安装
- Crawlio.app (可选)--用于网站爬行和丰富
资源
许可证
麻省理工学院
