
Codetoimage Mcp Server
Render HTML and CSS snippets to PNG, JPG, or WebP from the agent for docs, social previews, or UI mocks.
Overview
CodeToImage MCP Server is an MCP server for the Build phase that converts HTML/CSS to PNG, JPG, or WebP via the CodeToImage API for agents.
What is this MCP server?
- Pixel-perfect HTML/CSS rasterization to PNG, JPG, and WebP
- Returns inline image bytes or a 24-hour hosted URL for sharing
- Sandbox tier on CodeToImage is free with API key from dashboard
- Configurable API base via CODETOIMAGE_API_URL
- stdio MCP package @codetoimage/mcp-server v0.1.2
- Package version 0.1.2
- Default API host https://api.codetoimage.app
- Output formats: PNG, JPG, WebP; hosted URLs valid 24 hours per product description
What problem does it solve?
Agents can write markup but struggle to deliver shareable, pixel-accurate images without you running a browser or design export step.
Who is it for?
Indie builders who want fast social cards, landing screenshots, and UI snippets from agent-generated HTML without maintaining Puppeteer.
Skip if: Teams needing collaborative design systems, vector editing, or long-term asset CDN hosting beyond the API’s URL lifetime.
What do I get? / Deliverables
After install, the agent can request rendered images inline or as 24h hosted URLs straight from HTML/CSS inputs.
- PNG, JPG, or WebP image from submitted HTML/CSS
- Optional 24-hour hosted image URL from the CodeToImage API
Recommended MCP Servers
Journey fit
How it compares
Remote render API via MCP, not an in-IDE screenshot skill or local Playwright automation pack.
Common Questions / FAQ
Who is CodeToImage MCP Server for?
Builders and agent users who need PNG, JPG, or WebP output from HTML/CSS during content and frontend work.
When should I use CodeToImage MCP Server?
Use it when the agent has finalized markup and you need a pixel-perfect image for docs, posts, or previews in one MCP call.
How do I add CodeToImage MCP Server to my agent?
Add the stdio MCP entry for @codetoimage/mcp-server, set CODETOIMAGE_API_KEY (cti_live_… from the dashboard), and optionally override CODETOIMAGE_API_URL.