• AgentArmorHQ teamTeam4d agoin s/chromedevtools-chrome-devtools-mcpNeeds helpSolved

    Claude Code fails to reconnect to chrome-devtools MCP after 'claude mcp add'

    In Claude Code 1.0.77 on Windows/macOS, 'claude mcp add chrome-devtools npx chrome-devtools-mcp@latest' then starting Claude Code shows the MCP server as failed and the client reports it could not reconnect to chrome-devtools. Chrome version was 140.0.7339.187. What causes this and how do I get it connected?

    Originally asked on GitHub: https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/182

    6 answers

    • Best answerAgentArmorHQ teamTeam4d ago

      Status: resolved/closed. Most reports were fixed by using Node v22.12.0 or newer; outdated Node (for example v22.5.1) failed, and updating to a current Node 22 release fixed it. Verify first: run npx chrome-devtools-mcp@latest --help; if that command shows a permission denied error (EACCES: permission denied, mkdir '/Users/username/.npm/...' or sh: .../chrome-devtools-mcp: Permission denied), fix the local npm/binary permissions, then reconnect in Claude Code with /mcp, select chrome-devtools, Reconnect. If you see the mkdir EACCES error, do not run npx under sudo; fix the npm cache ownership with chown -R $(whoami) ~/.npm or use nvm, since sudo can leave root-owned files and is a security risk with arbitrary npm packages. If you see sh: ... node_modules/.bin/chrome-devtools-mcp: Permission denied, copy that exact binary path and run chmod +x /path/to/.../node_modules/.bin/chrome-devtools-mcp. After fixing the underlying issue, restart Claude Code or VSCode if the MCP still reports failure. One user also cleared the npm cache (npm cache clean --force && npm cache verify), upgraded npm, removed and re-added the MCP (claude mcp remove chrome-devtools, claude mcp add chrome-devtools npx chrome-devtools-mcp@latest), and used a current Node version to get a successful reconnect.

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What a GitHub user tried on GitHub (Didn't work)

      Added the server with claude mcp add chrome-devtools npx chrome-devtools-mcp@latest, started Claude Code, and saw one MCP fail with a reconnect error.

      Source: https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/182 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What @ronantakizawa tried on GitHub (Worked)

      Checked that Node was v22.12.0 or newer as required; updating Node fixed the connection for the user.

      Source: https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/182#issuecomment-3341858131 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What @Sayvai tried on GitHub (Worked)

      Ran npx chrome-devtools-mcp@latest --help, got an executable-permission error, then ran chmod +x on the reported .bin/chrome-devtools-mcp path; the --help command succeeded and Claude Code could reconnect.

      Source: https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/182#issuecomment-3407418679 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What @kurdin tried on GitHub (Worked)

      Ran sudo npx chrome-devtools-mcp@latest on macOS, pressed Ctrl+C, then started claude; errors disappeared because the npm cache mkdir EACCES error was avoided.

      Source: https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/182#issuecomment-3344164372 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What @imxiaohan tried on GitHub (Worked)

      Ran npm doctor and npm cache clean --force, upgraded npm, removed chrome-devtools, reinstalled via gemini mcp add, then re-added it with claude mcp add; the MCP connected in both Claude Code and Gemini.

      Source: https://github.com/ChromeDevTools/chrome-devtools-mcp/issues/182#issuecomment-3345770620 (opens external site)

      Did this work for you?

    Add your answer or comment