vconsole-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@vconsole-mcp show me the console logs from the connected mobile page"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
vConsole MCP
注意事项: vConsole 官方不提供 MCP 链接能力,请使用 https://github.com/Simonmie/vConsole/tree/dev 中的代码尝试。
Note: Official vConsole does not provide MCP connectivity. To try this integration, use the code from the linked
devbranch above.
Expose console logs, network requests, and explicitly authorized JavaScript execution from a mobile H5 page to MCP clients such as Codex and Claude Code.
flowchart LR
Agent["Codex / Claude Code"] <-->|"MCP stdio"| MCP["vconsole-mcp"]
MCP <-->|"WebSocket :8765"| Mobile["Mobile H5 + vConsole"]
Mobile --> Data["Console / Network stores"]Records stay in the mobile page and are read on demand; the MCP process does not need a database or cloud service.
Development
pnpm install
pnpm build
node dist/index.jsThe process uses stdio for MCP and listens for mobile WebSocket connections on 0.0.0.0:8765 by default. Startup messages are written to stderr so the MCP transport remains valid.
Options can be passed as arguments or environment variables:
node dist/index.js --host 0.0.0.0 --port 8765
VCONSOLE_MCP_HOST=0.0.0.0 VCONSOLE_MCP_PORT=8765 node dist/index.jsAn optional pairing token prevents other pages from registering with the local bridge:
node dist/index.js --token your-development-token
VCONSOLE_MCP_TOKEN=your-development-token node dist/index.jsRelated MCP server: Xenon MCP Server
Install in an MCP client
Build the project first, then register the absolute entry path.
codex mcp add vconsole -- node /Users/jiangkexian/Desktop/MCP/vConsole-MCP/dist/index.js
claude mcp add vconsole -- node /Users/jiangkexian/Desktop/MCP/vConsole-MCP/dist/index.jsWith a pairing token, pass the same value to the MCP process and the mobile page:
codex mcp add vconsole --env VCONSOLE_MCP_TOKEN=your-development-token -- node /Users/jiangkexian/Desktop/MCP/vConsole-MCP/dist/index.jsAfter publishing the package, clients can use:
codex mcp add vconsole -- npx -y vconsole-mcp
claude mcp add vconsole -- npx -y vconsole-mcpOnly one MCP process can listen on port 8765 at a time. Run either Codex or Claude Code, or assign different ports when using both concurrently.
Tools
list_pages: list connected mobile pages.get_console_logs: read recent console records with optional level filtering.get_network_requests: read recent network records with optional failure, URL, body, and limit filters.execute_javascript: execute up to 100,000 characters of JavaScript in the page selected by its requiredpageIdthroughruntime.evaluate. It requires explicit authorization from the mobile user in vConsole before the code runs. Arbitrary code may mutate page state or storage, expose sensitive data, and send network requests. The optionaltimeoutis between 100 and 30,000 milliseconds and defaults to 8,000.
For the read tools, pageId is optional when one page is connected. execute_javascript always requires a pageId; call list_pages first to select the intended target.
The first three tools are read-only. execute_javascript is marked non-read-only, potentially destructive, non-idempotent, and open-world because arbitrary page code can change application state and communicate with external systems. It is the only execution capability exposed by this MCP package; no separate DOM, click, input, storage, or clear tools are provided.
Mobile connection
Initialize the forked vConsole with an endpoint:
const vConsole = new VConsole({
mcp: {
endpoint: 'ws://192.168.1.100:8765',
token: 'your-development-token',
autoConnect: true,
allowJavaScriptExecution: false,
},
});Or connect later:
vConsole.mcp.connect('ws://192.168.1.100:8765');JavaScript execution is denied by default. Enable Allow JavaScript Execution in the vConsole MCP panel for the current page. The panel permission resets after a page reload; trusted automated test pages may instead initialize vConsole with allowJavaScriptExecution: true.
Use the computer's LAN IP instead of localhost, keep the phone and computer on the same network, and allow the Node.js process through the computer firewall when prompted. This initial version is intended for trusted development networks and keeps all captured data in the mobile page. For an HTTPS H5 page, put the WebSocket endpoint behind a trusted WSS reverse proxy or relay; browsers block an HTTPS page from opening ws:// mixed content.
Available Tools
4 toolsexecute_javascriptADestructive
Execute JavaScript in a connected mobile H5 page after explicit authorization in vConsole. Arbitrary code may mutate page state or storage, expose sensitive data, and send network requests.
Inputs: code (required), pageId (required), timeout.
get_console_logsARead-onlyIdempotent
Read the latest console logs captured by vConsole on a connected mobile H5 page.
Inputs: level, limit, pageId, pluginId.
get_network_requestsARead-onlyIdempotent
Read the latest network requests captured by vConsole on a connected mobile H5 page.
Inputs: limit, pageId, failedOnly, includeBody, +1 more.
list_pagesARead-onlyIdempotent
List mobile H5 pages currently connected through vConsole.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool targets a distinct vConsole debugging concern: page discovery, console logs, network requests, and JavaScript execution. There is no overlap among these purposes, making tool selection unambiguous.
All tool names follow a consistent verb_noun pattern: list_pages, get_console_logs, get_network_requests, execute_javascript. The verbs and nouns clearly reflect each tool's function.
Four tools is a lean but well-scoped count for a vConsole debugging server. Each tool covers a core workflow without redundancy or bloat.
The set covers the primary vConsole use cases: listing pages, reading console logs, viewing network requests, and executing JavaScript. Missing storage/system info panels are a minor gap, but they can often be accessed indirectly through execute_javascript.
Maintenance
Related MCP Connectors
A paid remote MCP for AI agent browser DevTools MCP, built to return verdicts, receipts, usage logs,
Live browser debugging for AI assistants — DOM, console, network via MCP.
A paid remote MCP for AI agent browser MCP session, built to return verdicts, receipts, usage logs,
Build, run, inspect, and continue AgentScript workflows on connected Super Chrome and Mac clients.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables MCP clients to control Chrome/Edge browsers via CDP, including page navigation, element interaction, snapshots, network debugging, script execution, and performance tracing.AGPL 3.0
- AlicenseNot gradedqualityBmaintenanceEnables local MCP clients to inspect and interact with Chromium pages, manage isolated workspaces, hand off live tabs, and use scoped account and file grants under explicit human-approved permissions.3Apache 2.0
- AlicenseNot gradedqualityCmaintenanceEnables AI clients to inspect and control a running mini-program debugging host, including page actions, DOM/WeChat state, storage, logs, network bodies, source, breakpoints, and analysis tools.3Apache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables agents to observe and act on live browser pages through screenshots, bounded actions, responsive captures, console and network inspection, tab operations, and session management over local stdio or authenticated HTTP.Apache 2.0