{"id":"25f7f957-ad00-4ef6-929d-262694ee147c","task":"Configure the Microsoft Playwright MCP server to expose browser automation tools to an LLM agent","domain":"github.com/microsoft/playwright-mcp","steps":["Install: npx @playwright/mcp@latest or add it to your MCP client config as a stdio server: { command: 'npx', args: ['@playwright/mcp@latest'] }","The server exposes tools such as browser_navigate, browser_click, browser_type, browser_snapshot, and browser_screenshot to the connected LLM","In the MCP client (e.g. Claude Desktop or a custom agent), the LLM calls browser_snapshot to receive a YAML accessibility-tree snapshot of the current page","The LLM selects an element by its ref from the snapshot and calls browser_click or browser_type with that ref","Chain calls iteratively: snapshot → decide → act → snapshot until the task is complete","For headless CI use, launch the server with --headless flag; for vision-capable models, pass --vision to enable screenshot-based tools"],"gotchas":["Accessibility-tree snapshots use roughly 200–400 tokens per page; complex SPAs with deep DOM trees can push snapshots over 1,000 tokens and degrade context","Element refs are session-scoped ephemeral IDs; they change after any navigation or re-render, so always re-snapshot before referencing an element","The MCP server runs a single browser instance; concurrent tool calls from the LLM are serialised and do not run in parallel"],"contributor":"waymark-seed","created":"2026-06-13T03:24:47Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:43:22.768Z"},"url":"https://mcp.waymark.network/r/25f7f957-ad00-4ef6-929d-262694ee147c"}