Repository navigation
feat(playwright-mcp): the recorder fronts the browser's MCP port, serving its card there like any MCP server's (FD-4701) - #548
Merged
earakely-scale merged 5 commits intoNov 9, 2026
Conversation
…oading a site through it The install's checks now load the first site, over HTTPS where one is, through the forward port as a browser alone loads it, as the session user. The deploy record keeps the result, and a port that doesn't load it fails the deploy, naming it: a forward port that couldn't start, or a Python too old for its TLS tunnel, would otherwise pass the deploy and fail only when the browser loads a page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e forward port names exchange takes the forward port's refusal: on the port, a request naming no site is refused with 403 and logged rather than answered 421, and the port no longer looks the site up again before handing a request over. A CONNECT still looks its site up first, for the certificate its tunnel needs, and each request in a tunnel is now judged as the port judges one, so a request in a site's tunnel naming another host is refused and logged too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ving its card there like any MCP server's (FD-4701) The Playwright MCP image's recorder now listens on the MCP port: it serves the browser's card and computer-recording there, as every MCP server serves its card at its own address, and passes every other request, streamed, to @playwright/mcp, which moves to loopback 18767 behind it; a Playwright MCP that doesn't answer is a 502 naming it. The recorder still serves the card on 18766, where deploys read it until a later change reads it at the MCP port once both stages serve this image; the deploy code is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…, as an agent does An isolated Playwright MCP browser lives as long as its MCP session, so a recording of the page an agent opens is filmed while one session stays open from the recording's start to its end. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t MCP listens, passes Host through, and closes every answer - The gateway's compose health check is a connect to each MCP server's MCP port. The recorder now serves the card on 18766 at once but opens the MCP port only once Playwright MCP listens on its own port behind it, so the browser is healthy, and the gateway discovers its tools, only once Playwright MCP can answer, as before the front. - The front passes the caller's Host on to Playwright MCP rather than its own loopback address. - Playwright MCP's answer is closed when the response ends, streamed or not: a caller that leaves before the first chunk no longer leaves the connection to Playwright MCP open (Greptile). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
earakely-scale
deleted the
edgararakelyan/fd-4701-playwright-mcp-serves-its-card-on-its
branch
November 9, 2026 01:56
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
FD-4701, PR 1 of 2: the Playwright MCP browser serves its env card on its MCP port, the way every MCP server serves its card at its own address. Chromium alone already does, so once both stages serve this image, PR 2 can drop the deploy code's hardcoded recorder port (18766). M8.13 puts chromium alone in the website-browser slot, and with the hardcoded port the gateway would silently leave its card out.
Decisions (FD-4701, Nov 9): 1a, two PRs, so recording never breaks, and 2a, the recorder fronts the MCP port.
On decision 1a: the deploy code reaches prod with the hub's pin before prod's browser is promoted by hand (FD-4661). So this PR changes the image alone and keeps serving the card on 18766 too.
recorder.py):computer-recording/v1there.GETs andDELETEs) goes to@playwright/mcpas it came, with the body and answer streamed and hop-by-hop headers dropped.Hostgoes on to Playwright MCP unchanged.Set-Cookiestay separate.entrypoint.sh:@playwright/mcpmoves to127.0.0.1:18767behind the front.card_port=PLAYWRIGHT_MCP_RECORDER_PORT). PR 2 removes it.Also in this PR, two follow-ups to M5.5 (FD-4934) that #541 merged without:
exchangegives the port's refusal, a 403 and a log line, so a request inside a site's tunnel that names another host is refused and logged too.Rollout after merge
gate-website.How it was tested
ruff check: clean.test_playwright_mcp_recorder.py:Hostarrives unchanged;test_computer_site_proxy.pyandtest_computer_sites.py.tst/unit/env,tst/unit/providersandtst/unit/bundle: 5223 passed. Thetest_disk_recipefailure fails on macOS only.New
playwright_mcp_local_test.py(amd64 and arm64). The image is built for the machine and run alone, and the test checks that:initializethrough it succeeds;@playwright/mcpkeeps running.All 4 passed on both arches, on 1f6e191.
gateway_test.py::test_gateway_with_single_website_env(amd64; its images build for amd64 alone), extended to check that:It passed, on 1f6e191.
Earlier fixes, all in 1f6e191:
Hostshould pass through.The M5.5 follow-ups passed the forward-port, CA trust and routed-site tests on amd64 and arm64 before this branch.
🤖 Generated with Claude Code


Confidence Score: 5/5
The PR appears safe to merge; no new actionable issues remain.Summary
The recorder now serves the browser card and recordings on the MCP port while forwarding browser calls to Playwright MCP.
Diagram
%%{init: {'theme': 'neutral'}}%% flowchart LR Client[Gateway or MCP client] --> Front[Recorder on MCP port] Front --> Card[Card and recordings] Front --> Backend[Playwright MCP on loopback] Legacy[Old card port] --> Card Backend --> Ready[Backend accepts connections] Ready --> Open[Recorder opens MCP port]Reviews (6) · Last reviewed commit: "fix(playwright-mcp): the front opens the..." · Reviewed by Greptile