Browser screenshots for AI agents
Credio
At Credio, I built a Python Model Context Protocol (MCP) server so AI clients could request a webpage screenshot and receive a readable image. The public example wraps Playwright capture, returns PNGs over Streamable HTTP, and supports approved local review images.
- Python
- MCP
- Playwright
- Cloud Run

Delivering a readable screenshot
The Playwright tool captures an allowed webpage or its review section. I returned the PNG as MCP image content alongside the source and capture status. That lets the client inspect the image directly. The screenshot above is a public Mangrove example from this workflow.
A page can respond successfully and still render blank or show a verification page. I added diagnostics for failed requests, page errors, and rendering state, and used offline fixtures to test timing and unavailable pages.
- MCP client
- Playwright capture
- PNG image response
- Client inspection
Testing delivery from Cloud Run
I packaged the development service with headless Chromium and verified that an authenticated remote client could open a session and receive a PNG from a controlled test page. Desktop capture ran separately on macOS.
The development prototype was used for integration testing. The public risk tool returns fictional demo ratings. The screenshot tests cover capture and transport, while merchant-underwriting accuracy is outside their scope.
Regression testing
In the documented November 24 snapshot, 89 tests passed on macOS and 88 on Linux. Linux skipped one macOS-specific test. The tests covered rendering, input validation, screenshot delivery, and failure reporting.