<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>Chrome DevTools MCP on KnightLi Blog</title>
        <link>https://knightli.com/en/tags/chrome-devtools-mcp/</link>
        <description>Recent content in Chrome DevTools MCP on KnightLi Blog</description>
        <generator>Hugo -- gohugo.io</generator>
        <language>en</language>
        <lastBuildDate>Sun, 12 Jul 2026 12:13:00 +0800</lastBuildDate><atom:link href="https://knightli.com/en/tags/chrome-devtools-mcp/index.xml" rel="self" type="application/rss+xml" /><item>
        <title>How to Install Chrome DevTools MCP: Debug Web Network, Console, and Performance with Codex and Claude Code</title>
        <link>https://knightli.com/en/2026/07/12/chrome-devtools-mcp-codex-claude-code-browser-debugging-guide/</link>
        <pubDate>Sun, 12 Jul 2026 12:13:00 +0800</pubDate>
        
        <guid>https://knightli.com/en/2026/07/12/chrome-devtools-mcp-codex-claude-code-browser-debugging-guide/</guid>
        <description>&lt;p&gt;Chrome DevTools MCP is not a tool for letting an agent casually “click around a website.” It exposes Chrome DevTools capabilities—network requests, console messages, screenshots, performance traces, and page automation—to coding agents through MCP. It is better suited to verifiable questions such as “Why is the page blank?”, “Why does the API return 401?”, “Why does nothing happen after a click?”, or “Why did performance suddenly slow down?”&lt;/p&gt;
&lt;p&gt;Use it together with &lt;a class=&#34;link&#34; href=&#34;https://knightli.com/en/2026/07/08/mcp-tool-call-failure-troubleshooting-faq/&#34; &gt;How to troubleshoot failed MCP tool calls&lt;/a&gt;: first make sure the MCP process and permissions work, then inspect evidence from the browser. The official repository describes support for live Chrome inspection, automation, debugging, and performance analysis, and explicitly warns that an MCP client can access browser data. &lt;a class=&#34;link&#34; href=&#34;https://github.com/ChromeDevTools/chrome-devtools-mcp&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;
    &gt;Official repository&lt;/a&gt;&lt;/p&gt;
&lt;h2 id=&#34;confirm-the-use-case-first&#34;&gt;Confirm the use case first
&lt;/h2&gt;&lt;p&gt;It is a good fit when:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;An agent needs console errors, network requests, screenshots, or a performance trace.&lt;/li&gt;
&lt;li&gt;You need to reproduce a frontend problem already visible in Chrome.&lt;/li&gt;
&lt;li&gt;You need to turn page behavior into actionable requests, selectors, or stack traces.&lt;/li&gt;
&lt;li&gt;Your test site and account are isolated from production.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Do not treat it as an unattended production operator. A browser can contain sessions, customer data, payment pages, or internal systems. Start with a separate Chrome profile and a low-privilege test account.&lt;/p&gt;
&lt;h2 id=&#34;minimal-setup-for-codex-and-claude-code&#34;&gt;Minimal setup for Codex and Claude Code
&lt;/h2&gt;&lt;p&gt;Add the MCP server in Codex CLI:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-powershell&#34; data-lang=&#34;powershell&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;codex&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;mcp&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;add&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;chrome-devtools&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;--&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;npx&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;chrome-devtools&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;-mcp&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;@latest&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;For Claude Code, use:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-powershell&#34; data-lang=&#34;powershell&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;claude&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;mcp&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;add&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;chrome-devtools&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;-scope&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;user&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;npx&lt;/span&gt; &lt;span class=&#34;nb&#34;&gt;chrome-devtools&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;-mcp&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;@latest&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Restart the relevant client after installation, then ask the agent to perform a low-risk check, such as: “Open the test page and list console errors and failed network requests.” Do not begin with tasks like “log in to the admin panel and modify data.”&lt;/p&gt;
&lt;p&gt;If Windows cannot find Chrome after &lt;code&gt;npx&lt;/code&gt; starts, or MCP initialization is slow, explicitly use &lt;code&gt;cmd&lt;/code&gt; and increase the timeout in &lt;code&gt;.codex/config.toml&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;5
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-toml&#34; data-lang=&#34;toml&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;mcp_servers&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;.&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;chrome-devtools&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;command&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;cmd&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;args&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;/c&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;npx&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;-y&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;chrome-devtools-mcp@latest&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;env&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;SystemRoot&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;C:\\Windows&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;PROGRAMFILES&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;C:\\Program Files&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nx&#34;&gt;startup_timeout_ms&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;mi&#34;&gt;20_000&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id=&#34;debug-from-evidence-instead-of-asking-the-agent-to-guess&#34;&gt;Debug from evidence instead of asking the agent to guess
&lt;/h2&gt;&lt;p&gt;Use this fixed order:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Page and screenshot&lt;/strong&gt;: confirm the target environment, account, and route are open.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Console&lt;/strong&gt;: capture the full text and source-mapped stack of the first error, not merely the number of red entries.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Network&lt;/strong&gt;: filter for 4xx, 5xx, CORS, and long-pending requests; inspect the URL, request body, and response summary.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Reproduce one interaction&lt;/strong&gt;: have the agent perform only one click or input, then inspect network and console again.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Performance&lt;/strong&gt;: record a trace only after the issue reproduces reliably, so transient network jitter is not mistaken for rendering trouble.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;You can give the agent a tightly scoped request:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;div class=&#34;chroma&#34;&gt;
&lt;table class=&#34;lntable&#34;&gt;&lt;tr&gt;&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code&gt;&lt;span class=&#34;lnt&#34;&gt;1
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;2
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;3
&lt;/span&gt;&lt;span class=&#34;lnt&#34;&gt;4
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class=&#34;lntd&#34;&gt;
&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Reproduce “the page is blank after submission” only at http://localhost:3000.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Take a screenshot first, then list console errors and failed network requests.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Do not modify the page, submit the form, or visit other domains.
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;Organize the output as: symptom, evidence, most likely cause, and next manual check.
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;h2 id=&#34;common-failures-and-responses&#34;&gt;Common failures and responses
&lt;/h2&gt;&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th&gt;Symptom&lt;/th&gt;
          &lt;th&gt;Check first&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td&gt;MCP was added but its tools are unavailable&lt;/td&gt;
          &lt;td&gt;Restart the client; confirm &lt;code&gt;npx&lt;/code&gt;, Node.js, and the MCP configuration are active in the current scope.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Cannot connect to an existing Chrome instance&lt;/td&gt;
          &lt;td&gt;Confirm the debug port matches &lt;code&gt;--browser-url&lt;/code&gt;; do not assume the tool automatically takes over an already-open browser.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;The agent saw data it should not see&lt;/td&gt;
          &lt;td&gt;Close that profile immediately, switch to an isolated test profile, and narrow the agent task.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Performance reports fluctuate&lt;/td&gt;
          &lt;td&gt;Fix the page, network conditions, and reproduction steps; compare multiple samples.&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;By default, the official tool collects usage data such as tool-call success rate, latency, and environment information. If your environment requires it, pass &lt;code&gt;--no-usage-statistics&lt;/code&gt;. Performance analysis can also read CrUX data; use &lt;code&gt;--no-performance-crux&lt;/code&gt; when appropriate. These are not debugging failures, but privacy and network boundaries to decide before rollout.&lt;/p&gt;
&lt;h2 id=&#34;summary&#34;&gt;Summary
&lt;/h2&gt;&lt;p&gt;Chrome DevTools MCP turns agent-assisted web debugging from “guessing from a screenshot” into evidence from the console, network, and trace. Isolate browser identity first, constrain the task to one environment and one reproduction step, and only then ask the agent for repair suggestions.&lt;/p&gt;
</description>
        </item>
        
    </channel>
</rss>
