beznazwiska avatar

Codetoimage Mcp Server

beznazwiska/codetoimage-mcp-server

Wraps the codetoimage.app REST API so your agent can render HTML/CSS into PNG, JPG, or WebP without leaving the chat. Two tools: render_html_to_image returns the image inline for instant preview, while render_html_to_url gives you a 24-hour hosted link you can drop into og:image tags, Slack messages, or anywhere else that needs a public URL. You control dimensions up to 2048×2048, output format, transparency, and background color through the schema. Runs via npx with just an API key, no local dependencies. Useful when you're iterating on Open Graph cards, generating chart PNGs from data visualizations, or building dynamic badge images that need to live outside the conversation.

tools
2
auth
Secret needed
transport
STDIO
env vars
2
last updated
Jul 11, 2026

Tools

2 tools

Public tool metadata for what this MCP can expose to an agent.

render_html_to_imageReturns the image inline so your agent (or you, in chat) can see it immediately.

Returns the image inline so your agent (or you, in chat) can see it immediately.

No parameter schema in public metadata yet.

render_html_to_urlReturns a temporary hosted URL (24h TTL) when the image needs to live somewhere external.

Returns a temporary hosted URL (24h TTL) when the image needs to live somewhere external.

No parameter schema in public metadata yet.

Sponsors

Configuration

CODETOIMAGE_API_KEY*secret

API key from https://codetoimage.app/dashboard/keys (starts with cti_live_…). Sandbox tier is free.

CODETOIMAGE_API_URLdefault: https://api.codetoimage.app

Override the API base URL. Defaults to https://api.codetoimage.app.

Readme

@codetoimage/mcp-server

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.

What you get

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.

Install

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.

Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):


View the full README on GitHub

Details

Repository
github.com/beznazwiska/codetoimage-mcp-server
Website
codetoimage.app
Package
@codetoimage/mcp-server
Transport
STDIO
Auth
Required
Registry
MCP registry, active