diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index 2ec27bb81..39b9e354e 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -2,10 +2,19 @@ "name": "chrome-devtools-mcp", "version": "0.21.0", "description": "Reliable automation, in-depth debugging, and performance analysis in Chrome using Chrome DevTools and Puppeteer", + "userConfig": { + "browserUrl": { + "description": "Optional URL of a running debuggable Chrome instance, for example http://127.0.0.1:9222. Leave blank to launch Chrome automatically.", + "sensitive": false + } + }, "mcpServers": { "chrome-devtools": { "command": "npx", - "args": ["chrome-devtools-mcp@latest"] + "args": [ + "chrome-devtools-mcp@latest", + "--browser-url=${user_config.browserUrl}" + ] } } } diff --git a/README.md b/README.md index 41743ac90..3a31ea8d0 100644 --- a/README.md +++ b/README.md @@ -165,6 +165,22 @@ Then, install the plugin: Restart Claude Code to have the MCP server and skills load (check with `/skills`). +To connect the plugin to a Chrome instance that is already running with remote debugging, set the plugin's `browserUrl` option in your Claude Code settings: + +```json +{ + "pluginConfigs": { + "chrome-devtools-mcp@claude-plugins-official": { + "options": { + "browserUrl": "http://127.0.0.1:9222" + } + } + } +} +``` + +Leave `browserUrl` blank to use the default behavior where Chrome DevTools MCP launches Chrome automatically. + > [!TIP] > If the plugin installation fails with a `Failed to clone repository` error (e.g., HTTPS connectivity issues behind a corporate firewall), see the [troubleshooting guide](./docs/troubleshooting.md#claude-code-plugin-installation-fails-with-failed-to-clone-repository) for workarounds, or use the CLI installation method above instead.