Skills chrome-devtools-mcp-manager
Manage chrome-devtools-mcp service and OpenClaw's built-in Chrome browser for MCP-based browser automation. Use when user needs to use chrome-devtools-mcp functionality, ensure the browser is ready for MCP operations, or manage the browser/MCP lifecycle.
git clone https://github.com/openclaw/skills
T=$(mktemp -d) && git clone --depth=1 https://github.com/openclaw/skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/andeymei/chrome-devtools-mcp-manager" ~/.claude/skills/openclaw-skills-chrome-devtools-mcp-manager && rm -rf "$T"
T=$(mktemp -d) && git clone --depth=1 https://github.com/openclaw/skills "$T" && mkdir -p ~/.openclaw/skills && cp -r "$T/skills/andeymei/chrome-devtools-mcp-manager" ~/.openclaw/skills/openclaw-skills-chrome-devtools-mcp-manager && rm -rf "$T"
skills/andeymei/chrome-devtools-mcp-manager/SKILL.mdChrome DevTools MCP Manager
Manage OpenClaw's built-in Chrome browser and chrome-devtools-mcp integration for browser automation via MCP protocol.
Overview
This skill manages two components:
- OpenClaw's Built-in Chrome (
profile) - The browser instanceopenclaw - chrome-devtools-mcp - The MCP server that exposes browser control tools
Architecture
┌─────────────────┐ ┌─────────────────────┐ ┌─────────────────┐ │ OpenClaw │────▶│ Built-in Chrome │◀────│ chrome-devtools│ │ (browser tool)│ │ (CDP Port 18800) │ │ -mcp (MCP srv) │ └─────────────────┘ └─────────────────────┘ └─────────────────┘ │ ▼ ┌─────────────────┐ │ MCP Client │ │ (mcporter etc) │ └─────────────────┘
Built-in Chrome (openclaw profile)
- CDP Port: 18800
- Managed by: OpenClaw's
toolbrowser - Auto-start: Yes, via
browser(action: "open") - Profile isolation: Separate user data directory
chrome-devtools-mcp
- Type: MCP (Model Context Protocol) server
- Transport: stdio (not HTTP)
- Lifecycle: Runs per MCP client session
- Connection: Connects to Chrome via CDP on port 18800
Component Status Check
1. Check Built-in Chrome Status
browser({ action: "status", profile: "openclaw" })
Expected running state:
{ "enabled": true, "profile": "openclaw", "running": true, "cdpReady": true, "cdpPort": 18800, "cdpUrl": "http://127.0.0.1:18800" }
2. Verify CDP Endpoint
Invoke-WebRequest -Uri "http://localhost:18800/json/version" -Method GET
Expected response:
{ "Browser": "Chrome/134.0.0.0", "Protocol-Version": "1.3", "User-Agent": "Mozilla/5.0...", "V8-Version": "...", "WebKit-Version": "...", "webSocketDebuggerUrl": "ws://localhost:18800/devtools/browser/..." }
3. Check MCP Server Status
Since chrome-devtools-mcp runs as a stdio service per MCP client session, there's no persistent process to check. Instead, verify the MCP configuration is correct.
Managing Built-in Chrome
Start Built-in Chrome
// Open a blank page to start Chrome browser({ action: "open", profile: "openclaw", url: "about:blank" }) // Or navigate to a specific URL browser({ action: "open", profile: "openclaw", url: "https://chat.deepseek.com/" })
Stop Built-in Chrome
browser({ action: "stop", profile: "openclaw" })
Restart Built-in Chrome
// Stop first browser({ action: "stop", profile: "openclaw" }) // Then start browser({ action: "open", profile: "openclaw", url: "about:blank" })
MCP Server Configuration
For mcporter CLI
Configure mcporter to use chrome-devtools-mcp:
# Add MCP server to mcporter mcporter server add chrome-devtools \ --command "npx" \ --args "chrome-devtools-mcp@latest,--browserUrl,http://127.0.0.1:18800,--no-usage-statistics" # Or with auto-connect (Chrome will be started if not running) mcporter server add chrome-devtools \ --command "npx" \ --args "chrome-devtools-mcp@latest,--autoConnect,--no-usage-statistics"
For Claude Desktop / Other MCP Clients
Add to
claude_desktop_config.json:
{ "mcpServers": { "chrome-devtools": { "command": "npx", "args": [ "chrome-devtools-mcp@latest", "--browserUrl", "http://127.0.0.1:18800", "--no-usage-statistics" ] } } }
Environment Variables
# Disable usage statistics $env:CHROME_DEVTOOLS_MCP_NO_USAGE_STATISTICS = "1" # Enable debug logging $env:DEBUG = "*"
Complete Setup Workflow
First-Time Setup
-
Verify built-in Chrome is ready:
const status = await browser({ action: "status", profile: "openclaw" }) if (!status.cdpReady) { await browser({ action: "open", profile: "openclaw", url: "about:blank" }) } -
Test CDP connection:
Invoke-WebRequest -Uri "http://localhost:18800/json/version" -
Configure MCP client (mcporter, Claude Desktop, etc.)
-
Test MCP connection:
mcporter call chrome-devtools.list_pages
Daily Usage Pattern
-
Ensure Chrome is running (before MCP operations):
const status = await browser({ action: "status", profile: "openclaw" }) if (!status.cdpReady) { await browser({ action: "open", profile: "openclaw", url: "about:blank" }) await new Promise(r => setTimeout(r, 2000)) // Wait for startup } -
Use MCP tools via mcporter or other MCP client
-
Keep Chrome running for subsequent operations
Available MCP Tools
Once connected via chrome-devtools-mcp, these tools are available:
Page Management
- List all open tabs/pageslist_pages
- Create new tabnew_page
- Switch to specific tabselect_page
- Close a tabclose_page
- Navigate to URL / back / forward / refreshnavigate_page
Interaction
- Click element by uidclick
- Fill input fieldfill
- Type texttype_text
- Press keyboard keypress_key
- Select dropdown optionselect_option
Inspection
- Get accessibility tree snapshottake_snapshot
- Capture screenshottake_screenshot
- Execute JavaScriptevaluate_script
- Wait for text/elementwait_for
Browser State
- Get cookies, localStorage, etc.get_browser_state
- Set cookies, localStorage, etc.set_browser_state
Integration with Other Skills
Example: deepseek-web-query
This skill uses chrome-devtools-mcp via mcporter:
# 1. Ensure Chrome is running (via browser tool) # 2. Use mcporter to call MCP tools mcporter call chrome-devtools.navigate_page type: "url" url: "https://chat.deepseek.com/" mcporter call chrome-devtools.take_snapshot mcporter call chrome-devtools.type_text text: "查询内容" mcporter call chrome-devtools.press_key key: "Enter" mcporter call chrome-devtools.evaluate_script function: '() => document.body.innerText'
Troubleshooting
"CDP not ready"
Symptoms:
browser({ action: "status" }) shows cdpReady: false
Solutions:
- Restart Chrome:
browser({ action: "stop", profile: "openclaw" }) browser({ action: "open", profile: "openclaw", url: "about:blank" }) - Check for port conflicts:
Get-NetTCPConnection -LocalPort 18800
"Cannot connect to Chrome" from MCP
Symptoms: MCP server fails to connect
Solutions:
- Verify CDP endpoint is accessible:
curl http://localhost:18800/json/version - Check Windows Firewall isn't blocking localhost
- Ensure Chrome was started with remote debugging enabled (built-in profile does this automatically)
MCP server exits immediately
This is normal behavior! The MCP server:
- Waits for JSON-RPC messages on stdin
- Exits when stdin closes (client disconnects)
- Is designed to be launched per-session by MCP clients
Port 18800 conflicts
Check what's using the port:
Get-NetTCPConnection -LocalPort 18800 | Select-Object LocalPort, State, OwningProcess, @{Name="ProcessName";Expression={(Get-Process -Id $_.OwningProcess -ErrorAction SilentlyContinue).Name}}
Kill conflicting process:
Get-Process -Id (Get-NetTCPConnection -LocalPort 18800).OwningProcess | Stop-Process -Force
Best Practices
- Always check Chrome status first before MCP operations
- Reuse browser sessions - Don't close Chrome between operations
- Use
for quick startup when you don't need a specific pageabout:blank - Configure MCP client once - The config persists across sessions
- Handle login states in your automation logic (e.g., deepseek-web-query handles DeepSeek login)
Quick Reference
| Task | Command |
|---|---|
| Check Chrome status | |
| Start Chrome | |
| Stop Chrome | |
| Test CDP | |
| Add MCP to mcporter | |
| List MCP pages | |