browser_click
Perform click on a web page
Drive a real browser from an agent — it acts on the page's accessibility tree rather than pixels, and hands back the Playwright code for every action it took.
The plugin Microsoft Agent Skills includes connection settings for this server.
LABSCO SUMMARY
What it takes off you is the driving: open the page, find the control, fill the form, then check what actually happened — against the live page rather than fetched HTML. Every action returns the Playwright line that performed it, so the session reads back as code afterwards.
Microsoft's own MCP server for Playwright. It drives a real browser and works off the page's accessibility snapshot, so an agent addresses named elements instead of coordinates. Twenty-four tools are on by default; another forty-five sit behind --caps.
browser_navigate, browser_click, browser_fill_form, browser_file_upload, browser_handle_dialog)browser_snapshot, browser_find)browser_console_messages, browser_network_requests, browser_network_request)browser_take_screenshot, browser_wait_for, browser_tabs, browser_evaluate)--caps=storage: cookies and local and session storage read, set, deleted and cleared, plus a whole storage state saved and restored — which is how a logged-in session is reused instead of re-entered--caps=network: routes that mock a URL pattern with your own status, body and headers, listed and removed, and the browser switched offline--caps=devtools: tracing started and stopped, video recording with chapters, and elements highlighted or annotated on the page--caps=testing for checking an element, a list, a text or a value is visible, plus a locator generated for it — the pieces of a test rather than a click--caps=vision, PDF export behind --caps=pdf, and the resolved configuration read back behind --caps=configNode.js 18 or newer and npx — nothing else. It starts as a local process and talks to the client over stdio, so the browser it drives is the one on that machine. One thing to know before running two clients at once: a persistent profile can only be used by one browser instance at a time, so give each extra client --isolated or its own --user-data-dir. Extra capabilities come from --caps as a comma-separated list, or the PLAYWRIGHT_MCP_CAPS environment variable.
One command — npx @playwright/mcp@latest
USE CASES
Walk the signup, the checkout or the settings page and read the snapshot at each step. Because every action comes back as the Playwright line that performed it, the session you just ran is most of the test you were going to write.
Follow the steps in the report, then read the console messages and the network requests from the same session. The evidence and the reproduction arrive together instead of being reconstructed afterwards.
Fill every field in one call from the snapshot's named elements rather than one type-and-click at a time. Fewer round trips, and no coordinates to go stale when the layout shifts.
Turn on the network capability and mock the endpoint with your own status and body, or flip the browser offline. That gets you the error state without breaking a real backend to see it.
With the storage capability on, save the storage state once after signing in and restore it at the start of later runs. Cookies and both web storages come back with it.
Snapshot the page, search it for the pattern you want, and evaluate JavaScript against the matching element when the structure needs unpicking. It reads the rendered page, so client-side rendering is not an obstacle.
With the testing capability on, assert that the element, list, text or value is what it should be, and generate a locator for it. What you get back is test code rather than a transcript.
Counted once with only startup setup. Other versions, modes or optional credentials may expose a different list.
browser_clickPerform click on a web page
browser_closeClose the page
browser_console_messagesReturns all console messages
browser_dragPerform drag and drop between two elements
browser_dropDrop files or MIME-typed data onto an element, as if dragged from outside the page. At least one of "paths" or "data" must be provided.
browser_evaluateEvaluate JavaScript expression on page or element
browser_file_uploadUpload one or multiple files
browser_fill_formFill multiple form fields
browser_findSearch the accessibility snapshot of the current page for text or a regular expression. Returns matching snapshot nodes with a few lines of surrounding context (like search snippets), each shown under its path from the root of the tree, which is cheaper than capturing the whole snapshot when you only need to locate an element and its ref.
browser_handle_dialogHandle a dialog
browser_hoverHover over element on page
browser_navigateNavigate to a URL
browser_navigate_backGo back to the previous page in the history
browser_network_requestReturns full details (headers and body) of a single network request, or a single part if part is set. Use the number from browser_network_requests.
browser_network_requestsReturns a numbered list of network requests since loading the page. Use browser_network_request with the number to get full details.
browser_press_keyPress a key on the keyboard
browser_resizeResize the browser window
browser_run_code_unsafeRun a Playwright code snippet. Unsafe: executes arbitrary JavaScript in the Playwright server process and is RCE-equivalent.
browser_select_optionSelect an option in a dropdown
browser_snapshotCapture accessibility snapshot of the current page, this is better than screenshot
browser_tabsList, create, close, or select a browser tab.
browser_take_screenshotTake a screenshot of the current page. You can't perform actions based on the screenshot, use browser_snapshot for actions.
browser_typeType text into editable element
browser_wait_forWait for text to appear or disappear or a specified time to pass
BEFORE YOU INSTALL
24 tools when we connected; the project documents 69. Only the Core automation and Tab management groups load by default. The rest are opt-in with --caps=config, network, storage, devtools, vision, pdf or testing, and --read-only narrows the set further.
One of the tools runs code rather than driving the browser: browser_run_code_unsafe takes a Playwright snippet and, in its own description, "executes arbitrary JavaScript in the Playwright server process and is RCE-equivalent." Page-level JavaScript has its own tool — browser_evaluate — which runs on the page or on a single element.
INSTALLATION
npx @playwright/mcp@latest{
"amp.mcpServers": {
"playwright": {
"command": "npx",
"args": [
"@playwright/mcp@latest"
]
}
}
}https://insiders.vscode.dev/redirect?url=vscode%3Amcp%2Finstall%3F%257B%2522name%2522%253A%2522playwright%2522%252C%2522command%2522%253A%2522npx%2522%252C%2522args%2522%253A%255B%2522%2540playwright%252Fmcp%2540latest%2522%255D%257D