Playwright MCP for Antigravity
Playwright MCP from Microsoft gives your agent a real browser: it can open pages, read them as structured text, click, type and run page scripts. It starts with 25 tools and more behind opt-in switches.
Our verdict
We ran it in Antigravity and reviewed the repository (commit 1c32920). It opened a visible Chrome window and answered in 38 seconds. It is powerful and not a sandbox: it ships with tools that run arbitrary scripts, and Microsoft's own README says it is not a security boundary. Use it on public pages and test environments, not with your everyday logged-in browser profile.
- Checking a page you just built and reading what is actually rendered
- Walking through forms and flows on a test site
- Untrusted websites while signed in to anything that matters
- Production use that needs a stable release: the dependency is a pre-release build
What Playwright MCP does, in one picture
The problem it solves: An agent cannot see a web page by itself. Playwright gives it a real browser, so it can check what actually renders and click through a flow.
browser_navigate opens the page in a real Chrome windowbrowser_snapshot reads the page as structured textbrowser_evaluate double-checks with a small scriptDiagram of our real run on 2026-12-02 (not a screenshot). Details and limits are in the demo below.
Tested demo: what we ran in Antigravity
Real run, 2026-12-02Use Playwright to open https://example.com and tell me the page title and the main heading.
Windows, Antigravity, one conversation. We tested this single read-only task on a public page. We did not test logins, forms or file uploads.
Install Playwright MCP in Google Antigravity
Antigravity reads MCP servers from ~/.gemini/config/mcp_config.json (all projects) or .agents/mcp_config.json (one project). Microsoft's README lists Antigravity with the same config.
Add the Playwright MCP server to my Google Antigravity config (mcp_config.json).
Add this entry under mcpServers, keep all my existing entries, and show me the change before saving:
"playwright": { "command": "npx", "args": ["@playwright/mcp@latest"] }
Source: https://github.com/microsoft/playwright-mcp
Tell me when done. Do not install anything else.Option 2: edit the file yourself
- 1. Open the config. In Antigravity open Customizations, go to the Installed tab and scroll to the bottom to "MCP Servers". Use the file icon (Copy Config File Path) to find
mcp_config.json. - 2. Add the server.
{ "mcpServers": { "playwright": { "command": "npx", "args": ["@playwright/mcp@latest"] } } } - 3. Wait, then start a new chat. In our test the new entry showed up in Customizations after 1 to 4 minutes, and it worked in a new conversation. There is no Refresh button in this version.
Needs Node.js 20 or newer. Safer starting point for unknown sites: add "--isolated" to args so the browser profile lives in memory only and is thrown away when the browser closes.
What is Playwright MCP?
@playwright/mcp (version 0.0.86 at our review) is a thin wrapper: the real tool code lives in the Playwright project it depends on, so the repository alone does not show everything the server does. It works from accessibility snapshots, which are structured text versions of a page, instead of screenshots.What it can do
- ✓25 tools on by default: navigate, click, type, hover, drag, fill forms, take snapshots and screenshots, read console and network, manage tabs, upload files.
- ✓About 47 more tools sit behind
--capsswitches (network, storage, devtools, vision, pdf, testing, config). - ✓Opens a visible browser by default;
--headlesshides it. - ✓Uses its own persistent profile folder by default, not your everyday Chrome profile.
--isolatedkeeps nothing on disk.
When to use Playwright MCP
- 1. After the agent changes your site, have it open the page and report what actually renders.
- 2. Walk a signup or checkout flow on a staging site and list where it breaks.
- 3. Read a public page as structured text when plain fetching returns an empty shell.
Security Review
Static reviewMedium to high risk if misused: default tools include arbitrary script execution and file upload, and the README says plainly that none of its limits are a security boundary.
Full review: scope, findings, risks
browser_evaluate (runs JavaScript in the page) and browser_run_code_unsafe, which the README describes as equivalent to remote code execution because it runs JavaScript inside the server process. browser_file_upload can hand local files, by absolute path, to a web page. The default browser is visible and the default profile is a separate Playwright folder, not your everyday Chrome. The --extension option is the one that connects to your running Chrome and its logged-in tabs. File URLs are blocked by default and file access is limited to the workspace root. The origin allow and block lists default to allow everything. Pages can register their own tools through an experimental WebMCP feature that is on by default and can be turned off with --no-webmcp. We found no telemetry code in the cloned repository itself. The Docker image runs Chromium with the sandbox disabled.--extension, that could expose real accounts. The README says its origin lists, file limits and secret masking are convenience measures, not a security boundary. Use --isolated, a test account, and restrict origins when you can.Not verified: the default browser build, outbound traffic of the underlying library, where downloads, traces and videos are saved, and any vulnerability in the pre-release dependency. This is a read of the repository and one test run, not a penetration test.
Limitations
- Version 0.0.x built on a pre-release Playwright: expect changes.
- A visible browser window pops up on your desktop and the agent drives it, so avoid using the computer for something else at the same moment.
- The same profile folder can only be used by one browser instance at a time.
- We tested one read-only task. Logins, file uploads and long flows are untested by us.
Frequently Asked Questions
Is Playwright MCP safe to use?
It is an official Microsoft project under Apache-2.0, but it is a powerful tool, not a sandbox. Default tools can run scripts and upload local files. Use it on public pages or test sites, ideally with --isolated, and do not combine it with a browser profile that holds important logins.
How do I install Playwright MCP in Antigravity?
Add a playwright entry that runs npx @playwright/mcp@latest to mcp_config.json, wait one to four minutes, then start a new conversation. Check it under Customizations, Installed, MCP Servers at the bottom.
Does it use my own Chrome logins?
Not by default: it keeps its own profile folder. Only the --extension option connects to your running Chrome and its sessions, and pointing --user-data-dir at your real Chrome folder could also reuse them.
Can I run it without a visible window?
Yes, add --headless to args. The default is a visible window.
Did this skill work for you?
Our review is one run on one setup. Tell other readers what happened on yours: which agent and version, what worked, and what broke. Reports are checked before they appear.