Playwright MCP server
The Playwright MCP server gives AI agents a real browser driven by Microsoft's Playwright: navigate, click, type and fill forms using the page's accessibility tree instead of screenshots.
Connect Playwright
Claude Code
claude mcp add playwright npx @playwright/mcp@latestCodex
codex mcp add playwright npx "@playwright/mcp@latest"VS Code
code --add-mcp '{"name":"playwright","command":"npx","args":["@playwright/mcp@latest"]}'Standard config for Cursor, Claude Desktop, Windsurf and most clients
{"mcpServers": {"playwright": {"command": "npx", "args": ["@playwright/mcp@latest"]}}}Add --headless to run without a visible window, --isolated for a fresh profile each session, or --extension to drive your existing Chrome or Edge tabs through the Playwright extension.
What the Playwright MCP server does
The Playwright MCP server is Microsoft's browser automation server for AI agents, built on the Playwright testing library. It opens Chrome, Edge, Firefox or WebKit and lets the agent navigate, click, type, hover, drag, upload files, fill forms and handle dialogs. The agent reads each page as a structured accessibility snapshot rather than an image, so it does not need a vision model and its clicks hit exact elements.
Beyond the core tools, Playwright groups extra abilities behind opt-in flags: network mocking and request inspection, cookie and local storage control, PDF export, coordinate-based mouse control for canvas apps, test assertions that check text or elements are visible, and DevTools features such as tracing and video recording. The browser keeps a persistent profile per project by default, can run isolated for clean test sessions, or attach to your own logged-in Chrome or Edge through the Playwright extension.
The server runs locally through npx with Node.js 18 or newer, and also ships as a Docker image. The GitHub repo had 37,737 stars on 2026-10-01. Microsoft's README notes that coding agents may spend fewer tokens with its separate Playwright CLI plus skills, and keeps MCP for long, stateful browser loops.
Tools it gives your agent
browser_navigatebrowser_snapshotbrowser_clickbrowser_typebrowser_fill_formbrowser_select_optionbrowser_press_keybrowser_wait_forbrowser_take_screenshotbrowser_evaluatebrowser_console_messagesbrowser_tabs
When to use Playwright
- You want the agent to click through your web app and check that a feature works.
- You need to fill in a multi-step web form or pull data from pages that need a login.
- You want the agent to write or repair Playwright end-to-end tests by trying the flow first.
- You need to mock an API response or block requests while the agent tests a page.
When to pick something else
- Token-tight coding sessions: accessibility snapshots of large pages are long, and Microsoft itself points coding agents to the lighter Playwright CLI.
- Debugging performance or network timing in detail; Chrome DevTools MCP has deeper profiling.
What Playwright needs
- Node.js 18 or newer
- A local browser (Playwright can install one)
What the Playwright MCP server costs
Free and open source under Apache-2.0; it runs a browser on your own machine, with no account, key or usage bill.
Current prices: github.com . We do not list prices: vendors change them often, so check the publisher's own page.
Questions people ask
Is the Playwright MCP server free?
Yes. It is open source under Apache-2.0 and runs on your machine, with no account or usage fees.
Does Playwright MCP need screenshots or a vision model?
No. It gives the agent the page's accessibility tree as text. A vision mode with coordinate clicks exists as an opt-in for canvas-style pages.
Can Playwright MCP use my logged-in browser?
Yes, in two ways: its default persistent profile keeps logins between sessions, and the --extension flag connects to tabs in your own Chrome or Edge.
Other MCP servers for browser automation and testing
- Browser Use: The Browser Use MCP server gives AI agents the Browser Use browsing agent, either as a local open-source server with direct browser tools or as a cloud server that runs whole web tasks.
- Browserbase: The Browserbase MCP server gives AI agents a browser that runs in Browserbase's cloud, controlled with plain-language commands through Stagehand: navigate, act on the page, observe elements and extract data.
- Chrome DevTools: The Chrome DevTools MCP server gives AI agents control of a live Chrome browser with DevTools access: performance traces, network requests, console errors, Lighthouse audits, memory snapshots and page automation.