playwright-mcp-server — Claude Code skill: setup and features
Enables browser automation via Playwright MCP. Lets agents navigate websites, submit forms, and inspect accessibility trees without heavy vision tokens.
no license 286 installs ★ 9 updated 2026-10-09
npx skills add reason-machines/mcp-skills --skill playwright-mcp-server -a claude-codeWhat playwright-mcp-server does
This skill equips coding agents with Playwright browser controls driven by accessibility snapshots. Instead of inspecting rendered screenshots, the model parses a structured tree of ARIA roles and labels, which speeds up interaction and keeps context usage low.
Built-in tools include playwright_navigate, playwright_click, playwright_fill, evaluating custom JavaScript with playwright_evaluate, and capturing page screenshots. The setup runs across Chromium, Firefox, or WebKit, with full control over headless mode and timeouts.
Any target domain not explicitly listed in --allowed-hosts or the PLAYWRIGHT_MCP_ALLOWED_HOSTS variable triggers an immediate navigation block.
What it helps with
- fill out inputs and submit forms using role-based selectors
- extract page data without feeding full-page screenshots to vision models
- run custom JavaScript expressions directly in the browser tab
- save targeted element or full-page screenshots to a local path
Example prompts for the agent
- Navigate to
https://example.comand fill the email input with[email protected] - Get the page accessibility snapshot and click the submit button
- Capture a screenshot of selector
div.main-contentinto./screenshots/page.png
How to install playwright-mcp-server
1Skills CLI (Vercel)
npx skills add reason-machines/mcp-skills --skill playwright-mcp-server -a claude-code2Manually: put the files in place
~/.claude/skills/playwright-mcp-server/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/playwright-mcp-server/
1Skills CLI (Vercel)
npx skills add reason-machines/mcp-skills --skill playwright-mcp-server -a codex2Manually: put the files in place
.agents/skills/playwright-mcp-server/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add reason-machines/mcp-skills --skill playwright-mcp-server -a cursor2Manually: put the files in place
.cursor/skills/playwright-mcp-server/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install reason-machines/mcp-skills skills/playwright-mcp-server2Manually: put the files in place
.github/skills/playwright-mcp-server/SKILL.md1Skills CLI (Vercel)
npx skills add reason-machines/mcp-skills --skill playwright-mcp-server -a gemini-cli2Platform CLI
gemini skills install https://github.com/reason-machines/mcp-skills --path skills/playwright-mcp-serverManually: put the files in place
.devin/skills/playwright-mcp-server/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add reason-machines/mcp-skills --skill playwright-mcp-server -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about playwright-mcp-server
How to install playwright-mcp-server in Claude Code?
Run npx skills add reason-machines/mcp-skills --skill playwright-mcp-server -a claude-code.
Why does it use accessibility snapshots instead of screenshots?
Accessibility snapshots present page elements as clean structured data, so the language model finds inputs and buttons deterministically without image parsing overhead.
How do I fix the Host not allowed error?
Add your target domains to --allowed-hosts <hosts...> in your client configuration args, or pass * during development to bypass host verification.