Skip to content

Playwright MCP: install, tools and limits

Better Design

Direct answer

Playwright MCP gives a coding agent a real browser through Playwright, so it can open pages, click, type and fill forms. It runs over local stdio by default, or HTTP when you start it with --port, needs no sign-in, and exposes 72 tools.

A hand-drawn terminal that connects a coding agent to Playwright MCP, with the server's name and tool count written beside it.

What Playwright MCP does

Playwright MCP gives a coding agent a real browser through Playwright, so it can open pages, click, type and fill forms. It reads each page as a structured accessibility snapshot instead of a screenshot, so it needs no vision model.

Microsoft maintains it. The latest release on npm is @playwright/mcp 0.0.85, published November 9, 2026. It is licensed under Apache-2.0.

How a coding agent uses Playwright MCP

The agent asks, Playwright MCP acts, and the result comes back into the session.

A hand-drawn three-step flow from the coding agent to Playwright MCP and back: Open the page I just built and check the form, Drives the browser and reads the accessibility snapshot, The snapshot, console messages and a screenshot.
  1. The agent asks: Open the page I just built and check the form
  2. Playwright MCP acts: Drives the browser and reads the accessibility snapshot
  3. The result comes back: The snapshot, console messages and a screenshot

Install Playwright MCP in Claude Code

terminal
claude mcp add playwright npx @playwright/mcp@latest

Install Playwright MCP in Cursor

Cursor MCP settings (mcp.json)
{
  "mcpServers": {
    "playwright": {
      "command": "npx",
      "args": [
        "@playwright/mcp@latest"
      ]
    }
  }
}

Install Playwright MCP in VS Code

terminal
code --add-mcp '{"name":"playwright","command":"npx","args":["@playwright/mcp@latest"]}'

Install Playwright MCP in Codex

terminal
codex mcp add playwright npx "@playwright/mcp@latest"

The 72 tools Playwright MCP gives your agent

Playwright MCP lists these names in its own documentation, read on November 12, 2026. Your agent sees each one as a tool it can call.

  • On by default: browser_click, browser_close, browser_console_messages, browser_drag, browser_drop, browser_emulate_media, browser_evaluate, browser_file_upload, browser_fill_form, browser_find, browser_handle_dialog, browser_hover, browser_navigate, browser_navigate_back, browser_network_request, browser_network_requests, browser_press_key, browser_resize, browser_run_code_unsafe, browser_select_option, browser_snapshot, browser_take_screenshot, browser_type, browser_wait_for, browser_tabs
  • config (--caps=config): browser_get_config
  • network (--caps=network): browser_network_state_set, browser_route, browser_route_list, browser_unroute
  • storage (--caps=storage): browser_cookie_clear, browser_cookie_delete, browser_cookie_get, browser_cookie_list, browser_cookie_set, browser_localstorage_clear, browser_localstorage_delete, browser_localstorage_get, browser_localstorage_list, browser_localstorage_set, browser_sessionstorage_clear, browser_sessionstorage_delete, browser_sessionstorage_get, browser_sessionstorage_list, browser_sessionstorage_set, browser_set_storage_state, browser_storage_state
  • devtools (--caps=devtools): browser_annotate, browser_hide_highlight, browser_highlight, browser_resume, browser_start_recording, browser_start_tracing, browser_start_video, browser_stop_recording, browser_stop_tracing, browser_stop_video, browser_video_chapter, browser_video_hide_actions, browser_video_show_actions
  • vision (--caps=vision): browser_mouse_click_xy, browser_mouse_down, browser_mouse_drag_xy, browser_mouse_move_xy, browser_mouse_up, browser_mouse_wheel
  • pdf (--caps=pdf): browser_pdf_save
  • testing (--caps=testing): browser_generate_locator, browser_verify_element_visible, browser_verify_list_visible, browser_verify_text_visible, browser_verify_value

Settings worth knowing in Playwright MCP

--headless
What it changes

Run browser in headless mode, headed by default

Server

Playwright MCP

--browser <browser>
What it changes

Browser or chrome channel to use, possible values: chrome, firefox, webkit, msedge.

Server

Playwright MCP

--caps <caps>
What it changes

Comma-separated list of additional capabilities to enable

Server

Playwright MCP

--device <device> / --viewport-size <size>
What it changes

Device to emulate, for example: "iPhone 15" / specify browser viewport size in pixels, for example "1280x720"

Server

Playwright MCP

--isolated
What it changes

Keep the browser profile in memory, do not save it to disk.

Server

Playwright MCP

Sign-in, limits and caveats for Playwright MCP

Sign-in: None. The server drives a local browser and asks for no account or key.

Limits and price: The server is open source under Apache-2.0 and free to run. Its documentation states no usage limit.

  • Requires Node.js 18 or newer.
  • Playwright MCP is not a security boundary.
  • The Docker implementation only supports headless chromium.

Use Playwright MCP for interface work

An agent can load a page it built, read its accessibility snapshot with browser_snapshot, resize it with browser_resize, take browser_take_screenshot captures, and check text or elements with the opt-in browser_verify_* tools.

Steal this workflow

Run this guide in your own assistant. The prompt carries the guide link and the workflow summary, so the assistant can adapt it to your project.

Read the guide "Playwright MCP: install, tools and limits" at https://better-design.com/blog/playwright-mcp and help me apply it to my project.

Playwright MCP gives a coding agent a real browser through Playwright, so it can open pages, click, type and fill forms. It runs over local stdio by default, or HTTP when you start it with --port, needs no sign-in, and exposes 72 tools.

Start by asking what I am building and which tools I use. Then walk me through the workflow step by step, adapted to my answers.

Claude and ChatGPT open with the prompt filled in. Gemini copies the prompt to your clipboard first, so paste it when the app opens.

Questions

What does Playwright MCP do?

Playwright MCP gives a coding agent a real browser through Playwright, so it can open pages, click, type and fill forms. It reads each page as a structured accessibility snapshot instead of a screenshot, so it needs no vision model.

Does Playwright MCP need an API key or sign-in?

None. The server drives a local browser and asks for no account or key.

Is Playwright MCP free?

The server is open source under Apache-2.0 and free to run. Its documentation states no usage limit.

Which coding agents can use Playwright MCP?

Its documentation shows a setup for Claude Code, Cursor, VS Code, Codex. Any client that speaks MCP over local stdio by default, or HTTP when you start it with --port can connect.

Where these Playwright MCP facts come from

Each fact on this page comes from Playwright MCP's own repository, documentation or package registry, read on November 12, 2026.

Add design rules next to it

Playwright MCP gives the agent its tools. It does not tell the agent what a good screen looks like. Better Design adds that part: a design system, interface principles and review rules that the agent calls while it builds.