chrome-devtools-mcp icon indicating copy to clipboard operation
chrome-devtools-mcp copied to clipboard

[chrome-devtools-mcp] Chrome 147 + supergateway streamableHttp causes Target closed

Open spamobile opened this issue 6 months ago • 2 comments

Environment

  • chrome-devtools-mcp: 0.24.0
  • Chrome: 147.0.7727.101
  • supergateway: 3.4.3
  • MCP SDK: 1.29.0

Problem

When chrome-devtools-mcp connects to Chrome 147 via supergateway's streamableHttp transport (stdio→HTTP bridge), all tool calls fail with:

Protocol error (Target.setDiscoverTargets): Target closed

Root Cause

Direct stdio invocation works perfectly - the issue is supergateway's streamableHttp bridge breaking CDP's stateful WebSocket connection.

Workaround

Created a custom Node.js MCP bridge that properly handles CDP's stdio↔HTTP communication.

CC is NOT affected

CC uses --autoConnect (Puppeteer-managed Chrome) + direct stdio, avoiding supergateway entirely.

Questions

  1. Is there a planned fix for supergateway bridge compatibility?
  2. Should --stateful be default for CDP-based servers?
  3. Related to MCP SDK 1.29.0?

Reproduction

# Fails:
supergateway --stdio chrome-devtools-mcp --browserUrl http://127.0.0.1:18800   --outputTransport streamableHttp --port 3201

# Works:
chrome-devtools-mcp --browserUrl http://127.0.0.1:18800  # direct stdio

spamobile avatar May 05 '26 20:05 spamobile

Hello! I am not sure I am understanding the issue here. Isn't the --stateful flag for supergateway enough to make it work?

nroscino avatar May 21 '26 13:05 nroscino

Closing as there is no issue without supergateway.

OrKoN avatar May 22 '26 07:05 OrKoN