# Browser automation agent (local)

> Let an agent click through websites: test your app, fill forms, collect data.

- Category: Browser automation · Difficulty: Beginner
- Estimated monthly cost: $0–$20/mo. Playwright MCP is free and runs locally (Node.js 18+). Cost is your agent plan, e.g. Claude Pro $20.
- Model: Claude Sonnet 5.5
- MCP servers: Playwright MCP (npx @playwright/mcp@latest)
- Last checked: 2026-10-21 · Hands-on tested: no (built from official docs)
- Canonical: https://getagentloadout.com/loadouts/browser-automation-local/ · JSON: https://getagentloadout.com/data/loadouts/browser-automation-local.json

## Tools
- [Claude Code](https://claude.com/product/claude-code): Anthropic's agentic coding tool for the terminal and IDEs. Included in paid Claude plans. Pricing: Pro $20/mo ($17/mo billed yearly; 5-hour and weekly usage limits); Max 5x $100/mo (5x Pro usage per session); Max 20x $200/mo (20x Pro usage per session). Source: https://claude.com/pricing
- [Playwright MCP](https://github.com/microsoft/playwright-mcp): Microsoft's MCP server that lets agents drive a real browser via accessibility snapshots. Pricing: Open source $0/mo (Runs locally with npx). Source: https://playwright.dev/docs/getting-started-mcp

## Starter prompt

```
Open http://localhost:3000 and test the signup flow like a new user. Try one valid signup and three invalid ones. Report each step, what you expected, what happened, and take a screenshot of anything broken.
```

## Config (.mcp.json)

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

## Setup steps
1. Add the Playwright MCP server.
2. Start your app locally.
3. Run the prompt; add --headless to the args to hide the browser.

## Why this works
Accessibility snapshots give the model a structured view of the page, which is more reliable than screenshots alone.

## Watch out
Don't let it log into accounts that hold real money or data without watching.

## Related loadouts
- [AI QA agent: plan, write and self-heal end-to-end tests](https://getagentloadout.com/loadouts/qa-test-agents/)
- [Cloud browser agent at scale](https://getagentloadout.com/loadouts/browser-agent-cloud/)
- [Pay-per-minute browser agent](https://getagentloadout.com/loadouts/browser-use-payg/)

Some links may be affiliate links; it never affects rankings. Rankings are never for sale.
