Skip to content
Agentmart
Submit a tool

How to connect Playwright to Claude Code

Playwright MCP is published by microsoft, and the listing marks it as the vendor's own server. It runs locally, launched by npx, and the listing names no API key. This guide adds it to Claude Code and then confirms it loaded, using commands taken from the listing's install data and Claude Code's docs.

Updated Oct 26, 2026 · Built from catalog data; how we rank and grade

Checked against Claude Code's documentation on Oct 26, 2026. Commands and config blocks are generated from the same install data as each listing page.

Before you start

  • Claude Code installed and able to start.
  • Node.js with npx (the server starts with npx).
  • No API key is listed for Playwright MCP.
  1. 1. Check what you need

    Because Playwright MCP is an npx package, Node.js comes first. Confirm it with node --version before touching Claude Code.

    Check that it is installed
    node --version
    • The listing names no required key.
  2. 2. Add Playwright MCP to Claude Code

    Two ways to register Playwright MCP are shown: a one-line command for your own setup across projects, and a .mcp.json entry you can keep with a single project.

    Add it for you in every project
    claude mcp add --transport stdio --scope user playwright-mcp -- npx -y @playwright/mcp@0.0.82
    Or share it with the project: put this in .mcp.json at the project root.mcp.json
    {
      "mcpServers": {
        "playwright-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "@playwright/mcp@0.0.82"
          ]
        }
      }
    }
  3. 3. Restart or reload if it does not appear

    A registered server that does not appear can be a reconnect or approval matter in Claude Code. The notes record what its docs do and do not say.

    • The docs do not say a restart is needed after claude mcp add. Servers connect at startup and can be reconnected from the /mcp menu.
    • In an interactive session Claude Code asks you to approve servers from a project .mcp.json before it uses them; claude mcp reset-project-choices resets those answers.

Check that it works

Run claude mcp list and look at the state shown next to the Playwright MCP entry.

claude mcp list
  • Run claude mcp list from the shell, or /mcp inside a session. The list shows each server as Connected, Needs authentication, Failed to connect, or Pending approval.

Troubleshooting

Error: MCP server has a "url" but no "type"
Add "type": "http" (or sse) to the entry in the JSON file. Source
MCP server already exists in local config
Remove it from the other scope first with claude mcp remove <name> --scope <scope>, then add it again. Source
A ${VAR} in the config stays literal
The variable is unset. Export it before starting Claude Code or give it a default with ${VAR:-default}; claude mcp list shows a warning. Source
Server shows disconnected in a session
Open /mcp and reconnect it. Source

Reported by other users

Issues in the server's repository (microsoft/playwright-mcp) about installing or starting it, as of Oct 26, 2026. They are links, not fixes: open one to see whether it was resolved.

Security notes

  • Publisher: microsoft, listed as the vendor's own server; license Apache-2.0.
  • It runs on your machine with your user account's permissions, so it can reach any file or network resource you can. Read its source before you give it access: https://github.com/microsoft/playwright-mcp.
  • The listing declares no required keys; use a token with the narrowest scope if the service asks for one.
  • This listing has no security grade: Agent Market has not published security grades yet, so the choice is yours to make from the source and the permissions.

How we grade security · Trust policy

Servers and skills in this guide

Next, look at other Playwright servers, put them side by side, or read the general Claude Code guide.

  1. 1
    Playwright MCP

    microsoftOfficial

    Playwright Tools.

    ★ 38.6KLast active Oct 22, 2026Local (stdio)Claude Code, Codex, VS Code, Cursor +2

Sources

Cite this page

How to connect Playwright to Claude Code. Agent Mart. https://agentmart.dev/guides/connect-playwright-to-claude-code (last updated 2026-10-26)