What it does
Chrome DevTools MCP connects an agent to Chrome's developer tooling. The agent can inspect the page it is debugging instead of relying only on the rendered screen.
- Read console messages while a page is running.
- Inspect network requests and responses.
- Examine page structure, styles and browser state.
- Collect performance information from a live Chrome session.
- Use the exact tool arguments returned by the connected server.
Skills that ship with it
The MCP server gives the agent Chrome's tools. These skills give it the workflows: which tool to call first, which traces to record, and what the numbers mean. Each one names the MCP tools it expects. Longwave installs them with the server, and each name below opens the skill's source.
- Accessibility debugging Audit semantic HTML, ARIA labels, focus, keyboard navigation, tap targets and contrast.
- Chrome DevTools Debug pages, automate the browser, analyze performance and inspect network requests.
- Chrome DevTools CLI Script browser tasks with the Chrome DevTools command line instead of MCP calls.
- Debug and optimize LCP Break Largest Contentful Paint into its subparts and fix the slow one.
- Memory leak debugging Capture and compare heap snapshots to find leaks in JavaScript and Node.js.
- Troubleshooting Fix the server when it cannot start, find a page or reach Chrome.
Available functions
click Clicks on the provided element
Arguments
-
dblClick -
booleanSet to true for double clicks. Default is false. -
includeSnapshot -
booleanWhether to include a snapshot in the response. Default is false. -
pageIdrequired -
numberTargets a specific page by ID. -
uidrequired -
stringThe uid of an element on the page from the page content snapshot
close_page Closes the page by its index. The last open page cannot be closed.
Arguments
-
pageIdrequired -
numberThe ID of the page to close. Call list_pages to list pages.
drag Drag an element onto another element
Arguments
-
from_uidrequired -
stringThe uid of the element to drag -
includeSnapshot -
booleanWhether to include a snapshot in the response. Default is false. -
pageIdrequired -
numberTargets a specific page by ID. -
to_uidrequired -
stringThe uid of the element to drop into
emulate Emulates various features on the target page.
Arguments
-
colorScheme -
stringEmulate the dark or the light mode. Set to "auto" to reset to the default. Allowed values: dark, light, auto -
cpuThrottlingRate -
numberRepresents the CPU slowdown factor. Omit or set the rate to 1 to disable throttling -
extraHttpHeaders -
stringExtra HTTP headers as a JSON string object, e.g. {"X-Custom": "value", "Authorization": "Bearer token"}. Headers are included into every HTTP request originating from the page and persist across navigations until cleared. Pass an empty string to clear all extra headers. -
geolocation -
stringGeolocation (`<latitude>,<longitude>`) to emulate. Latitude between -90 and 90. Longitude between -180 and 180. Omit to clear the geolocation override. -
networkConditions -
stringThrottle network. Omit to disable throttling. Allowed values: Offline, Slow 3G, Fast 3G, Slow 4G, Fast 4G -
pageIdrequired -
numberTargets a specific page by ID. -
userAgent -
stringUser agent to emulate. Set to empty string to clear the user agent override. -
viewport -
stringEmulate device viewports '<width>x<height>x<devicePixelRatio>[,mobile][,touch][,landscape]'. 'touch' and 'mobile' to emulate mobile devices. 'landscape' to emulate landscape mode.
evaluate_script Evaluate a JavaScript function inside the target page. Returns the response as JSON, so returned values have to be JSON-serializable.
Arguments
-
args -
arrayAn optional list of arguments to pass to the function. -
dialogAction -
stringHandle dialogs while execution. "accept", "dismiss", or string for response of window.prompt. Defaults to accept. -
filePath -
stringThe absolute or relative path to a file to save the script output to. If omitted, the output is returned inline. -
functionrequired -
stringA JavaScript function declaration to be executed by the tool in the target page. Example without arguments: `() => document.title` or `async () => await fetch("example.com")`. Example with arguments: `(el) => el.innerText` -
pageIdrequired -
numberTargets a specific page by ID. -
waitForStableDom -
booleanWhether to wait for the DOM to settle. Pass false if the script only reads data. Defaults to true.
fill Type text into an input, text area or select an option from a <select> element.
Arguments
-
includeSnapshot -
booleanWhether to include a snapshot in the response. Default is false. -
pageIdrequired -
numberTargets a specific page by ID. -
uidrequired -
stringThe uid of an element on the page from the page content snapshot -
valuerequired -
stringThe value to fill in. "true" or "false" for checkboxes and toggles, "true" for radio buttons.
fill_form Fill out multiple form elements (inputs, selects, checkboxes, radios) at once. ALWAYS prefer this tool over multiple individual 'fill' or 'click' calls when interacting with forms. It is significantly faster, more reliable, and reduces turn count. Example: Fill username, password, and check "Remember Me" in one call.
Arguments
-
elementsrequired -
arrayElements from snapshot to fill out. -
includeSnapshot -
booleanWhether to include a snapshot in the response. Default is false. -
pageIdrequired -
numberTargets a specific page by ID.
get_console_message Gets a console message by its ID. You can get all messages by calling list_console_messages.
Arguments
-
msgidrequired -
numberThe msgid of a console message on the page from the listed console messages -
pageIdrequired -
numberTargets a specific page by ID.
get_network_request Gets a network request by an optional reqid, if omitted returns the currently selected request in the DevTools Network panel.
Arguments
-
pageIdrequired -
numberTargets a specific page by ID. -
reqid -
numberThe reqid of the network request. If omitted returns the currently selected request in the DevTools Network panel. -
requestFilePath -
stringThe absolute or relative path to a .network-request file to save the request body to. If omitted, the body is returned inline. -
responseFilePath -
stringThe absolute or relative path to a .network-response file to save the response body to. If omitted, the body is returned inline.
handle_dialog If a browser dialog was opened, use this command to handle it
Arguments
-
actionrequired -
stringWhether to dismiss or accept the dialog Allowed values: accept, dismiss -
pageIdrequired -
numberTargets a specific page by ID. -
promptText -
stringOptional prompt text to enter into the dialog.
hover Hover over the provided element
Arguments
-
includeSnapshot -
booleanWhether to include a snapshot in the response. Default is false. -
pageIdrequired -
numberTargets a specific page by ID. -
uidrequired -
stringThe uid of an element on the page from the page content snapshot
lighthouse_audit Get Lighthouse score and reports for accessibility, SEO, best practices, and agentic browsing. This excludes performance. For performance audits, run performance_start_trace
Arguments
-
device -
stringDevice to emulate. Allowed values: desktop, mobile Default:desktop -
mode -
string"navigation" reloads & audits. "snapshot" analyzes current state. Allowed values: navigation, snapshot Default:navigation -
outputDirPath -
stringDirectory for reports. If omitted, uses temporary files. -
pageIdrequired -
numberTargets a specific page by ID.
list_console_messages List all console messages for the target page since the last navigation.
Arguments
-
includePreservedMessages -
booleanSet to true to return the preserved messages over the last 3 navigations. Default:false -
includeStackTraces -
booleanSet to true to include the stack trace for each message when available. Increases the response size. Default:false -
pageIdrequired -
numberTargets a specific page by ID. -
pageIdx -
integerPage number to return (0-based). When omitted, returns the first page. -
pageSize -
integerMaximum number of messages to return. When omitted, returns all messages. -
serviceWorkerId -
stringFilter messages to only return messages of the specified service worker. -
types -
arrayFilter messages to only return messages of the specified resource types. When omitted or empty, returns all messages.
list_network_requests Lists the most recent requests for the target page since the last navigation.
Arguments
-
includePreservedRequests -
booleanSet to true to return the preserved requests over the last 3 navigations. Default:false -
pageIdrequired -
numberTargets a specific page by ID. -
pageIdx -
integerPage number to return (0-based). When omitted, returns the first page. -
pageSize -
integerMaximum number of requests to return. When omitted, returns all requests. -
resourceTypes -
arrayFilter requests to only return requests of the specified resource types. When omitted or empty, returns all requests.
list_pages Get a list of pages open in the browser.
navigate_page Go to a URL, or back, forward, or reload. Use project URL if not specified otherwise.
Arguments
-
handleBeforeUnload -
stringWhether to auto accept or beforeunload dialogs triggered by this navigation. Default is accept. Allowed values: accept, dismiss -
ignoreCache -
booleanWhether to ignore cache on reload. -
initScript -
stringA JavaScript script to be executed on each new document before any other scripts for the next navigation. -
pageIdrequired -
numberTargets a specific page by ID. -
timeout -
integerMaximum wait time in milliseconds. If set to 0, the default timeout will be used. -
type -
stringNavigate the page by URL, back or forward in history, or reload. Allowed values: url, back, forward, reload -
url -
stringTarget URL (only type=url)
new_page Open a new tab and load a URL. Use project URL if not specified otherwise.
Arguments
-
background -
booleanWhether to open the page in the background without bringing it to the front. Default is false (foreground). -
isolatedContext -
stringIf specified, the page is created in an isolated browser context with the given name. Pages in the same browser context share cookies and storage. Pages in different browser contexts are fully isolated. -
timeout -
integerMaximum wait time in milliseconds. If set to 0, the default timeout will be used. -
urlrequired -
stringURL to load in a new page.
performance_analyze_insight Provides more detailed information on a specific Performance Insight of an insight set that was highlighted in the results of a trace recording.
Arguments
-
insightNamerequired -
stringThe name of the Insight you want more information on. For example: "DocumentLatency" or "LCPBreakdown" -
insightSetIdrequired -
stringThe id for the specific insight set. Only use the ids given in the "Available insight sets" list. -
pageIdrequired -
numberTargets a specific page by ID.
performance_start_trace Start a performance trace on the target webpage. Use to find frontend performance issues, Core Web Vitals (LCP, INP, CLS), and improve page load speed.
Arguments
-
autoStop -
booleanDetermines if the trace recording should be automatically stopped. Default:true -
filePath -
stringThe absolute file path, or a file path relative to the current working directory, to save the raw trace data. For example, trace.json.gz (compressed) or trace.json (uncompressed). -
pageIdrequired -
numberTargets a specific page by ID. -
reload -
booleanDetermines if, once tracing has started, the target page should be automatically reloaded. Navigate the page to the right URL using the navigate_page tool BEFORE starting the trace if reload or autoStop is set to true. Default:true
performance_stop_trace Stop the active performance trace recording on the target webpage.
Arguments
-
filePath -
stringThe absolute file path, or a file path relative to the current working directory, to save the raw trace data. For example, trace.json.gz (compressed) or trace.json (uncompressed). -
pageIdrequired -
numberTargets a specific page by ID.
press_key Press a key or key combination. Use this when other input methods like fill() cannot be used (e.g., keyboard shortcuts, navigation keys, or special key combinations).
Arguments
-
includeSnapshot -
booleanWhether to include a snapshot in the response. Default is false. -
keyrequired -
stringA key or a combination (e.g., "Enter", "Control+A", "Control++", "Control+Shift+R"). Modifiers: Control, Shift, Alt, Meta -
pageIdrequired -
numberTargets a specific page by ID.
resize_page Resizes the page's window so that the page has specified dimension
Arguments
-
heightrequired -
numberPage height -
pageIdrequired -
numberTargets a specific page by ID. -
widthrequired -
numberPage width
select_page Select a page as a context for future tool calls.
Arguments
-
bringToFront -
booleanWhether to focus the page and bring it to the top. -
pageIdrequired -
numberThe ID of the page to select. Call list_pages to get available pages.
take_heapsnapshot Capture a heap snapshot of the target page. Use to analyze the memory distribution of JavaScript objects and debug memory leaks.
Arguments
-
filePathrequired -
stringA path to a .heapsnapshot file to save the heapsnapshot to. -
pageIdrequired -
numberTargets a specific page by ID.
take_screenshot Take a screenshot of the page or element.
Arguments
-
filePath -
stringThe absolute path, or a path relative to the current working directory, to save the screenshot to instead of attaching it to the response. -
format -
stringType of format to save the screenshot as. Default is "png" Allowed values: png, jpeg, webp Default:png -
fullPage -
booleanIf set to true takes a screenshot of the full page instead of the currently visible viewport. Incompatible with uid. -
pageIdrequired -
numberTargets a specific page by ID. -
quality -
numberCompression quality for JPEG and WebP formats (0-100). Higher values mean better quality but larger file sizes. Ignored for PNG format. -
uid -
stringThe uid of an element on the page from the page content snapshot. If omitted, takes a page screenshot.
take_snapshot Take a text snapshot of the target page based on the a11y tree. The snapshot lists page elements along with a unique identifier (uid). Always use the latest snapshot. Prefer taking a snapshot over taking a screenshot. The snapshot indicates the element selected in the DevTools Elements panel (if any).
Arguments
-
filePath -
stringThe absolute path, or a path relative to the current working directory, to save the snapshot to instead of attaching it to the response. -
pageIdrequired -
numberTargets a specific page by ID. -
verbose -
booleanWhether to include all possible information available in the full a11y tree. Default is false.
type_text Type text using keyboard into a previously focused input
Arguments
-
pageIdrequired -
numberTargets a specific page by ID. -
submitKey -
stringOptional key to press after typing. E.g., "Enter", "Tab", "Escape" -
textrequired -
stringThe text to type
upload_file Upload a file through a provided element.
Arguments
-
filePathsrequired -
arrayOne or more files paths to upload. File paths have to be local to the browser instance (not the MCP). -
includeSnapshot -
booleanWhether to include a snapshot in the response. Default is false. -
pageIdrequired -
numberTargets a specific page by ID. -
uidrequired -
stringThe uid of the file input element or an element that will open file chooser on the page from the page content snapshot
wait_for Wait for the specified text to appear on the selected page.
Arguments
-
pageIdrequired -
numberTargets a specific page by ID. -
textrequired -
arrayNon-empty list of texts. Resolves when any value appears on the page. -
timeout -
integerMaximum wait time in milliseconds. If set to 0, the default timeout will be used.