Cargar extensión de Chrome¶
Las extensiones de Chrome necesitan un directorio desempaquetado y un perfil persistente.
Esta receta usa el lanzamiento de extensiones desempaquetadas de CloakBrowser. El modo de conexión mediante la extensión oficial Playwright Extension instalada por separado usa PLAYWRIGHT_MCP_EXTENSION=true, un PLAYWRIGHT_MCP_EXTENSION_TOKEN de process-level y un persistent profile dedicado. No combines ambos mecanismos.
npm¶
PLAYWRIGHT_MCP_USER_DATA_DIR="$PWD/.profiles/default" \
CLOAK_PLAYWRIGHT_MCP_EXTENSION_PATHS='["/absolute/path/to/my-extension"]' \
npx -y cloakbrowser-mcp@latest
Usa un array JSON para varios paths, comas o Windows drive-letter paths.
Docker¶
docker run --rm -i \
-e PLAYWRIGHT_MCP_USER_DATA_DIR=/data/profiles/default \
-e CLOAK_PLAYWRIGHT_MCP_EXTENSION_PATHS=/extensions/my-extension \
-v "$PWD/artifacts:/data" \
-v "$PWD/extensions/my-extension:/extensions/my-extension:ro" \
swimmwatch/cloakbrowser-mcp:latest
Reinicia el servidor después de cambiar archivos o rutas de extensión.
Verificar¶
Use the MCP client to open a page where the extension should be active, then inspect behavior or capture a screenshot.