webview-devtools

A tool for inspecting and automating a WebView or web page that has already been connected to a local control server.

In plain words
What is it for?
Use it to list and select connected WebViews, navigate them, and interact with elements. The page must load the server’s target.js script first.
Why use it?
It lets you work with an existing app page without opening a separate Chrome browser. It also makes connected pages and their connection changes visible.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/ilharp/webview-devtools-mcp/webview-devtools
Any agent
npx skills add ilharp/webview-devtools-mcp --skill webview-devtools
Clone the repo
git clone --depth 1 https://github.com/ilharp/webview-devtools-mcp

Made for: Claude Code, Codex.

Per session 102 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 985 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00102 $0.00985
Opus 5 $0.00051 $0.00492
Sonnet 5 $0.00020 $0.00197
Haiku 4.5 $0.00010 $0.00098

Measured 2d ago against content hash 113f8b52c85e, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

webview-devtools 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 2d ago.

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.

skills/webview-devtools/SKILL.md · 49 lines

How it starts

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

Core Concepts

Instrumented WebView, not launched Chrome: This skill is for WebViews/pages that already load the wdmcp server’s target.js, for example with <script src="//<host>:<port>/target.js"></script>. The MCP server does not open or navigate a Chrome profile for the user; it starts a local wdmcp server and waits for instrumented targets to connect back. If no target connects, the first tool call times out with guidance to inject target.js. target.js bridge: target.js is the webview-side bundle. When loaded in the page, it opens a target WebSocket to the wdmcp server, registers page metadata (URL/title/favicon), and runs an in-page CDP backend. Page availability and lifecycle: list_pages shows currently connected instrumented WebViews. A page appears only while the WebView is open and connected; reloads/disconnects are surfaced as target create/destroy events. Use select_page when multiple WebViews are connected. Navigation constraints: navigate_page can act only on the currently connected WebView through its in-page backend; it cannot create a fresh browser tab or inject target.js into an unconfigured page for you. Element interaction: Use take_snapshot to get page structure with element uids. Each element has a unique uid for interaction. If an element isn't found, take a fresh snapshot - the element may have been removed or the page changed.

Environment Readiness

Before using the tools, decide whether the user's target page is already connected or can be connected:

  1. Confirm the page/WebView is intended to be inspected through this skill.
  2. Determine the server URL the page should load. Start from the MCP configuration, because the port may not be the default 9333: look for workspace/client config files such as .mcp.json, gemini-extension.json, .claude/settings.json, .vscode/launch.json, or .gemini/settings.json, then inspect the configured command args for --port and --host.
  3. If no configured host/port is found, use the defaults 127.0.0.1:9333. Confirm the page loads that exact target.js URL, for example <script src="http://<host>:<port>/target.js"></script>.
  4. Confirm <host>:<port> is reachable from the device or runtime that hosts the WebView. For a mobile device, simulator, remote WebView, or embedded app, 127.0.0.1 usually means the device itself, not the user's development machine; use a reachable host address instead.
  5. If the user has not added target.js yet, do not call browser-automation tools first. Explain the injection requirement and help them configure it.
  6. If the user says the page is already configured, use list_pages to check connected targets. If no page appears or the first tool call times out, ask the user to open/reload the WebView and verify the injected script URL is reachable.

Read the full file on GitHub · 49 lines

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. 2d ago First seen · 49 lines · 102 tokens per session scan A 113f8b52c85e

Subscribe to this mod's changes

webview-devtools is a skill published in the GitHub repository ilharp/webview-devtools-mcp (2 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 102 tokens to every session and 985 once invoked, about $0.0005 per session on Opus 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-08-31.

Related

Other skills, from other repositories

chrome-devtools-cli

Use this skill to write shell scripts or run shell commands to automate tasks in the browser or otherwise use Chrome DevTools via CLI.

ChromeDevTools/chrome-devtools-mcp · 31 tokens

cookie-debugging

Uses Chrome DevTools MCP for inspecting, debugging, and testing cookies, session state, authentication issues, and cookie consent compliance. Use when diagnosing 401/403 errors, authentication redirects, session expiration, Cookie/Set-Cookie header issues, cookie banner consent conformance, or third-party…

ChromeDevTools/chrome-devtools-mcp · 71 tokens

chrome-devtools

Uses Chrome DevTools via MCP for efficient debugging, troubleshooting and browser automation. Use when debugging web pages, automating browser interactions, analyzing performance, or inspecting network requests. This skill does not apply to --slim mode (MCP configuration).

ChromeDevTools/chrome-devtools-mcp · 55 tokens

surf

Control Chrome browser via CLI for testing, automation, and debugging. Use when the user needs browser automation, screenshots, form filling, page inspection, network/CPU emulation, DevTools streaming, or AI queries via ChatGPT/Gemini/Perplexity/Grok/AI Studio.

nicobailon/surf-cli · 60 tokens

surf-codebase

Navigate and modify surf-cli codebase - Chrome extension + native host for AI browser automation. Use for surf-cli code work, architecture questions, implementing browser control/CDP/accessibility/network features.

nicobailon/surf-cli · 42 tokens

hapo:chrome-devtools

Automate browsers with Puppeteer CLI scripts and persistent sessions. Use for screenshots, performance analysis, network monitoring, web scraping, form automation, JavaScript debugging.

haposoft/cafekit · 39 tokens