Skip to content

MCP times out when browser has MetaMask extension #510

@edxeth

Description

@edxeth

Description of the bug

All tools consistently time out (MCP error -32001) when connected to a Google Chrome/Chromium instance that has MetaMask. The issue does NOT occur when MetaMask is disabled or removed.

Debug logs with DEBUG=* show that all CDP protocol operations complete successfully, including:

  • Target discovery via Target.setDiscoverTargets
  • Auto-attaching to all targets (including extension targets)
  • Running Runtime.runIfWaitingForDebugger on all sessions
  • Detaching from all non-page targets

However, after the last successful CDP response ({"id":31,"result":{}}), the logs go completely silent and the tool hangs until the 60-second timeout, suggesting the issue is in the JavaScript code that processes the target list, not in CDP communication itself.

Note: Raw CDP WebSocket connections work perfectly with MetaMask enabled, and @playwright/mcp also works without issues in the same environment, indicating this is specific to how chrome-devtools-mcp processes certain target types.

Reproduction

  1. Install MetaMask extension (v13.6.0 or later) in Google Chrome/Chromium
  2. Launch Google Chrome/Chromium with remote debugging:
& "C:\Users\mysol\AppData\Local\Chromium\Application\chrome.exe" --remote-debugging-port=9222 --user-data-dir="$env:LOCALAPPDATA\Chromium\Automation\Web3"
  1. Configure chrome-devtools-mcp with:
{
  "mcpServers": {
    "chrome-devtools": {
      "command": "npx",
      "args": [
        "-y",
        "chrome-devtools-mcp@latest",
        "--browserUrl", "http://localhost:9222",
        "--logFile", "/tmp/chrome-devtools-mcp.log"
      ],
      "env": {
        "DEBUG": "*"
      }
    }
  }
}
  1. Connect MCP client and call list_pages tool
  2. Observe timeout after n seconds

Expectation

I expect the MCP to work even if MetaMask extension is installed or else how am I gonna inspect and debug my MetaMask integration? I know chrome-devtools-mcp cannot communicate with MetaMask due to LavaMoat but that should not stop me from performing actions on MetaMask manually and then asking the LLM agent observe the console logs and network tab with chrome-devtools-mcp for instance.

MCP configuration

{
  "mcpServers": {
    "chrome-devtools": {
      "command": "npx",
      "args": [
        "-y",
        "chrome-devtools-mcp@latest",
        "--browserUrl", "http://localhost:9222",
        "--logFile", "/tmp/chrome-devtools-mcp.log"
      ],
      "env": {
        "DEBUG": "*"
      }
    }
  }
}

Timeout settings tested:

  • Request Timeout: 10000ms
  • Maximum Total Timeout: 60000ms

Chrome DevTools MCP version

0.9.0

Chrome version

141.0.7390.122 (Official Build, ungoogled-chromium) (32-bit)
142.0.7444.60 (Official Build, google chrome) (64-bit)

Coding agent version

Codex CLI v0.53.0

Model version

GPT-5-Codex

Chat log

No response

Node version

v24.8.0

Operating system

Windows Subsystem for Linux (WSL)

Extra checklist

  • I want to provide a PR to fix this bug

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions