MCP Server
Use RendShot with Claude, Cursor, VS Code, and other AI assistants via MCP.
MCP (Model Context Protocol) lets AI assistants use RendShot tools directly. Generate images and capture screenshots from natural language prompts.
Client Setup
Claude Desktop
Add the following to your Claude Desktop MCP configuration file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"rendshot": {
"command": "npx",
"args": ["-y", "@rendshot/mcp"],
"env": {
"RENDSHOT_API_KEY": "rs_live_YOUR_KEY"
}
}
}
}Restart Claude Desktop after saving the configuration.
Claude Code
Register the MCP server with your API key:
claude mcp add rendshot -e RENDSHOT_API_KEY=rs_live_YOUR_KEY -- npx -y @rendshot/mcpCursor
Add to your project-level .cursor/mcp.json or global ~/.cursor/mcp.json:
{
"mcpServers": {
"rendshot": {
"command": "npx",
"args": ["-y", "@rendshot/mcp"],
"env": {
"RENDSHOT_API_KEY": "rs_live_YOUR_KEY"
}
}
}
}Windsurf
Edit ~/.codeium/windsurf/mcp_config.json or open Windsurf Settings > MCP:
{
"mcpServers": {
"rendshot": {
"command": "npx",
"args": ["-y", "@rendshot/mcp"],
"env": {
"RENDSHOT_API_KEY": "rs_live_YOUR_KEY"
}
}
}
}VS Code
Create a .vscode/mcp.json file in your project root:
{
"servers": {
"rendshot": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@rendshot/mcp"],
"env": {
"RENDSHOT_API_KEY": "rs_live_YOUR_KEY"
}
}
}
}Or install via command line:
code --add-mcp '{"name":"rendshot","command":"npx","args":["-y","@rendshot/mcp"],"env":{"RENDSHOT_API_KEY":"rs_live_YOUR_KEY"}}'Cline
Open Cline Settings > MCP Servers > Edit Config in VS Code and add:
{
"mcpServers": {
"rendshot": {
"command": "npx",
"args": ["-y", "@rendshot/mcp"],
"env": {
"RENDSHOT_API_KEY": "rs_live_YOUR_KEY"
}
}
}
}Environment Variables
| Variable | Required | Description |
|---|---|---|
RENDSHOT_API_KEY | Yes | Your RendShot API key |
RENDSHOT_API_URL | No | API base URL. Defaults to https://api.rendshot.ai |
Available Tools
generate_image
Render HTML/CSS, a template, or an AI-generated design from a natural language prompt. Provide one of html, template_id, or prompt. prompt + template_id is allowed as a visual style reference. prompt + html is not allowed.
| Parameter | Type | Required | Description |
|---|---|---|---|
html | string | Yes* | HTML content to render |
template_id | string | Yes* | Template ID (e.g. tpl_abc123) |
prompt | string | Yes* | Natural language prompt for AI to generate a template from scratch |
platform | string | No | Preset (xiaohongshu, instagram_post, twitter_card, …) — influences AI layout style when using prompt |
locale | 'zh' | 'en' | No | Language of AI-generated text (default zh) |
variables | object | No | Template variables as key-value pairs (when using template_id without prompt) |
css | string | No | Additional CSS |
width | number | No | Viewport width (default 1080) |
height | number | No | Viewport height (default 1080) |
format | 'png' | 'jpg' | No | Output format |
quality | number | No | Image quality (1--100) |
deviceScale | 1 | 2 | 3 | No | Device pixel ratio |
fonts | string[] | No | Google Fonts to load |
timeout | number | No | Render timeout in ms |
* Provide exactly one of html, template_id, or prompt. prompt + template_id is also allowed (style reference).
When called with prompt, the tool response's structuredContent includes the AI-generated html and variables alongside the rendered image — feed those straight into create_template to save the design for reuse. See the AI Render guide for the full loop.
screenshot_url
Capture a screenshot of a public URL. Defaults to 1280 x 800.
| Parameter | Type | Required | Description |
|---|---|---|---|
url | string | Yes | URL to screenshot |
width | number | No | Viewport width (default 1280) |
height | number | No | Viewport height (default 800) |
format | 'png' | 'jpg' | No | Output format |
quality | number | No | Image quality (1--100) |
fullPage | boolean | No | Capture full scrollable page |
deviceScale | 1 | 2 | 3 | No | Device pixel ratio |
list_templates
Browse available image templates. Returns template IDs, names, dimensions, and variable definitions.
| Parameter | Type | Required | Description |
|---|---|---|---|
platform | string | No | Filter by platform (e.g. twitter) |
category | string | No | Filter by category |
q | string | No | Search by name or description |
limit | number | No | Max results, 1--50 (default 20) |
cursor | string | No | Pagination cursor |
get_template
Get detailed information about a template, including its variable definitions. Use this before generate_image to know which variables to pass.
| Parameter | Type | Required | Description |
|---|---|---|---|
template_id | string | Yes | Template ID (e.g. tpl_abc123) |
create_template
Save an HTML template for reuse. Typically used after generate_image returns an AI-generated template you want to keep. Templates are created as private drafts — publish them through the web dashboard if you want them in the public gallery.
Recommended workflow:
- Call
generate_imagewith apromptto get an AI-generated design. - If the assistant is happy with the result, call
create_templatewith the returnedhtmlandvariables. - Use the new
template_idin futuregenerate_imagecalls for faster, deterministic, cheaper renders.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Template name, 1--100 chars |
html | string | Yes | HTML with {{variable}} placeholders |
variables | array | Yes | Variable definitions — each has key, type, label, default, optional required, maxLength, min, max, options |
description | string | No | Human description |
platform | string | No | Platform preset |
category | string | No | Category |
tags | string[] | No | Up to 10 tags |
width | number | No | Width in pixels |
height | number | No | Height in pixels |
css | string | No | Extra CSS |
fonts | string[] | No | Custom fonts |
visibility | 'public' | 'private' | No | Defaults to 'private' |
Example Prompts
Once the MCP server is configured, ask your AI assistant directly:
- "Screenshot https://example.com at 1440 wide"
- "Render this HTML as a social card image"
- "Take a full-page screenshot of my staging site"
- "List available templates for Twitter"
- "Use the Social Card template with title 'Hello World'"
- "Generate a Xiaohongshu cover for a new coffee product, then save it as a template called 'Coffee Cover'"
- "Make me an OG image announcing the v2 launch, minimal dark style"
Next Steps
- JavaScript SDK -- Full SDK reference with all options
- Python SDK -- Official Python client
- CLI -- Use RendShot from the command line
- API Reference -- Full endpoint documentation