r/mcp • u/TheMainBrainMan • 5d ago
showcase A serverless headless browser MCP for extracting JSON from React sites (Zero Puppeteer)
Hey r/mcp,
I got tired of standard fetch tools failing on client-side rendered apps, and running heavy Playwright/Puppeteer setups locally just for simple extractions is a pain (plus the official Puppeteer MCP was recently archived). So I built a lightweight, serverless alternative.
x402-cluster is an MCP server powered by Cloudflare Workers and Browser Run. You pass it a URL and a target JSON schema, it spins up a headless browser at the edge, waits for the JS to render, and returns perfectly typed data.
How it works: Instead of writing fragile DOM selectors, you just define the shape of the data you want back:
JSON
{
"url": "https://modern-react-site.com",
"schema": {
"title": "string",
"pricing_tiers": ["string"]
}
}**Two ways to pay for runs:**
- **Standard API Key:** Prepaid Bearer auth (easiest for Claude Desktop and local scripts).
- **Autonomous Micropayments:** Built for actual AI agents. Supports EIP-3009 off-chain signatures to settle $0.01–$0.05 per call directly on Base L2 USDC without requiring a prepaid balance.
*(There's also a free `preview_extract` tool built in if you want to test the endpoint without a key.)*
- Website: https://x402-site-6gt.pages.dev/
- GitHub / Setup: https://github.com/ianshelp/x402-cluster
Would love to hear what sites or workflows you're trying to scrape right now. Happy to answer any questions about the Cloudflare Browser Run architecture too!
2
u/Garitalabs6 5d ago
Neat approach running this on Workers instead of a local Puppeteer setup. Curious how you're handling the URL input on the server side — since it's fetching arbitrary URLs and rendering JS at the edge, is there any validation against internal/private IP ranges, or is that left entirely to whoever deploys it? That's usually the first thing that bites serverless fetch-and-render tools like this.
1
u/TheMainBrainMan 5d ago
Quick update for the folks asking about how billing works for failed scrapes vs. missing data:
I just updated the docs in the repo to clarify the policy: You only pay if the browser successfully loads and the LLM completes its pass. If the infrastructure crashes (Worker 500s, browser timeouts, etc.), you aren't charged. If the page loads but the data isn't in the DOM (login walls, CAPTCHAs), it still counts as a run since the compute was fully spent.
Highly recommend using the free `preview_extract` tool to verify a site's DOM visibility before wiring it into a paid agent loop!
2
u/FurryCyclone 5d ago
So you just give it the URL and the fields you want and it figures out where to get them?