Imoran ai LogoImoran ai Logo

RPC Agent

A CLI and MCP server that lets coding agents screenshot a URL at real phone, tablet and desktop viewports, framed in device bezels and signed in when the page needs it. The successor to my RPC Chrome extension, on npm as rpc-agent.

Services

Developer Tooling

Timeline

2 Days

Technologies
TypeScriptNode.jsPlaywrightModel Context Protocol SDKZodClackVitest
View Live Project →

Line drawing of a laptop, tablet and phone behind a terminal running rpc shot, with the Claude Code, Codex and Cursor marks wired into its prompt.
01

Introduction

A CLI and MCP server that lets coding agents screenshot a URL at real phone, tablet and desktop viewports, framed in device bezels and signed in when the page needs it. The successor to my RPC Chrome extension, on npm as rpc-agent.

02

Work Done

CLI & MCP Server

rpc shot in a terminal capturing three devices, with a results table of status codes and timings and the list of PNG files it wrote.
03

Challenges

Giving an agent a full-page view of pages taller than Chromium's 16,384 px capture limit, in a form a model can read, and screenshotting signed-in pages without sending a token to another host on a redirect.

The first five labelled slices the MCP screenshot tool returns for a full-page iPhone 15 capture, each one viewport tall.
04

Solutions

Clipped segments stitched in Node with a zlib-based PNG decoder, returned to the agent as labelled viewport-tall slices. Sessions saved per origin, and auth headers injected through the CDP Fetch domain so the origin is checked on every redirect hop.

An rpc capture on an iPhone 15 at 393 by 852, framed in its device bezel.
The same page captured on an iPad Air 11 at 820 by 1180, framed in its device bezel.
05

Results

Published on npm as rpc-agent v0.4.0 under MIT, with setup for Claude Code, Codex and Cursor. One command registers the MCP server in Claude Code or Codex, and from then on the agent can screenshot its own work on any of the 49 devices.

06

Details

Why a CLI

Responsive Point Check is a Chrome extension. That works when I'm the one clicking through devices, but a coding agent can't open a toolbar. rpc-agent gives Claude Code, Codex and Cursor the same check. It's one npm package, `rpc-agent`, with two entry points: an `rpc` CLI and an MCP server with `screenshot`, `listdevices` and `listsessions` tools. Both call the same `capture()` function, and Playwright's Chromium takes the shot. The 49 devices and their bezels come straight from the extension.

Pages taller than Chromium

Chromium won't draw a bitmap taller than 16,384 px. Past that, rpc captures clipped segments and stitches them in Node with a small PNG decoder built on `node:zlib`, so there are no native dependencies. I picked segment heights so every seam lands on a whole pixel row, even at a 2.625 pixel ratio, and the e2e test checks a 21,656 px page at 3x row by row. What the agent gets back is a set of labelled JPEG slices, each one viewport tall.

Signed-in pages

`rpc login` saves a session per origin. Custom headers go through the CDP Fetch domain instead of `page.route`, because route overrides follow redirects and would hand a token to whatever host the redirect points at. Fetch pauses on every redirect hop, so rpc checks the origin each time.

Created by

Tope Akintola

Published

October 30, 2026

Role

Developer Tooling

Share

Let's Work
Together

Hand Reaching

Have a project in mind? We'd love to hear about it. Let's create something great together!

PRODUCT DEVELOPERUI ENGINEERMVP DEVELOPMENTFRONTEND DEVELOPMENTPRODUCT DEVELOPERUI ENGINEERMVP DEVELOPMENTFRONTEND DEVELOPMENTPRODUCT DEVELOPERUI ENGINEERMVP DEVELOPMENTFRONTEND DEVELOPMENT