h5-devtools-mcp MCP Server
Debug H5 pages inside Android app WebViews: console logs, exceptions, run JS.
h5-devtools-mcp scores 68 (Good), licensed MIT and written in TypeScript. It installs as a local process. It declares 3 tools. Filed under Monitoring. GitHub shows 2 stars. Package registries report about 39 downloads a week. Install configs are generated for 12 clients. Being listed in the registry is not the same as being vendor-official.
Good trust
68 of 100 from six public signals. Nobody can buy a point.
- Listed in the official MCP registry.
- OSI-style license: mit.
License, quality and maintenance
Where the 68 comes from
22 + 20 + 2 + 10 + 4 + 10 = 68. Each factor is capped, so no single signal can carry a listing.
Active in the official MCP registry, plus a known vendor namespace.
Registry: 22 of 30 points.How recently the repository saw a commit or release.
Maintenance: 20 of 20 points.GitHub stars and weekly downloads, on a log scale.
Popularity: 2 of 20 points.A clear, OSI-style open-source license.
License: 10 of 10 points.Not archived, a secure install path, a pinned version.
Security: 4 of 10 points.A real summary, a README with depth, listed tools.
Docs: 10 of 10 points.Install
Pick your client, copy the config, paste it in.
Needs Cursor or VS Code installed on this device. The button opens the app and asks you to confirm before it adds the server.
{ "mcpServers": { "xianguogou-h5-devtools-mcp": { "command": "npx", "args": [ "-y", "h5-devtools-mcp@0.1.2" ] } }}
Environment variables
This server does not declare environment variables.
Tools3Tool docs quality grade B
All capabilitiesevaluate_jstoolRun a JavaScript expression in the page and return the result (promises are awaited)
get_consoletoolRead buffered entries, filtered by level / keyword / excludekeywords, incrementally via sinceseq
list_targetstoolList debuggable pages: app package, title, URL, visibility
About
h5-devtools-mcp
English | 简体中文
An MCP server that lets coding agents (Claude Code, Codex, Cursor…) debug H5 pages running inside Android WebViews on real devices — read console output and uncaught exceptions, and run JavaScript in the page, without opening chrome://inspect.
Status: v0.1, early. Android only.
How it works
Coding agent ──MCP (stdio)──▶ h5-devtools-mcp ──adb forward──▶ webview_devtools_remote_<pid> ──CDP──▶ WebView page
Every debuggable WebView exposes a Chrome DevTools Protocol endpoint on an abstract unix socket. The server discovers those sockets over adb (the same way chrome://inspect does), forwards them to local ports, and connects with CDP.
Requirements
- Node.js 18+
adbon yourPATH(or setADB_PATH)- An Android device with USB debugging enabled
- The app must enable WebView debugging (debug builds usually do):
WebView.setWebContentsDebuggingEnabled(true);
Setup
# Claude Code
claude mcp add h5-devtools -- npx -y h5-devtools-mcp
Other MCP clients (Cursor, Codex…) take the same command: npx -y h5-devtools-mcp.
From source
git clone https://github.com/xianguoGou/h5-devtools-mcp.git
cd h5-devtools-mcp
npm install && npm run build
claude mcp add h5-devtools -- node /absolute/path/to/h5-devtools-mcp/dist/index.js
Tools
| Tool | What it does |
|---|---|
list_targets | List debuggable pages: app package, title, URL, visibility |
attach | Connect to a page and start buffering console output |
get_console | Read buffered entries, filtered by level / keyword / exclude_keywords, incrementally via since_seq |
evaluate_js | Run a JavaScript expression in the page and return the result (promises are awaited) |
detach | Disconnect from a page |
Output is designed to be token-cheap: compact one-line entries, long messages truncated, and since_seq so an agent only reads what's new instead of re-reading the whole buffer on every turn.
Example
> list_targets
- id: R5CT1234/webview_devtools_remote_8812/3A1F…
app: com.example.app (pid 8812) on SM-S9180
title: "Order"
url: https://m.example.com/order
> get_console { "levels": ["error"] }
#41 10:32:01.123 [error exception] TypeError: Cannot read properties of undefined (reading 'price')
at https://m.example.com/assets/index-8f2a.js:1:48213
next since_seq: 57
Troubleshooting
- "no debuggable WebView found" — the app hasn't enabled WebView debugging, or no WebView is alive yet. Open the H5 page first.
- "debugger in use" — only one debugger can attach to a page. Close the
chrome://inspectDevTools window. - "unauthorized" — accept the USB debugging prompt on the device.
Known limitations
- Debugger-in-use detection is best-effort. It relies on
/json/listomittingwebSocketDebuggerUrl. Recent Chromium accepts several CDP clients per page, so attach may succeed alongside an open DevTools window; older WebViews may still refuse. list_targetscan take ~3s per unresponsive app. Sockets are queried one by one with a 3s timeout, and Android freezes background apps, so their WebView sockets stop answering.attachonly re-checks the target's own socket and stays fast.evaluate_jsruns with the page's full privileges — it can read cookies, storage and tokens, and change page state. Keep it behind your agent's tool-permission prompt.- The e2e script expects port 9333 to be free. If a previous run left a headless Chromium behind, it attaches to that one; kill it first.
Development
The e2e test uses a fake adb and headless Chromium in place of a phone:
npm run build
CHROME=/path/to/chrome npm run test:e2e
Roadmap
- Discover devices and WebView pages
- Console messages, uncaught exceptions, browser log entries
- Network requests and responses
- JSBridge call logging (configurable bridge shapes)
-
evaluate_js -
screenshot - JSBridge mocking
- iOS (WKWebView via WebKit Inspector Protocol)
License
MIT
Frequently asked questions
What is h5-devtools-mcp MCP Server?
Debug H5 pages inside Android app WebViews: console logs, exceptions, run JS.
How do I install h5-devtools-mcp MCP Server in Claude Desktop, Cursor, or VS Code?
Pick your client in the Install section on this page and copy the generated config into the client's config file. Step-by-step guides: Claude Desktop, Cursor, and VS Code. h5-devtools-mcp MCP Server runs locally from the npm package h5-devtools-mcp with the command npx -y h5-devtools-mcp@0.1.2.
Is h5-devtools-mcp MCP Server free and open source?
Yes. h5-devtools-mcp MCP Server is released under the MIT license, an OSI-approved open-source license, so you can use, modify, and self-host it under those terms.
Does h5-devtools-mcp MCP Server support remote (HTTP) connections?
No remote endpoint is listed for h5-devtools-mcp MCP Server. It runs locally on your machine over stdio, started by your MCP client.
What tools does h5-devtools-mcp MCP Server provide?
h5-devtools-mcp MCP Server provides 3 tools: evaluate_js, get_console, and list_targets. See the full tool list for descriptions and parameters.
How is h5-devtools-mcp MCP Server's trust score calculated?
h5-devtools-mcp MCP Server scores 68 out of 100 (Good). The score adds six capped public signals: registry status, maintenance, popularity, license, documentation, and security. Nobody can pay for points. Read the methodology for the full formula.
Reviews
No reviews yet—Be the first to review
No published reviews yet. Used it? Tell the next person how it went.
Sign inA verified email is required to review this server.
Add badge to your README
Paste either snippet into the repository README. The image links to this listing.