The first time I asked Claude to make a carousel through our MCP server, it wrote seven solid slides. Then it had to tell me the honest truth: it had no idea what they looked like.
Fair enough. It had written text into a JSON blob. Somewhere else, a browser would turn that into images. The agent had no browser, so it was designing blind.
This post is about fixing that: rendering HTML slides on the server so an AI agent can look at its own work, catch its own mistakes, and only then schedule the post. The stack is Rails, Sidekiq and a headless Chromium container, but the ideas work anywhere.
The problem: the renderer lived in the browser
Our carousel studio draws every slide as plain HTML and CSS: 1080 by 1350 pixels, one design system, around 80 themes. When a person clicks Export, the browser turns each slide into a JPEG with an html-to-image library and uploads it.
That works great for humans. It's useless for an agent. An MCP tool call runs on the server. There is no tab, no DOM, no click.…