MCP

Playwright MCP: Finish your first browser navigation in the client

For people who want an MCP client to drive a browser with accessibility snapshots and visit a page they specify, provided the machine already has Node.js 18 or newer.

Official source · Playwright MCP

Install

npx @playwright/mcp@latest

Who this is for

This guide is for people who already use an MCP client and are ready to launch a browser on this machine to automate pages. The decision is whether to connect Playwright MCP to your current client now, not whether to read a long introduction first. The hard prerequisite is local Node.js 18 or newer; if the version is too old, stop and do not keep writing configuration. The repository describes it as an MCP server that provides browser automation and understands pages through accessibility snapshots, not screenshots. You must accept two things: browser-related processes will appear on this machine, and real visits will be made to addresses you specify. If you only want to browse the repository and do not intend the client to perform any browser actions, this path is not for you. The evidence does not name industries, job roles, or team sizes, and this guide does not invent user personas.

Finish the first attempt in 3 minutes

Use only the official standard MCP configuration path. Open the server-configuration place in the MCP client you are already using—the evidence does not give a specific filename, so open that client's MCP settings entry—and add a service named playwright, with command npx and argument @playwright/mcp@latest. Do not put a second primary install method next to this one.

Confirm the machine already meets Node.js 18 or newer, then write the JSON below into the configuration exactly as shown. Keep it byte-identical: do not change key names or spaces:

{
  "mcpServers": {
    "playwright": {
      "command": "npx",
      "args": ["@playwright/mcp@latest"]
    }
  }
}

Save, then restart or reload that client. The success signal is that the names browser_navigate and browser_navigate_back appear in the tool list. The connection counts only once those names are exposed; do not treat a browser window popping up or a page opening as proof that install is complete.

After it is connected, make only one exploratory call: use browser_navigate. The evidence records only the tool name—no parameter table, no sample URL, and no undo path—so what you fill in must follow the tool description the client shows at that moment. Do not invent parameters or endpoints. This call will make the local browser visit the address you give, produce network requests and page loads, and leave browser-related processes on the machine. It is not a read-only action and it is not zero-risk. Before the call, you must confirm that you yourself specified the address and that the address can accept being visited. After the call, treat whether this call returns as the confirmation point. If you then use browser_navigate_back, that will likewise change the browser's current page and may produce another network request. Before that call, confirm the current session already has browsing history you can go back through.

Use cases

Case 1: Use browser_navigate to open a page you have explicitly specified. The right moment is when both tool names have already appeared and you have an address that can accept being visited. The only thing the evidence maps to is this tool name; there is no sample URL and no parameter fields are written out. The side effect is real navigation and network access. Check the address again before the call, and after the call see whether this call finished. Do not treat this as a local offline preview, and do not assume page content will not be read.

Case 2: Use browser_navigate_back to return to the previous page. The right moment is when navigation has just completed in the same browsing session. The evidence again gives only this tool name—no history-list API and no revert or undo path. If there has been no successful forward navigation, going back may fail or land on a page you did not expect; the evidence does not describe the state after failure. This call will also change the current page and may hit the network again. Before the call, confirm that you have actually navigated; the confirmation point is still whether this call returns.

Limits

The runtime floor is Node.js 18 or newer; do not force a lower version. Capability stops at browser automation, and the description uses accessibility snapshots rather than screenshots. The evidence does not include screenshot-style tools, nor commands to close the browser, clean up the session, uninstall, or undo. Do not assume there is no network, no local reading, or no privacy boundary: once you navigate, the target site will be visited, page content may enter the client context, and browser processes will appear on the machine. If the first attempt fails, first check the Node version and whether the JSON matches the official snippet byte-for-byte, then see whether the two tool names appeared. Do not switch to an install method that does not appear in the evidence. Do not treat capabilities not named in the evidence as already supported.