{
  "markdown": "# Chrome DevTools MCP\n\n[![npm chrome-devtools-mcp package](https://img.shields.io/npm/v/chrome-devtools-mcp.svg)](https://npmjs.org/package/chrome-devtools-mcp)\n\n`chrome-devtools-mcp` lets your coding agent (such as Gemini, Claude, Cursor or Copilot)\ncontrol and inspect a live Chrome browser. It acts as a Model-Context-Protocol\n(MCP) server, giving your AI coding assistant access to the full power of\nChrome DevTools for reliable automation, in-depth debugging, and performance analysis.\n\n## [Tool reference](./docs/tool-reference.md) | [Changelog](./CHANGELOG.md) | [Contributing](./CONTRIBUTING.md) | [Troubleshooting](./docs/troubleshooting.md)\n\n## Key features\n\n- **Get performance insights**: Uses [Chrome\n  DevTools](https://github.com/ChromeDevTools/devtools-frontend) to record\n  traces and extract actionable performance insights.\n- **Advanced browser debugging**: Analyze network requests, take screenshots and\n  check the browser console.\n- **Reliable automation**. Uses\n  [puppeteer](https://github.com/puppeteer/puppeteer) to automate actions in\n  Chrome and automatically wait for action results.\n\n## Disclaimers\n\n`chrome-devtools-mcp` exposes content of the browser instance to the MCP clients\nallowing them to inspect, debug, and modify any data in the browser or DevTools.\nAvoid sharing sensitive or personal information that you don't want to share with\nMCP clients.\n\n## Requirements\n\n- [Node.js](https://nodejs.org/) v20.19 or a newer [latest maintenance LTS](https://github.com/nodejs/Release#release-schedule) version.\n- [Chrome](https://www.google.com/chrome/) current stable version or newer.\n- [npm](https://www.npmjs.com/).\n\n## Getting started\n\nAdd the following config to your MCP client:\n\n```json\n{\n  \"mcpServers\": {\n    \"chrome-devtools\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"chrome-devtools-mcp@latest\"]\n    }\n  }\n}\n```\n\n> [!NOTE]  \n> Using `chrome-devtools-mcp@latest` ensures that your MCP client will always use the latest version of the Chrome DevTools MCP server.\n\n### MCP Client configuration\n\n<details>\n  <summary>Amp</summary>\n  Follow https://ampcode.com/manual#mcp and use the config provided above. You can also install the Chrome DevTools MCP server using the CLI:\n\n```bash\namp mcp add chrome-devtools -- npx chrome-devtools-mcp@latest\n```\n\n</details>\n\n<details>\n  <summary>Antigravity</summary>\n\nTo 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:\n\n```bash\n{\n  \"mcpServers\": {\n    \"chrome-devtools\": {\n      \"command\": \"npx\",\n      \"args\": [\n        \"chrome-devtools-mcp@latest\",\n        \"--browser-url=http://127.0.0.1:9222\",\n        \"-y\"\n      ]\n    }\n  }\n}\n```\n\nThis 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.\n\n</details>\n\n<details>\n  <summary>Claude Code</summary>\n    Use the Claude Code CLI to add the Chrome DevTools MCP server (<a href=\"https://docs.anthropic.com/en/docs/claude-code/mcp\">guide</a>):\n\n```bash\nclaude mcp add chrome-devtools npx chrome-devtools-mcp@latest\n```\n\n</details>\n\n<details>\n  <summary>Cline</summary>\n  Follow https://docs.cline.bot/mcp/configuring-mcp-servers and use the config provided above.\n</details>\n\n<details>\n  <summary>Codex</summary>\n  Follow the <a href=\"https://github.com/openai/codex/blob/main/docs/advanced.md#model-context-protocol-mcp\">configure MCP guide</a>\n  using the standard config from above. You can also install the Chrome DevTools MCP server using the Codex CLI:\n\n```bash\ncodex mcp add chrome-devtools -- npx chrome-devtools-mcp@latest\n```\n\n**On Windows 11**\n\nConfigure the Chrome install location and increase the startup timeout by updating `.codex/config.toml` and adding the following `env` and `startup_timeout_ms` parameters:\n\n```\n[mcp_servers.chrome-devtools]\ncommand = \"cmd\"\nargs = [\n    \"/c\",\n    \"npx\",\n    \"-y\",\n    \"chrome-devtools-mcp@latest\",\n]\nenv = { SystemRoot=\"C:\\\\Windows\", PROGRAMFILES=\"C:\\\\Program Files\" }\nstartup_timeout_ms = 20_000\n```\n\n</details>\n\n<details>\n  <summary>Copilot CLI</summary>\n\nStart Copilot CLI:\n\n```\ncopilot\n```\n\nStart the dialog to add a new MCP server by running:\n\n```\n/mcp add\n```\n\nConfigure the following fields and press `CTRL+S` to save the configuration:\n\n- **Server name:** `chrome-devtools`\n- **Server Type:** `[1] Local`\n- **Command:** `npx -y chrome-devtools-mcp@latest`\n\n</details>\n\n<details>\n  <summary>Copilot / VS Code</summary>\n  Follow the MCP install <a href=\"https://code.visualstudio.com/docs/copilot/chat/mcp-servers#_add-an-mcp-server\">guide</a>,\n  with the standard config from above. You can also install the Chrome DevTools MCP server using the VS Code CLI:\n  \n  ```bash\n  code --add-mcp '{\"name\":\"chrome-devtools\",\"command\":\"npx\",\"args\":[\"chrome-devtools-mcp@latest\"]}'\n  ```\n</details>\n\n<details>\n  <summary>Cursor</summary>\n\n**Click the button to install:**\n\n[<img src=\"https://cursor.com/deeplink/mcp-install-dark.svg\" alt=\"Install in Cursor\">](https://cursor.com/en/install-mcp?name=chrome-devtools&config=eyJjb21tYW5kIjoibnB4IC15IGNocm9tZS1kZXZ0b29scy1tY3BAbGF0ZXN0In0%3D)\n\n**Or install manually:**\n\nGo to `Cursor Settings` -> `MCP` -> `New MCP Server`. Use the config provided above.\n\n</details>\n\n<details>\n  <summary>Factory CLI</summary>\nUse the Factory CLI to add the Chrome DevTools MCP server (<a href=\"https://docs.factory.ai/cli/configuration/mcp\">guide</a>):\n\n```bash\ndroid mcp add chrome-devtools \"npx -y chrome-devtools-mcp@latest\"\n```\n\n</details>\n\n<details>\n  <summary>Gemini CLI</summary>\nInstall the Chrome DevTools MCP server using the Gemini CLI.\n\n**Project wide:**\n\n```bash\ngemini mcp add chrome-devtools npx chrome-devtools-mcp@latest\n```\n\n**Globally:**\n\n```bash\ngemini mcp add -s user chrome-devtools npx chrome-devtools-mcp@latest\n```\n\nAlternatively, 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.\n\n</details>\n\n<details>\n  <summary>Gemini Code Assist</summary>\n  Follow the <a href=\"https://cloud.google.com/gemini/docs/codeassist/use-agentic-chat-pair-programmer#configure-mcp-servers\">configure MCP guide</a>\n  using the standard config from above.\n</details>\n\n<details>\n  <summary>JetBrains AI Assistant & Junie</summary>\n\nGo to `Settings | Tools | AI Assistant | Model Context Protocol (MCP)` -> `Add`. Use the config provided above.\nThe same way chrome-devtools-mcp can be configured for JetBrains Junie in `Settings | Tools | Junie | MCP Settings` -> `Add`. Use the config provided above.\n\n</details>\n\n<details>\n  <summary>Kiro</summary>\n\nIn **Kiro Settings**, go to `Configure MCP` > `Open Workspace or User MCP Config` > Use the configuration snippet provided above.\n\nOr, from the IDE **Activity Bar** > `Kiro` > `MCP Servers` > `Click Open MCP Config`. Use the configuration snippet provided above.\n\n</details>\n\n<details>\n  <summary>Qoder</summary>\n\nIn **Qoder Settings**, go to `MCP Server` > `+ Add` > Use the configuration snippet provided above.\n\nAlternatively, follow the <a href=\"https://docs.qoder.com/user-guide/chat/model-context-protocol\">MCP guide</a> and use the standard config from above.\n\n</details>\n\n<details>\n  <summary>Visual Studio</summary>\n  \n  **Click the button to install:**\n  \n  [<img src=\"https://img.shields.io/badge/Visual_Studio-Install-C16FDE?logo=visualstudio&logoColor=white\" alt=\"Install in Visual Studio\">](https://vs-open.link/mcp-install?%7B%22name%22%3A%22chrome-devtools%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22chrome-devtools-mcp%40latest%22%5D%7D)\n</details>\n\n<details>\n  <summary>Warp</summary>\n\nGo to `Settings | AI | Manage MCP Servers` -> `+ Add` to [add an MCP Server](https://docs.warp.dev/knowledge-and-collaboration/mcp#adding-an-mcp-server). Use the config provided above.\n\n</details>\n\n<details>\n  <summary>Windsurf</summary>\n  Follow the <a href=\"https://docs.windsurf.com/windsurf/cascade/mcp#mcp-config-json\">configure MCP guide</a>\n  using the standard config from above.\n</details>\n\n### Your first prompt\n\nEnter the following prompt in your MCP Client to check if everything is working:\n\n```\nCheck the performance of https://developers.chrome.com\n```\n\nYour MCP client should open the browser and record a performance trace.\n\n> [!NOTE]  \n> 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.\n\n## Tools\n\nIf you run into any issues, checkout our [troubleshooting guide](./docs/troubleshooting.md).\n\n<!-- BEGIN AUTO GENERATED TOOLS -->\n\n- **Input automation** (8 tools)\n  - [`click`](docs/tool-reference.md#click)\n  - [`drag`](docs/tool-reference.md#drag)\n  - [`fill`](docs/tool-reference.md#fill)\n  - [`fill_form`](docs/tool-reference.md#fill_form)\n  - [`handle_dialog`](docs/tool-reference.md#handle_dialog)\n  - [`hover`](docs/tool-reference.md#hover)\n  - [`press_key`](docs/tool-reference.md#press_key)\n  - [`upload_file`](docs/tool-reference.md#upload_file)\n- **Navigation automation** (6 tools)\n  - [`close_page`](docs/tool-reference.md#close_page)\n  - [`list_pages`](docs/tool-reference.md#list_pages)\n  - [`navigate_page`](docs/tool-reference.md#navigate_page)\n  - [`new_page`](docs/tool-reference.md#new_page)\n  - [`select_page`](docs/tool-reference.md#select_page)\n  - [`wait_for`](docs/tool-reference.md#wait_for)\n- **Emulation** (2 tools)\n  - [`emulate`](docs/tool-reference.md#emulate)\n  - [`resize_page`](docs/tool-reference.md#resize_page)\n- **Performance** (3 tools)\n  - [`performance_analyze_insight`](docs/tool-reference.md#performance_analyze_insight)\n  - [`performance_start_trace`](docs/tool-reference.md#performance_start_trace)\n  - [`performance_stop_trace`](docs/tool-reference.md#performance_stop_trace)\n- **Network** (2 tools)\n  - [`get_network_request`](docs/tool-reference.md#get_network_request)\n  - [`list_network_requests`](docs/tool-reference.md#list_network_requests)\n- **Debugging** (5 tools)\n  - [`evaluate_script`](docs/tool-reference.md#evaluate_script)\n  - [`get_console_message`](docs/tool-reference.md#get_console_message)\n  - [`list_console_messages`](docs/tool-reference.md#list_console_messages)\n  - [`take_screenshot`](docs/tool-reference.md#take_screenshot)\n  - [`take_snapshot`](docs/tool-reference.md#take_snapshot)\n\n<!-- END AUTO GENERATED TOOLS -->\n\n## Configuration\n\nThe Chrome DevTools MCP server supports the following configuration option:\n\n<!-- BEGIN AUTO GENERATED OPTIONS -->\n\n- **`--browserUrl`, `-u`**\n  Connect to a running Chrome instance using port forwarding. For more details see: https://developer.chrome.com/docs/devtools/remote-debugging/local-server.\n  - **Type:** string\n\n- **`--wsEndpoint`, `-w`**\n  WebSocket endpoint to connect to a running Chrome instance (e.g., ws://127.0.0.1:9222/devtools/browser/<id>). Alternative to --browserUrl.\n  - **Type:** string\n\n- **`--wsHeaders`**\n  Custom headers for WebSocket connection in JSON format (e.g., '{\"Authorization\":\"Bearer token\"}'). Only works with --wsEndpoint.\n  - **Type:** string\n\n- **`--headless`**\n  Whether to run in headless (no UI) mode.\n  - **Type:** boolean\n  - **Default:** `false`\n\n- **`--executablePath`, `-e`**\n  Path to custom Chrome executable.\n  - **Type:** string\n\n- **`--isolated`**\n  If specified, creates a temporary user-data-dir that is automatically cleaned up after the browser is closed.\n  - **Type:** boolean\n  - **Default:** `false`\n\n- **`--channel`**\n  Specify a different Chrome channel that should be used. The default is the stable channel version.\n  - **Type:** string\n  - **Choices:** `stable`, `canary`, `beta`, `dev`\n\n- **`--logFile`**\n  Path to a file to write debug logs to. Set the env variable `DEBUG` to `*` to enable verbose logs. Useful for submitting bug reports.\n  - **Type:** string\n\n- **`--viewport`**\n  Initial viewport size for the Chrome instances started by the server. For example, `1280x720`. In headless mode, max size is 3840x2160px.\n  - **Type:** string\n\n- **`--proxyServer`**\n  Proxy server configuration for Chrome passed as --proxy-server when launching the browser. See https://www.chromium.org/developers/design-documents/network-settings/ for details.\n  - **Type:** string\n\n- **`--acceptInsecureCerts`**\n  If enabled, ignores errors relative to self-signed and expired certificates. Use with caution.\n  - **Type:** boolean\n\n- **`--chromeArg`**\n  Additional arguments for Chrome. Only applies when Chrome is launched by chrome-devtools-mcp.\n  - **Type:** array\n\n- **`--categoryEmulation`**\n  Set to false to exclude tools related to emulation.\n  - **Type:** boolean\n  - **Default:** `true`\n\n- **`--categoryPerformance`**\n  Set to false to exclude tools related to performance.\n  - **Type:** boolean\n  - **Default:** `true`\n\n- **`--categoryNetwork`**\n  Set to false to exclude tools related to network.\n  - **Type:** boolean\n  - **Default:** `true`\n\n<!-- END AUTO GENERATED OPTIONS -->\n\nPass them via the `args` property in the JSON configuration. For example:\n\n```json\n{\n  \"mcpServers\": {\n    \"chrome-devtools\": {\n      \"command\": \"npx\",\n      \"args\": [\n        \"chrome-devtools-mcp@latest\",\n        \"--channel=canary\",\n        \"--headless=true\",\n        \"--isolated=true\"\n      ]\n    }\n  }\n}\n```\n\n### Connecting via WebSocket with custom headers\n\nYou can connect directly to a Chrome WebSocket endpoint and include custom headers (e.g., for authentication):\n\n```json\n{\n  \"mcpServers\": {\n    \"chrome-devtools\": {\n      \"command\": \"npx\",\n      \"args\": [\n        \"chrome-devtools-mcp@latest\",\n        \"--wsEndpoint=ws://127.0.0.1:9222/devtools/browser/<id>\",\n        \"--wsHeaders={\\\"Authorization\\\":\\\"Bearer YOUR_TOKEN\\\"}\"\n      ]\n    }\n  }\n}\n```\n\nTo get the WebSocket endpoint from a running Chrome instance, visit `http://127.0.0.1:9222/json/version` and look for the `webSocketDebuggerUrl` field.\n\nYou can also run `npx chrome-devtools-mcp@latest --help` to see all available configuration options.\n\n## Concepts\n\n### User data directory\n\n`chrome-devtools-mcp` starts a Chrome's stable channel instance using the following user\ndata directory:\n\n- Linux / macOS: `$HOME/.cache/chrome-devtools-mcp/chrome-profile-$CHANNEL`\n- Windows: `%HOMEPATH%/.cache/chrome-devtools-mcp/chrome-profile-$CHANNEL`\n\nThe user data directory is not cleared between runs and shared across\nall instances of `chrome-devtools-mcp`. Set the `isolated` option to `true`\nto use a temporary user data dir instead which will be cleared automatically after\nthe browser is closed.\n\n### Connecting to a running Chrome instance\n\nYou can connect to a running Chrome instance by using the `--browser-url` option. This is useful if you want to use your existing Chrome profile or if you are running the MCP server in a sandboxed environment that does not allow starting a new Chrome instance.\n\nHere is a step-by-step guide on how to connect to a running Chrome Stable instance:\n\n**Step 1: Configure the MCP client**\n\nAdd the `--browser-url` option to your MCP client configuration. The value of this option should be the URL of the running Chrome instance. `http://127.0.0.1:9222` is a common default.\n\n```json\n{\n  \"mcpServers\": {\n    \"chrome-devtools\": {\n      \"command\": \"npx\",\n      \"args\": [\n        \"chrome-devtools-mcp@latest\",\n        \"--browser-url=http://127.0.0.1:9222\"\n      ]\n    }\n  }\n}\n```\n\n**Step 2: Start the Chrome browser**\n\n> [!WARNING]  \n> Enabling the remote debugging port opens up a debugging port on the running browser instance. Any application on your machine can connect to this port and control the browser. Make sure that you are not browsing any sensitive websites while the debugging port is open.\n\nStart the Chrome browser with the remote debugging port enabled. Make sure to close any running Chrome instances before starting a new one with the debugging port enabled. The port number you choose must be the same as the one you specified in the `--browser-url` option in your MCP client configuration.\n\nFor security reasons, [Chrome requires you to use a non-default user data directory](https://developer.chrome.com/blog/remote-debugging-port) when enabling the remote debugging port. You can specify a custom directory using the `--user-data-dir` flag. This ensures that your regular browsing profile and data are not exposed to the debugging session.\n\n**macOS**\n\n```bash\n/Applications/Google\\ Chrome.app/Contents/MacOS/Google\\ Chrome --remote-debugging-port=9222 --user-data-dir=/tmp/chrome-profile-stable\n```\n\n**Linux**\n\n```bash\n/usr/bin/google-chrome --remote-debugging-port=9222 --user-data-dir=/tmp/chrome-profile-stable\n```\n\n**Windows**\n\n```bash\n\"C:\\Program Files\\Google\\Chrome\\Application\\chrome.exe\" --remote-debugging-port=9222 --user-data-dir=\"%TEMP%\\chrome-profile-stable\"\n```\n\n**Step 3: Test your setup**\n\nAfter configuring the MCP client and starting the Chrome browser, you can test your setup by running a simple prompt in your MCP client:\n\n```\nCheck the performance of https://developers.chrome.com\n```\n\nYour MCP client should connect to the running Chrome instance and receive a performance report.\n\nIf you hit VM-to-host port forwarding issues, see the “Remote debugging between virtual machine (VM) and host fails” section in [`docs/troubleshooting.md`](./docs/troubleshooting.md#remote-debugging-between-virtual-machine-vm-and-host-fails).\n\nFor more details on remote debugging, see the [Chrome DevTools documentation](https://developer.chrome.com/docs/devtools/remote-debugging/).\n\n## Known limitations\n\n### Operating system sandboxes\n\nSome MCP clients allow sandboxing the MCP server using macOS Seatbelt or Linux\ncontainers. If sandboxes are enabled, `chrome-devtools-mcp` is not able to start\nChrome that requires permissions to create its own sandboxes. As a workaround,\neither disable sandboxing for `chrome-devtools-mcp` in your MCP client or use\n`--browser-url` to connect to a Chrome instance that you start manually outside\nof the MCP client sandbox.\n",
  "bytes": 18142,
  "sha": "933c768c2a4655d08cbb3670edf794fd0ce85f18d4cc84b59b46f6753f0f31b4",
  "repo_slug": "dinesh-nalla-se/chrome-devtools-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_dinesh_nalla_se_chrome_devtool_09a3ee38/readme"
}