Skip to content

feat: add multi-session Streamable HTTP transport - #2750

Closed
artgas1 wants to merge 1 commit into
ChromeDevTools:mainfrom
artgas1:aggasparyan/infra-1236-perevesti-oba-chrome-devtools-mcp-na-obshchie-http-demoni
Closed

artgas1 wants to merge 1 commit into
ChromeDevTools:mainfrom
artgas1:aggasparyan/infra-1236-perevesti-oba-chrome-devtools-mcp-na-obshchie-http-demoni

Conversation

@artgas1

@artgas1 artgas1 commented Sep 15, 2026 •

Copy link
Copy Markdown

Summary

Add a native Streamable HTTP mode for long-lived Chrome DevTools MCP processes while preserving stdio as the default.

  • create one independent McpServer and McpContext per negotiated HTTP session
  • reuse one concurrency-safe Puppeteer browser connection within the process
  • bind only to loopback and validate Host and Origin headers
  • clean up sessions on DELETE, idle expiry, and process shutdown
  • keep telemetry initialization process-wide while attributing tool events per client session
  • document the HTTP endpoint and deployment model

This avoids the state-sharing problem of a generic stdio-to-HTTP bridge: roots, capabilities, selected pages, trace state, and tool mutexes remain session-local. A deployment should run one process per Chrome endpoint or profile.

Verification

  • npm run gen
  • npm run check-format
  • npm test
  • npm run test:notices
  • npm run profile -- --threshold-percentage=1
  • integration tests cover two isolated HTTP clients sharing one browser, the real executable lifecycle, Host and Origin rejection, malformed JSON, explicit and idle cleanup, and concurrent first browser launch

Addresses #2188. Internal tracking: INFRA-1236.

@google-cla

google-cla Bot commented Sep 15, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@artgas1

artgas1 commented Sep 15, 2026

Copy link
Copy Markdown
Author

Closing this duplicate in favor of #2733, which already implements the same per-session server architecture with broader lifecycle and proxy coverage. Internal tracking: INFRA-1236.

@artgas1 artgas1 closed this Sep 15, 2026
@artgas1
artgas1 deleted the aggasparyan/infra-1236-perevesti-oba-chrome-devtools-mcp-na-obshchie-http-demoni branch September 15, 2026 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant