This is so good. I've been using it with Claude Code with great success.
I just leave an instruction in CLAUDE.md to validate changes with Playwright. It automatically starts a dev server (wrote a little MCP server to do that), navigates to the page with the changes it just made, and validates that its changes worked. If there is anything unexpected, it self-corrects.
It's like working with a really great mid-level engineer.
Interesting use-case. Can you give an example of a prompt you use that triggers this tool? Are you validating UI changes (button color), navigation, or something more complex?
+1 for claude code being amazing, and especially +1 for the cost. I've spent $500 this week, $.10 - $1 at a time, fixing bugs and adding features. It took a while to get used to not @ tagging all of the files and realizing it just "figures it out" (using tokens to do so of course!)
It uses ariaSnapshot, which is an accessible representation of the DOM used by screen readers and accessibility validation tools as well as playwright testing.
However, even with that, it will quickly exhaust the model context if you navigate to something like Gmail. I just verified this with cursor.
I've been playing around with a much better textual representation of the page that's much more compact:
I agree -- I hacked up a CDP-driven MCP so that Claude can drive your own browser instance, and I think that's more in the spirit of how MCP is supposed to work (where it's driving your tools under supervision, rather than spinning up its own context)
I’m going to see if I can use this in combination with our JIRA MCP to read a bug ticket’s “steps to reproduce” to see if it translate those steps to actually reproduce those actions.
I don’t understand the hate against MCP. It is truly exciting to see the Cambrian explosion of “connectors” coming out.
This is going to be the “App Store” for models in a way that OpenAI’s custom GPTs never was.
Watermarking and synthesizing text for hosts and clients, private RAG over Slack MCP implementations would disperse LLM's to Local Data Souce: A, B, and remote server C.
I don't know playwright, but how is this different than puppeteer?
The issue I'm noticing with puppeteer is that it isn't always successful to immediately get the right javascript to complete a simple task such as accepting a cookie consent banner, for example.
Playwright is a bit of an evolution of Puppeteer. Mostly the same API, extends the API a bit (I tend to prefer its abstractions over Puppeteer), and designed to work with multiple browsers. It came from many of the same developers as Puppeteer.
Does Playwright work with multiple browsers? I get the impression it can work with multiple engines, but they're just custom wrappers and not the full/original browsers.
I just leave an instruction in CLAUDE.md to validate changes with Playwright. It automatically starts a dev server (wrote a little MCP server to do that), navigates to the page with the changes it just made, and validates that its changes worked. If there is anything unexpected, it self-corrects.
It's like working with a really great mid-level engineer.
What a time to be alive.
However, even with that, it will quickly exhaust the model context if you navigate to something like Gmail. I just verified this with cursor.
I've been playing around with a much better textual representation of the page that's much more compact:
https://github.com/lxe/chrome-mcp/blob/master/src/runtime-te...
This uses your own chrome session and doesn't require a huge context size.
I might refactor this to use the aria interface available to the CDP, which I wasn't aware of at the time.
I don’t understand the hate against MCP. It is truly exciting to see the Cambrian explosion of “connectors” coming out.
This is going to be the “App Store” for models in a way that OpenAI’s custom GPTs never was.
The Microsoft one seems simpler, whereas the other one has more tools.
Note also, there's a Fetch-MCP which is playwright based, supports batch. Would be interesting to compare. https://github.com/jae-jae/fetch-mcp https://news.ycombinator.com/item?id=43419713 (64 points, 6 days ago, 14 comments)
[1]:https://dlsp2024.ieee-security.org/wagner.pdf
The issue I'm noticing with puppeteer is that it isn't always successful to immediately get the right javascript to complete a simple task such as accepting a cookie consent banner, for example.
Vscode comes with a built in MCP client ?