Back to experience
AI Engineer Intern · Sep 2026–Present

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.

89 passing tests on macOS · 88 on LinuxDocumented November 24 development snapshot. Linux skipped one macOS-specific test.
  • Python
  • MCP
  • Playwright
  • Cloud Run
Actual MCP browser capture of a publicly available Mangrove review, showing the review text returned for an agent to inspect
Public-source capture from the prototype. Review by eigenval via MapComplete / Mangrove; screenshot unchanged. · Source · Review: CC BY 4.0 · OpenStreetMap contributors (ODbL) · Open full-size image

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.

  1. MCP client
  2. Playwright capture
  3. PNG image response
  4. Client inspection
Implementation flow

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.