debug-optimize-lcp
debug-optimize-lcp — a Claude Code skill from chromedevtools/chrome-devtools-mcp
Features
- ✓Control Chrome DevTools with AI agents
- ✓Record and analyze performance traces
- ✓Inspect network requests and console messages
- ✓Automate actions in Chrome with puppeteer
- ✓CLI for direct tool usage without MCP
Installation Guide
{
"mcpServers": {
"chrome-devtools": {
"command": "npx",
"args": ["-y", "chrome-devtools-mcp@latest"]
}
}
}[!NOTE]
Using chrome-devtools-mcp@latest ensures that your MCP client will always use the latest version of the Chrome DevTools MCP server.If you are interested in doing only basic browser tasks, use the --slim mode:
{
"mcpServers": {
"chrome-devtools": {
"command": "npx",
"args": ["-y", "chrome-devtools-mcp@latest", "--slim", "--headless"]
}
}
}See [Slim tool reference](./docs/slim-tool-reference.md).
MCP Client configuration
<details>
<summary>Amp</summary>
Follow https://ampcode.com/manual#mcp and use the config provided above. You can also install the Chrome DevTools MCP server using the CLI:
amp mcp add chrome-devtools -- npx chrome-devtools-mcp@latest</details>
<details>
<summary>Antigravity</summary>
To use the Chrome DevTools MCP server follow the instructions from <a href="https://antigravity.google/docs/mcp">Antigravity's docs</a> to install a custom MCP server. Add the following config to the MCP servers config:
{
"mcpServers": {
"chrome-devtools": {
"command": "npx",
"args": [
"chrome-devtools-mcp@latest",
"--browser-url=http://127.0.0.1:9222",
"-y"
]
}
}
}This will make the Chrome DevTools MCP server automatically connect to the browser that Antigravity is using. If you are not using port 9222, make sure to adjust accordingly.
Chrome DevTools MCP will not start the browser instance automatically using this approach because the Chrome DevTools MCP server connects to Antigravity's built-in browser. If the browser is not already running, you have to start it first by clicking the Chrome icon at the top right corner.
</details>
<details>
<summary>Claude Code</summary>
Install via CLI (MCP only)
Use the Claude Code CLI to add the Chrome DevTools MCP server (<a href="https://code.claude.com/docs/en/mcp">guide</a>):
claude mcp add chrome-devtools --scope user npx chrome-devtools-mcp@latestInstall as a Plugin (MCP + Skills)
[!NOTE]
If you already had Chrome DevTools MCP installed previously for Claude Code, make sure to remove it first from your installation and configuration files.
To install Chrome DevTools MCP with skills, add the marketplace registry in Claude Code:
/plugin marketplace add ChromeDevTools/chrome-devtools-mcpThen, install the plugin:
/plugin install chrome-devtools-mcpRestart Claude Code to have the MCP server and skills load (check with /skills).
[!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.</details>
<details>
<summary>Cline</summary>
Follow https://docs.cline.bot/mcp/configuring-mcp-servers and use the config provided above.
</details>
<details>
<summary>Codex</summary>
Follow the <a href="https://developers.openai.com/codex/mcp/#configure-with-the-cli">configure MCP guide</a>
using the standard config from above. You can also install the Chrome DevTools MCP server using the Codex CLI:
codex mcp add chrome-devtools -- npx chrome-devtools-mcp@latestOn Windows 11
Configure the Chrome install location and increase the startup timeout by updating .codex/config.toml and adding the following env and startup_timeout_ms parameters:
[mcp_servers.chrome-devtools]
command = "cmd"
args = [
"/c",
"npx",
"-y",
"chrome-devtools-mcp@latest",
]
env = { SystemRoot="C:\\Windows", PROGRAMFILES="C:\\Program Files" }
startup_timeout_ms = 20_000</details>
<details>
<summary>Command Code</summary>
Use the Command Code CLI to add the Chrome DevTools MCP server (<a href="https://commandcode.ai/docs/mcp">MCP guide</a>):
cmd mcp add chrome-devtools --scope user npx chrome-devtools-mcp@latest</details>
<details>
<summary>Copilot CLI</summary>
Start Copilot CLI:
copilotStart the dialog to add a new MCP server by running:
/mcp addConfigure the following fields and press CTRL+S to save the configuration:
chrome-devtools[1] Localnpx -y chrome-devtools-mcp@latest</details>
<details>
<summary>Copilot / VS Code</summary>
Install as a Plugin (Recommended)
The easiest way to get up and running is to install chrome-devtools-mcp as an agent plugin.
This bundles the MCP server and all skills together, so your agent gets both the tools
and the expert guidance it needs to use them effectively.
Cmd+Shift+P on macOS or Ctrl+Shift+P on Windows/Linux).https://github.com/ChromeDevTools/chrome-devtools-mcpThat's it! Your agent is now supercharged with Chrome DevTools capabilities.
---
Install as an MCP Server (MCP only)
Click the button to install:
Or install manually:
Follow the VS Code MCP configuration guide using the standard config from above, or use the CLI:
For macOS and Linux:
code --add-mcp '{"name":"io.github.ChromeDevTools/chrome-devtools-mcp","command":"npx","args":["-y","chrome-devtools-mcp"],"env":{}}'For Windows (PowerShell):
code --add-mcp '{"""name""":"""io.github.ChromeDevTools/chrome-devtools-mcp""","""command""":"""npx""","""args""":["""-y""","""chrome-devtools-mcp"""]}'</details>
<details>
<summary>Cursor</summary>
Click the button to install:
<img src="https://cursor.com/deeplink/mcp-install-dark.svg" alt="Install in Cursor">
Or install manually:
Go to Cursor Settings -> MCP -> New MCP Server. Use the config provided above.
</details>
<details>
<summary>Factory CLI</summary>
Use the Factory CLI to add the Chrome DevTools MCP server (<a href="https://docs.factory.ai/cli/configuration/mcp">guide</a>):
droid mcp add chrome-devtools "npx -y chrome-devtools-mcp@latest"</details>
<details>
<summary>Gemini CLI</summary>
Install the Chrome DevTools MCP server using the Gemini CLI.
Project wide:
# Either MCP only:
gemini mcp add chrome-devtools npx chrome-devtools-mcp@latest
# Or as a Gemini extension (MCP+Skills):
gemini extensions install --auto-update https://github.com/ChromeDevTools/chrome-devtools-mcpGlobally:
gemini mcp add -s user chrome-devtools npx chrome-devtools-mcp@latestAlternatively, follow the <a href="https://github.com/google-gemini/gemini-cli/blob/main/docs/tools/mcp-server.md#how-to-set-up-your-mcp-server">MCP guide</a> and use the standard config from above.
</details>
<details>
<summary>Gemini Code Assist</summary>
Follow the <a href="https://cloud.google.com/gemini/docs/codeassist/use-agentic-chat-pair-programmer#configure-mcp-servers">configure MCP guide</a>
using the standard config from above.
</details>
<details>
<summary>JetBrains AI Assistant & Junie</summary>
Go to Settings | Tools | AI Assistant | Model Context Protocol (MCP) -> Add. Use the config provided above.
The same way chrome-devtools-mcp can be configured for JetBrains Junie in Settings | Tools | Junie | MCP Settings -> Add. Use the config provided above.
</details>
<details>
<summary>Kiro</summary>
In Kiro Settings, go to Configure MCP > Open Workspace or User MCP Config > Use the configuration snippet provided above.
Or, from the IDE Activity Bar > Kiro > MCP Servers > Click Open MCP Config. Use the configuration snippet provided above.
</details>
<details>
<summary>Katalon Studio</summary>
The Chrome DevTools MCP server can be used with <a href="https://docs.katalon.com/katalon-studio/studioassist/mcp-servers/setting-up-chrome-devtools-mcp-server-for-studioassist">Katalon StudioAssist</a> via an MCP proxy.
Step 1: Install the MCP proxy by following the <a href="https://docs.katalon.com/katalon-studio/studioassist/mcp-servers/setting-up-mcp-proxy-for-stdio-mcp-servers">MCP proxy setup guide</a>.
Step 2: Start the Chrome DevTools MCP server with the proxy:
mcp-proxy --transport streamablehttp --port 8080 -- npx -y chrome-devtools-mcp@latestNote: You may need to pick another port if 8080 is already in use.
Step 3: In Katalon Studio, add the server to StudioAssist with the following settings:
http://127.0.0.1:8080/mcpHTTPOnce connected, the Chrome DevTools MCP tools will be available in StudioAssist.
</details>
<details>
<summary>Mistral Vibe</summary>
Add in ~/.vibe/config.toml:
[[mcp_servers]]
name = "chrome-devtools"
transport = "stdio"
command = "npx"
args = ["chrome-devtools-mcp@latest"]</details>
<details>
<summary>OpenCode</summary>
Add the following configuration to your opencode.json file. If you don't have one, create it at ~/.config/opencode/opencode.json (<a href="https://opencode.ai/docs/mcp-servers">guide</a>):
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"chrome-devtools": {
"type": "local",
"command": ["npx", "-y", "chrome-devtools-mcp@latest"]
}
}
}</details>
<details>
<summary>Qoder</summary>
In Qoder Settings, go to MCP Server > + Add > Use the configuration snippet provided above.
Alternatively, follow the <a href="https://docs.qoder.com/user-guide/chat/model-context-protocol">MCP guide</a> and use the standard config from above.
</details>
<details>
<summary>Qoder CLI</summary>
Install the Chrome DevTools MCP server using the Qoder CLI (<a href="https://docs.qoder.com/cli/using-cli#mcp-servers">guide</a>):
Project wide:
qodercli mcp add chrome-devtools -- npx chrome-devtools-mcp@latestGlobally:
qodercli mcp add -s user chrome-devtools -- npx chrome-devtools-mcp@latest</details>
<details>
<summary>Visual Studio</summary>
Click the button to install:
</details>
<details>
<summary>Warp</summary>
Go to Settings | AI | Manage MCP Servers -> + Add to add an MCP Server. Use the config provided above.
</details>
<details>
<summary>Windsurf</summary>
Follow the <a href="https://docs.windsurf.com/windsurf/cascade/mcp#mcp-config-json">configure MCP guide</a>
using the standard config from above.
</details>
Your first prompt
Enter the following prompt in your MCP Client to check if everything is working:
Check the performance of https://developers.chrome.comYour MCP client should open the browser and record a performance trace.
[!NOTE]
The MCP server will start the browser automatically once the MCP client uses a tool that requires a running browser instance. Connecting to the Chrome DevTools MCP server on its own will not automatically start the browser.