webmcp-cli-cdp

webmcp-cli-cdp is a skill for Claude Code, Codex from opentiny/webmcp-sdk. It costs 48 tokens per session (2,599 once invoked), scanned A, original, MIT.

A command-line browser automation guide using Chrome DevTools Protocol, a standard way to control Chrome from another program. It runs a separate Chrome instance for repeatable tests, scripts, and page extraction.

In plain words
What is it for?
Use it to open and manage tabs, inspect browser state, extract webpage content, and perform automated browser tasks.
Why use it?
It avoids relying on a user's open browser, login session, or cookies, which makes automated and CI runs more isolated and repeatable.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to open and manage tabs, inspect browser state, extract webpage content, and perform automated browser tasks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/opentiny/webmcp-sdk/cdp
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add opentiny/webmcp-sdk --skill cdp
Clone the repo
git clone --depth 1 https://github.com/opentiny/webmcp-sdk

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for webmcp-cli-cdp

README.md
[![agentmods](https://agentmods.dev/badge/skills/opentiny/webmcp-sdk/cdp/github.svg)](https://agentmods.dev/skills/opentiny/webmcp-sdk/cdp)
Your own site
<a href="https://agentmods.dev/skills/opentiny/webmcp-sdk/cdp"><img src="https://agentmods.dev/badge/skills/opentiny/webmcp-sdk/cdp/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for webmcp-cli-cdp

Your own site · 80×15
<a href="https://agentmods.dev/skills/opentiny/webmcp-sdk/cdp"><img src="https://agentmods.dev/badge/skills/opentiny/webmcp-sdk/cdp.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,599 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00048 $0.02599
Opus 5.5 $0.00019 $0.01040
Sonnet 5.5 $0.00010 $0.00520
Haiku 4.5 $0.00005 $0.00260

Measured yesterday against content hash 3dd23b189e7b, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

webmcp-cli-cdp scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

packages/webmcp-cli-skill/cdp/SKILL.md · 218 lines

How it starts

The opening of the file, as written. The whole thing — 218 lines — stays where its author put it; the contents beside it link to each section on GitHub.

WebMCP CLI (CDP 直连模式) Skill

本 Skill 指导 AI Agent 如何通过 @opentiny/webmcp-cli 的 CDP 模式(Chrome DevTools Protocol 直连)操控浏览器。

适用场景与特征

  • 独立沙箱:自动在后台启动独立的 Chrome 实例(默认配置位于 ~/.webmcp_chrome_profile),无需预先开启用户浏览器。
  • 自动化与 CI 优先:适合可重复的回归测试、批量网页内容提取、自动化脚本任务。
  • 环境自动注入:自动向目标网页注入 webmcp-polyfill 与内置的 page-agent-tool。
  • 标识特征:
    • 命令直接调用 webmcp-cli <command>(默认即 CDP 模式,无需额外参数);
    • Tab ID 格式为 32 位 UUID 字符串(Chrome Target ID);
    • 支持 CDP 专属的系统剪贴板操作(clipboard)。
    • 不复用用户真实浏览器的登录态与 Cookie。

安装

当 shell 终端提示找不到工具时执行:

npm install -g @opentiny/webmcp-cli

命令集与规范

1. 管理浏览器标签页 webmcp-cli tabs

webmcp-cli tabs open https://excalidraw.com    # 打开新网页,返回目标 tabid (UUID)
webmcp-cli tabs switch <tabid>                 # 切换到指定标签页
webmcp-cli tabs close <tabid>                  # 关闭指定标签页
webmcp-cli tabs back                           # 当前标签页后退
webmcp-cli tabs back <tabid>                   # 指定标签页后退
webmcp-cli tabs forward                        # 当前标签页前进
webmcp-cli tabs forward <tabid>                # 指定标签页前进

遇到 net::ERR_CERT_*(自签名、过期或主机名不匹配)时,加上全局参数 --ignore-certificate-errors,或设置 WEBMCP_IGNORE_CERTIFICATE_ERRORS=1。默认仍校验证书。该开关只对 CDP 模式拉起的受控浏览器生效,并保持到该浏览器进程退出。

webmcp-cli --ignore-certificate-errors tabs open https://self-signed.example

2. 查询浏览器当前状态 webmcp-cli state

返回当前活跃页签的导航元数据(URL、标题、所有打开页签、当前已注入的 webmcpTools 清单)。

webmcp-cli state
webmcp-cli state -t <tabid>   # 指定某个标签页(UUID 字符串)

输出示例:

{
  "url": "https://www.baidu.com/",
  "title": "百度一下,你就知道",
  "webmcpTools": [{ "name": "page-agent-tool" }, { "name": "baidu_search" }],
  "tabs": [
    { "tabid": "2EA73ED323E46E5E108D4E46DA4E4AA7", "title": "百度一下,你就知道", "url": "https://www.baidu.com/" }
  ]
}

注意:state 不返回页面的可交互元素(DOM 树)。获取元素必须使用 page-agent-tool 的 browserState 或 searchTree。


3. 系统剪贴板操作 webmcp-cli clipboard(CDP 专属)

webmcp-cli clipboard                      # 读取当前系统剪贴板文本
webmcp-cli clipboard "需要写入剪贴板的内容"   # 写入文本到系统剪贴板

Read the full file on GitHub · 218 lines

Files

What ships with it

7 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday Changed · +6 lines 3dd23b189e7b
  2. 24d ago First seen · 212 lines · 48 tokens per session scan A 98e6fa071f66

Subscribe to this mod's changes

webmcp-cli-cdp is a skill published in the GitHub repository opentiny/webmcp-sdk (121 stars, last pushed yesterday), licensed MIT. It adds 48 tokens to every session and 2,599 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-22.

Related

Other skills, from other repositories

webmcp-cli-skill

A skill containing instructions for installing and running webmcp-cli, a command-line tool for letting AI agents interact with browser pages. It includes descriptions of specialised tools available on pages with injected WebMCP tools.

opentiny/agent-skills · 49 tokens

debug-optimize-lcp

Guides debugging and optimizing Largest Contentful Paint (LCP) using Chrome DevTools MCP tools. Use this skill whenever the user asks about LCP performance, slow page loads, Core Web Vitals optimization, or wants to understand why their page's main content takes too long to appear. Also use when the user mentions…

ChromeDevTools/chrome-devtools-mcp · 99 tokens

interactive-login

Log a CLI in with a browser/device-code flow (aws sso, gh, glab, gcloud, …) and save the result to the keychain so later commands can request it through execute.credentials.

yc-software/qm · 46 tokens

pinchtab-mcp

Use this skill when a task requires browser automation through PinchTab's MCP server connected to a remote browser instance. Covers navigation, element interaction, data extraction, form filling, multi-step flows, and session management via MCP tools.

pinchtab/pinchtab · 52 tokens

azure-messaging-webpubsub-java

Build real-time web applications with Azure Web PubSub SDK for Java. Use when implementing WebSocket-based messaging, live updates, chat applications, or server-to-client push notifications.

microsoft/skills · 43 tokens

cua-driver

Use Cua Driver for desktop or browser tasks that are awkward or unavailable through Bash/APIs, or when the user explicitly wants GUI interaction: app testing, visual bug reproduction, form filling, calendar entry, screenshots, and demo recording. Also covers Cua setup; not OpenAI Codex Computer Use or web research.

davidondrej/skills · 68 tokens