codetoimage-mcp-server
v0.2.0Pixel-perfect HTML/CSS to PNG/JPG/WebP for AI agents — inline image or 24h hosted URL.
Values you need
| Variable | What it is | |
|---|---|---|
CODETOIMAGE_API_KEY | required secret | API key from https://codetoimage.app/dashboard/keys (starts with cti_live_…). Sandbox tier is free. |
CODETOIMAGE_API_URL | optional | Override the API base URL. Defaults to https://api.codetoimage.app. Default: https://api.codetoimage.app |
npm (npx) discovery passed
Requires Node.js 18+
Run in a terminal
claude mcp add codetoimage-mcp-server -e 'CODETOIMAGE_API_KEY=<CODETOIMAGE_API_KEY>' -- npx -y --package=@codetoimage/mcp-server@0.2.0 codetoimage-mcpAdd to
claude_desktop_config.json{
"mcpServers": {
"codetoimage-mcp-server": {
"args": [
"-y",
"--package=@codetoimage/mcp-server@0.2.0",
"codetoimage-mcp"
],
"command": "npx",
"env": {
"CODETOIMAGE_API_KEY": "<CODETOIMAGE_API_KEY>"
}
}
}
}Add to
~/.cursor/mcp.json{
"mcpServers": {
"codetoimage-mcp-server": {
"args": [
"-y",
"--package=@codetoimage/mcp-server@0.2.0",
"codetoimage-mcp"
],
"command": "npx",
"env": {
"CODETOIMAGE_API_KEY": "<CODETOIMAGE_API_KEY>"
}
}
}
}Add to
.vscode/mcp.json{
"inputs": [
{
"description": "CODETOIMAGE_API_KEY",
"id": "codetoimage-api-key",
"password": true,
"type": "promptString"
}
],
"servers": {
"codetoimage-mcp-server": {
"args": [
"-y",
"--package=@codetoimage/mcp-server@0.2.0",
"codetoimage-mcp"
],
"command": "npx",
"env": {
"CODETOIMAGE_API_KEY": "${input:codetoimage-api-key}"
},
"type": "stdio"
}
}
}Add to
~/.codex/config.toml[mcp_servers.codetoimage-mcp-server]
command = "npx"
args = ["-y", "--package=@codetoimage/mcp-server@0.2.0", "codetoimage-mcp"]
env = { "CODETOIMAGE_API_KEY" = "<CODETOIMAGE_API_KEY>" }For AI agents
- Ask the user for: CODETOIMAGE_API_KEY. Never invent or guess these values; secrets go into the client config, not into chat logs.
- Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
- Restart or reload the client so it starts the server.
- Verify: the server should expose these tools: render_html_to_image, render_html_to_url.
- If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.
Machine-readable: install.md · manifest.json