home / mcp / chrome devtools mcp server
Provides a MCP server that lets AI agents control and inspect a live Chrome browser for automation, debugging, and performance analysis.
Configuration
View docs{
"mcpServers": {
"dinesh-nalla-se-chrome-devtools-mcp": {
"command": "npx",
"args": [
"-y",
"chrome-devtools-mcp@latest"
]
}
}
}You can use the Chrome DevTools MCP server to let your AI coding assistant control and inspect a live Chrome browser, enabling reliable automation, in-depth debugging, and performance analysis through the MCP (Model-Context-Protocol).
You will connect your MCP client to the Chrome DevTools MCP server as a local, self-contained process. Once connected, you can issue actions to drive Chrome, record performance traces, inspect network activity, capture screenshots, and read console messages. Start by configuring your MCP client to reference the Chrome DevTools MCP server, then prompt the agent to perform tasks like loading pages, interacting with elements, and collecting performance insights. The server will launch or connect to a Chrome instance and execute your commands, returning results and traces for you to analyze.
Prerequisites: you need Node.js (recommended v20.19 or newer LTS), Chrome (current stable or newer), and npm installed on your system.
Install the Chrome DevTools MCP server by adding it to your MCP client configuration or by running it directly with a package manager. Use the following runtime command as shown in examples to start the server from your MCP client.
Example installation command for running the MCP server locally via npx:
The server supports multiple configuration options. You can control how Chrome is launched, connect to an existing running Chrome, set viewport size, enable headless mode, and pass additional Chrome arguments. You can also specify a WebSocket endpoint and headers if you connect to a running browser, or start a new Chrome instance for automation.
To run the server locally, include the following MCP client configuration snippet. This config uses npx to fetch the latest Chrome DevTools MCP server image and run it.
To verify everything is working, prompt your MCP client with a simple test that checks the performance of a web page. The MCP client will open Chrome, run a performance trace, and return results that you can review.
The Chrome DevTools MCP server exposes browser content to MCP clients. Avoid sharing sensitive or personal information that you do not want to access from MCP clients, and exercise caution when connecting to remote or shared environments.
If you encounter issues starting or connecting to Chrome, check that your browser version is compatible, verify port usage for any remote debugging configurations, and review any logs produced by the MCP server. If you run into VM-to-host port forwarding problems, refer to the relevant troubleshooting guidance for remote debugging scenarios.
Simulate a mouse click on a target element or coordinate within the page.
Drag a pointer from a starting point to an end point, useful for sliders and drag-and-drop interactions.
Type text into an input field or contenteditable element.
Fill multiple fields in a form in a single action and optionally submit.
Interact with native browser dialogs such as alerts, confirms, and prompts.
Move the cursor over an element to trigger hover states or tooltips.
Simulate a keyboard key press, including modifier keys.
Upload a file to a file input control.
Close the current browser page or tab.
Retrieve the list of open pages or tabs.
Navigate to a specified URL within the browser.
Open a new browser page or tab.
Switch focus to a specific open page or tab.
Wait for a condition to be met or for a page event to occur before proceeding.
Emulate different devices or viewport characteristics.
Change the viewport size or device scale for the current page.
Analyze collected performance data to extract actionable insights.
Begin recording a performance trace for the current page.
End the current performance trace and save the results.
Fetch details for a specific network request.
List all network requests captured during a session.
Run JavaScript in the page context and return the result.
Retrieve messages from the browser console.
List all console messages captured during the session.
Capture a screenshot of the current page.
Capture a DOM snapshot or a page state representation.