Pixel-perfect HTML/CSS to PNG/JPG/WebP for AI agents — inline image or 24h hosted URL.
MCPpedia last refreshed this data
This server has been archived and is no longer actively maintained.
io.github.beznazwiska/codetoimage-mcp-server is an MCP server that pixel-perfect HTML/CSS to PNG/JPG/WebP for AI agents — inline image or 24h hosted URL. Its tool list has not been published yet over stdio and http, requires no API key, and scores 68/100 on MCPpedia's security, maintenance and efficiency rubric.
Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"codetoimage": {
"env": {
"CODETOIMAGE_API_KEY": "cti_live_..."
},
"args": [
"-y",
"@codetoimage/mcp-server"
],
"command": "npx"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
Official Model Context Protocol server for codetoimage.app — render HTML/CSS to PNG/JPG/WebP directly from Claude Desktop, Claude Code, Cursor, or any MCP-compatible client.
Run this in your terminal to verify the server starts. Then let us know if it worked — your result helps other developers.
npx -y '@codetoimage/mcp-server' 2>&1 | head -1 && echo "✓ Server started successfully"
After testing, let us know if it worked:
Five weighted categories — click any category to see the underlying evidence.
No known CVEs.
Checked @codetoimage/mcp-server against OSV.dev.
Click any tool to inspect its schema.
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in ai-ml
MCP client bridge: connects to MCP servers and registers their tools on ctx.tools
An autonomous agent that conducts deep research on any data using any LLM providers
The official MCP server implementation for the Perplexity API Platform
Workspace template + MCP server for Claude Code, Codex CLI, Cursor & Windsurf. Multi-agent knowledge engine (ag-refresh / ag-ask) that turns any codebase into a queryable AI assistant.
MCP Security Weekly
Get CVE alerts and security updates for io.github.beznazwiska/codetoimage-mcp-server and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
Official Model Context Protocol server for codetoimage.app – render HTML/CSS to PNG/JPG/WebP directly from Claude Desktop, Claude Code, Cursor, or any MCP-compatible client.
Two tools, no setup beyond an API key:
render_html_to_image – returns the image inline so your agent (or you, in chat) can see it immediately. Best for "show me the rendered card", OG preview iteration, chart generation, badge mockups.render_html_to_url – returns a temporary hosted URL (24h TTL). Best when the image needs to live somewhere external – Instagram Graph API, OpenGraph meta tags, Slack unfurls, docs/posts embeds.You don't need to install anything globally – MCP clients can run it via npx. Get an API key at codetoimage.app/dashboard/keys, then add the config below.
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"codetoimage": {
"command": "npx",
"args": ["-y", "@codetoimage/mcp-server"],
"env": {
"CODETOIMAGE_API_KEY": "cti_live_..."
}
}
}
}
Restart Claude Desktop. The two tools appear in the tool picker.
claude mcp add codetoimage -s user -- npx -y @codetoimage/mcp-server
Then set the env var in your shell profile (or pass -e CODETOIMAGE_API_KEY=cti_live_… in the claude mcp add call).
Edit ~/.cursor/mcp.json:
{
"mcpServers": {
"codetoimage": {
"command": "npx",
"args": ["-y", "@codetoimage/mcp-server"],
"env": {
"CODETOIMAGE_API_KEY": "cti_live_..."
}
}
}
}
The tools are self-documenting – your agent will pick the right one based on intent. Example prompts that just work:
"Render this card as a PNG:
<div style='padding:40px;background:#6366f1;color:white;border-radius:16px'>Hello</div>at 800×400."
"Generate an Open Graph image for the blog post 'Why agents need pixel-perfect rendering' and give me a URL I can paste into the og:image meta tag."
"Take this CSS card and render it as a transparent PNG so I can use it on a dark background."
"Render my saved template 3f2a91d0-... with title 'Launch day' as an Instagram story."
render_html_to_image| Field | Type | Required | Notes |
|---|---|---|---|
html | string | ✓* | Full HTML (typically with <body>). *Not needed with template_id |
css | string | – | Optional CSS injected as <style> |
template_id | uuid | ✓* | Saved template from the dashboard (Templates page); alternative to html |
variables | object | – | Values for {{placeholders}} in the template (HTML-escaped) |
preset | enum | – | Named size: og, twitter-card, facebook-post, linkedin-post, instagram-square, instagram-portrait, instagram-story, youtube-thumbnail, pinterest-pin |
width | integer 1-2048 | – | Default 800; overrides preset |
height | integer 1-2048 | – | Default 600; overrides preset |
format | png | jpeg | webp | – | Default png |
quality | integer 1-100 | – | JPEG/WebP only |
transparent | boolean | – | PNG/WebP, paid plans |
background | string | – | e.g. #ffffff or rgb(…) |
Returns: image content (base64 inline), rendered in the chat.
render_html_to_urlSame input schema as render_html_to_image. Returns a text block with:
url – temporary hosted image URLformat – final output formatexpires_at – ISO timestamp (24h from render)credits_remaining – your plan's quota state| Variable | Default | Purpose |
|---|---|---|
CODETOIMAGE_API_KEY | – | Required. Get one at codetoimage.app/dashboard/keys |
| `CODETOIMA |