Skip to content

Commit eca7ea5

Browse files
committed
feat(browser_eval): support 'chromium' browser (Linux arm64)
On platforms where the only available Chrome build is Chromium (e.g. Linux arm64), the browser_eval tool couldn't be used because the browser enum only accepted chrome/firefox/webkit/msedge. @playwright/mcp accepts '--browser chromium' (it resolves to the chrome-for-testing build). Verified end-to-end against @playwright/mcp@0.0.75: started the server with '--browser chromium' and a browser_navigate call launched and loaded a page successfully. Add 'chromium' to the browser enum (tool input schema + arg type) and the manager option type; it is forwarded as '--browser chromium'. Fixes #123
1 parent d1b3e56 commit eca7ea5

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

src/_internal/browser-eval-manager.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export async function ensureBrowserEvalMCP(): Promise<void> {
4848
* Start playwright-mcp server and connect to it
4949
*/
5050
export async function startBrowserEvalMCP(options?: {
51-
browser?: "chrome" | "firefox" | "webkit" | "msedge"
51+
browser?: "chrome" | "chromium" | "firefox" | "webkit" | "msedge"
5252
headless?: boolean
5353
}): Promise<MCPConnection> {
5454
// Ensure playwright-mcp is installed

src/tools/browser-eval.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,11 @@ export const inputSchema = {
2525
.describe("The action to perform using browser automation"),
2626

2727
browser: z
28-
.enum(["chrome", "firefox", "webkit", "msedge"])
28+
.enum(["chrome", "chromium", "firefox", "webkit", "msedge"])
2929
.optional()
30-
.describe("Browser to use (default: chrome). Only used with 'start' action."),
30+
.describe(
31+
"Browser to use (default: chrome). Use 'chromium' on platforms without a Chrome build (e.g. Linux arm64). Only used with 'start' action."
32+
),
3133
headless: z
3234
.union([z.boolean(), z.string().transform((val) => val === "true")])
3335
.optional()
@@ -129,7 +131,7 @@ type BrowserEvalArgs = {
129131
| "drag"
130132
| "upload_file"
131133
| "list_tools"
132-
browser?: "chrome" | "firefox" | "webkit" | "msedge"
134+
browser?: "chrome" | "chromium" | "firefox" | "webkit" | "msedge"
133135
headless?: boolean | string
134136
url?: string
135137
element?: string

0 commit comments

Comments
 (0)