Repository navigation
Enable the WebMCP feature for Chromium 157 - #525
Open
masnwilliams wants to merge 2 commits into
Open
masnwilliams wants to merge 2 commits into
masnwilliams wants to merge 2 commits into
Conversation
JonnyShuali
approved these changes
Nov 23, 2026
This branch has not been deployed
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.
Summary
Chromium 157 removed the
WebMCPTestingfeature and replaced it withWebMCP. Our images turn WebMCP on with--enable-features=WebMCPTesting,DevToolsWebMCPSupport, so on a Chromium 157 buildnavigator.modelContextdoesn't exist, no tools are discovered, and the CDPWebMCPdomain has nothing to report.This enables
WebMCP,WebMCPTesting,DevToolsWebMCPSupporteverywhere the old pair was listed:server/cmd/wrapper/chromium.go(headless default flags), plus its comment and testimages/chromium-headful/run-docker.shandrun-unikernel.shserver/e2e/e2e_playwright_test.goWebMCPis what Chromium 157 needs.WebMCPTestingstays so builds that predate theWebMCPfeature keep working. Chromium ignores feature names it doesn't know, so one set works on both sides of the change.Opt-out behavior change
With
WebMCPenabled,--disable-features=WebMCPTestingalone no longer turns WebMCP off, on Chromium 156 as well as 157. Turning it off now takes--disable-features=WebMCP,WebMCPTesting. The wrapper comment says so.Testing
TestPlaywrightExecuteAPIwas run against a Chromium 156.0.8078.79 image and a Chromium 157.0.8103.78 image, with the test's flags varied:--enable-features=WebMCPTesting,DevToolsWebMCPSupport(before)--enable-features=WebMCP,WebMCPTesting,DevToolsWebMCPSupport(this PR)--disable-features=WebMCPTesting--disable-features=WebMCP,WebMCPTesting--enable-features=WebMCP,WebMCPTesting,DevToolsWebMCPSupportwhenCHROMIUM_FLAGSis unset.go test -race ./cmd/wrapper/ ./lib/chromiumflags/passes.TestApplyHeadlessDefaultFlagsnow checks the WebMCP flag and fails without this change.Merge order
Note
Low Risk
Limited to Chromium startup feature flags and tests; wrong flags would break WebMCP on 157 but do not touch auth, data, or core API logic.
Overview
Chromium 157 renamed the WebMCP gate from
WebMCPTestingtoWebMCP, so the previous--enable-features=WebMCPTesting,DevToolsWebMCPSupportdefault left WebMCP off on newer builds.This PR changes the default
--enable-featureslist toWebMCP,WebMCPTesting,DevToolsWebMCPSupportin the headless wrapper (chromium.go), headful docker/unikernel run scripts, and the Playwright e2e container env.WebMCPTestingis kept so older Chromium builds still enable the feature; Chromium ignores unknown feature names.Wrapper comments and
TestApplyHeadlessDefaultFlagsnow expect the updated flag string. Opt-out is documented as--disable-features=WebMCP,WebMCPTesting(disabling onlyWebMCPTestingis no longer sufficient).Reviewed by Cursor Bugbot for commit 5033773. Bugbot is set up for automated code reviews on this repo. Configure here.