https://github.com/ChromeDevTools/chrome-devtools-mcp#connecting-to-a-running-chrome-instance
claude mcp add chrome-devtools --scope user -- npx chrome-devtools-mcp@latest --autoConnectPuis: chrome://inspect/#remote-debugging
https://github.com/dbalabka/chrome-wsl
claude mcp add chrome-devtools --scope user -- npx chrome-devtools-mcp@latest --browser-url http://127.0.0.1:9222
volta install @dbalabka/chrome-wsl
chrome-wslInstallation de Chrome.
wget -P /tmp https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i /tmp/google-chrome-stable_current_amd64.debScript pour scaler et positionner Chrome.
~/.claude.json
"mcpServers": {
"chrome-devtools": {
"type": "stdio",
"command": "bash",
"args": ["/home/jeremy/.claude/chrome-mcp.sh"],
"env": {
"DISPLAY": ":0",
"WAYLAND_DISPLAY": "wayland-0",
"XDG_RUNTIME_DIR": "/mnt/wslg/runtime-dir"
}
}
}~/.claude/chrome-mcp.sh (chmod +x)
#!/bin/bash
# Script de lancement Chrome pour le MCP chrome-devtools.
#
# Logique :
# 1. Cherche un écran connecté correspondant aux résolutions dans TARGET_RES (par ordre de préférence)
# 2. Si aucun trouvé, fallback sur le premier écran connecté
# 3. HiDPI + écran principal → scale 1.5, pas de position
# HiDPI + écran secondaire → scale 1.5 + position xrandr
# Non-HiDPI → position xrandr, pas de scale
# Résolutions cibles par ordre de préférence. Fallback: premier écran connecté.
TARGET_RES=("1920x1080" "2560x1600")
XRANDR_OUTPUT=$(xrandr)
TARGET_INFO=""
for RES in "${TARGET_RES[@]}"; do
TARGET_INFO=$(echo "$XRANDR_OUTPUT" | grep " connected" | grep "$RES" | head -1)
[ -n "$TARGET_INFO" ] && break
done
# Fallback : premier écran connecté
if [ -z "$TARGET_INFO" ]; then
TARGET_INFO=$(echo "$XRANDR_OUTPUT" | grep " connected" | head -1)
fi
POS=$(echo "$TARGET_INFO" | grep -oP '\d+x\d+\+\K\d+\+\d+' | tr '+' ',')
RES_WIDTH=$(echo "$TARGET_INFO" | grep -oP '\d+(?=x\d+\+)')
# Détecte si l'écran est HiDPI : résolution >= 2000px et taille physique inconnue ou petite (< 400mm)
PHYS_MM=$(echo "$TARGET_INFO" | grep -oP '\d+(?=mm)' | head -1)
HIDPI=false
if [ -n "$RES_WIDTH" ] && [ "$RES_WIDTH" -ge 2000 ]; then
if [ -z "$PHYS_MM" ] || [ "$PHYS_MM" -eq 0 ] || [ "$PHYS_MM" -lt 400 ]; then
HIDPI=true
fi
fi
ARGS=(
"chrome-devtools-mcp@latest"
"--executablePath=/usr/bin/google-chrome"
"--usageStatistics=false"
"--chromeArg=--no-sandbox"
"--chromeArg=--disable-setuid-sandbox"
)
# Détecte si c'est l'écran principal (premier connecté)
PRIMARY_INFO=$(echo "$XRANDR_OUTPUT" | grep " connected" | head -1)
IS_PRIMARY=false
[ "$TARGET_INFO" = "$PRIMARY_INFO" ] && IS_PRIMARY=true
if [ "$HIDPI" = true ]; then
ARGS+=("--chromeArg=--force-device-scale-factor=1.5")
fi
# Position : pas de position pour l'écran principal en HiDPI (non fiable sous WSL2)
if [ -n "$POS" ]; then
if [ "$HIDPI" != true ] || [ "$IS_PRIMARY" != true ]; then
ARGS+=("--chromeArg=--window-position=$POS")
fi
fi
exec npx "${ARGS[@]}"https://docs.astral.sh/uv/getting-started/installation/ https://oraios.github.io/serena/02-usage/030_clients.html#claude-code
Optimal pour la refacto, pas la recherche.
https://docs.augmentcode.com/context-services/mcp/quickstart-claude-code
~/.claude.json
"mongodb": {
"type": "stdio",
"command": "npx",
"args": ["-y", "mongodb-mcp-server"],
"env": {
"MDB_MCP_CONNECTION_STRING": "mongodb://localhost:27017/main",
"MDB_MCP_READ_ONLY": "true"
}
}