# playwright-mcp-server

Enables browser automation via Playwright MCP. Lets agents navigate websites, submit forms, and inspect accessibility trees without heavy vision tokens.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Windsurf (Devin Desktop), Claude.ai · 286 installs · ★ 9 repo stars
- Author: reason-machines
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/reason-machines/mcp-skills/tree/HEAD/skills/playwright-mcp-server/SKILL.md
- Updated: 2026-10-09
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/skills/playwright-mcp-server

## What it 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.

## Requirements
- Works with: Playwright

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/mcp-skills --skill playwright-mcp-server -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/playwright-mcp-server/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/playwright-mcp-server/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/mcp-skills --skill playwright-mcp-server -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/playwright-mcp-server/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/mcp-skills --skill playwright-mcp-server -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/playwright-mcp-server/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install reason-machines/mcp-skills skills/playwright-mcp-server
```

2. **Manually: put the files in place**
- File: `.github/skills/playwright-mcp-server/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add reason-machines/mcp-skills --skill playwright-mcp-server -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/reason-machines/mcp-skills --path skills/playwright-mcp-server
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/playwright-mcp-server/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add reason-machines/mcp-skills --skill playwright-mcp-server -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/reason-machines/mcp-skills/tree/HEAD/skills/playwright-mcp-server/SKILL.md

## When to use it
- 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
- Navigate to `https://example.com` and fill the email input with `user@example.com`
- Get the page accessibility snapshot and click the submit button
- Capture a screenshot of selector `div.main-content` into `./screenshots/page.png`

## Similar
- [playwright-cli](https://affpapa.org/en/nevibecode/skills/playwright-cli.md) — skill · 221700 installs
- [playwright-skill](https://affpapa.org/en/nevibecode/skills/playwright-skill.md) — skill · 8000 installs
- [e2e-playwright-testing](https://affpapa.org/en/nevibecode/skills/e2e-playwright-testing.md) — skill · 880 installs
- [ExecuteAutomation Playwright](https://affpapa.org/en/nevibecode/mcp/executeautomation-playwright.md) — MCP server
- [playwright](https://affpapa.org/en/nevibecode/skills/oakoss-playwright.md) — skill · 476 installs
- [browsing-with-playwright](https://affpapa.org/en/nevibecode/skills/browsing-with-playwright.md) — skill · 1700 installs

From the same set: [reason-machines/mcp-skills](https://affpapa.org/en/nevibecode/by/reason-machines/mcp-skills.md) — 98 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
