PlaywrightSAFE
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
[](https://www.npmjs.com/package/playwright-mcp) [](https://ashish-bansal.github.io/playwright-mcp/)
Introduction
Ever tried using Cursor or Claude to write Playwright tests? Yeah, it's kind of a mess.
Why? Because your AI assistant has no clue what's on your web page. It's like trying to describe a painting to someone who's blindfolded. The result?
- Flaky tests → The AI is guessing selectors, and it gets them wrong.
- Broken scripts → You spend more time fixing tests than writing them.
- Debugging nightmares → The AI can't "see" what's happening, so you end up doing all the heavy lifting.
Wouldn't it be nice if your AI could actually understand your web page instead of just making educated guesses?
Enter playwright-mcp !
playwright-mcp gives your AI assistant superpowers by making the browser fully visible to it. Instead of working in the dark, your AI assistant now has real-time access to the page DOM, elements, and interactions.
How playwright-mcp Works (AKA How We Fix This Mess)
Once installed, playwright-mcp spins up a Playwright-controlled browser and gives your AI assistant full access to it. This unlocks:
- Recording interactions → Click, type, scroll—let playwright-mcp turn your actions into fully functional Playwright test cases.
- Taking screenshots → Capture elements or full pages so your AI gets actual visual context (no more guessing).
- Extracting the DOM → Grab the entire HTML structure so the AI can generate rock-solid selectors.
- Executing JavaScript → Run custom JS inside the browser for debugging, automation, or just for fun.
Why You'll Love playwright-mcp
🚀 AI-generated tests that actually work → No more flaky selectors, broken tests, or guesswork.
⏳ Massive time savings → Write and debug Playwright tests 5x faster.
🛠️ **Few
ffad86f8fc27OBSERVED · 2026-10-08Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control.
claude mcp add playwright-mcp -- npx -y [email protected]
{
"mcpServers": {
"playwright-mcp": {
"command": "npx",
"args": [
"-y",
"[email protected]"
]
}
}
}Exposed tools (5)
3 read · 2 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
execute-code | write | Execute custom Playwright JS code against the current page |
get-context | write | Get the website context which would be used to write the testcase |
get-full-dom | read | Get the full DOM of the current page. (Deprecated, use get-context instead) |
get-screenshot | read | Get a screenshot of the current page |
init-browser | read | Initialize a browser with a URL |
Trust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- none-observed
- Shell
- none-observed
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (2)
@modelcontextprotocol/sdk, @radix-ui/react-dropdown-menu, @radix-ui/react-scroll-area, @radix-ui/react-slot, @radix-ui/react-tabs, @skorotkiewicz/snowflake-id, @tailwindcss/vite, class-variance-author
Once installed, playwright-mcp spins up a Playwright-controlled browser and gives your AI assistant full access to it. This unlocks:
Gates applied: no_behavioural_pass.
ffad86f8fc27full audit observations/trust-audit/mcp-server/ashish-bansal__playwright-1.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-08 | ffad86f8fc27 | SAFE | B | 89 | first audit |
Questions
What tools does Playwright expose?
5 in total: 3 read-only, 2 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is Playwright safe to connect to an agent?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B.
What credentials does Playwright need?
No credential environment variables were found in its source, so it appears to need none.
How does Playwright run?
It speaks stdio, so it runs as a local process your client starts. It is published on npm as playwright-mcp at 0.0.13.
How current is this page?
The grade is for one exact copy of the source (ffad86f8fc27), read on 2026-10-08. The repository is watched and re-audited when it changes.