MCP ConfigsMar 24, 2026·1 min read

Chrome MCP

Chrome MCP

Agent ready

Safe staging for this asset

This asset is staged first. The copied prompt tells the agent to inspect the staged files and ask before activating scripts, MCP config, or global config.

Stage only · 19/100Policy: stage
Agent surface
Any MCP/CLI agent
Kind
Mcp Config
Install
Stage only
Trust
Verified publisher
Entrypoint
Chrome MCP 代理脚本(防抢焦点)
Safe staging command
npx -y tokrepo@latest install 85bd27cc-4b98-4fad-a70a-cdc98418be47 --target codex

Stages files first; activation requires review of the staged README and plan.

#!/bin/bash

Chrome MCP + 持久 Proxy

用法: chrome-mcp-proxy.sh [proxy端口] [chrome端口]

依赖: ~/scripts/cdp-proxy.mjs (TokRepo: https://tokrepo.com/en/workflows/cdp-websocket-agent-e0f83e28)

npm install ws --prefix "$HOME/scripts"

前置: Chrome 打开 chrome://inspect/#remote-debugging 勾选 Allow remote debugging(一次性)

Proxy 保持和 Chrome 的持久连接,授权弹窗只出现一次

PROXY_PORT=${1:-9401} CHROME_PORT=${2:-9222} PROXY_SCRIPT="$HOME/scripts/cdp-proxy.mjs" PID_DIR="$HOME/chrome-profiles/pids" LOG_DIR="$HOME/chrome-profiles/logs"

mkdir -p "$PID_DIR" "$LOG_DIR"

本地连接绕过代理

unset http_proxy HTTP_PROXY https_proxy HTTPS_PROXY all_proxy ALL_PROXY export no_proxy="127.0.0.1,localhost" export NO_PROXY="127.0.0.1,localhost"

如果 Proxy 没跑,启动它(持久运行,不随 Claude Code 退出而死)

if ! lsof -i :${PROXY_PORT} >/dev/null 2>&1; then nohup node "${PROXY_SCRIPT}"
--port ${PROXY_PORT}
--chrome-port ${CHROME_PORT}
&>"${LOG_DIR}/proxy-${PROXY_PORT}.log" & echo $! > "${PID_DIR}/proxy-${PROXY_PORT}.pid" disown sleep 2 fi

启动 chrome-devtools-mcp,连接到 Proxy

exec npx -y chrome-devtools-mcp@latest --browserUrl "http://127.0.0.1:${PROXY_PORT}"

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets