recraft-mcp-server
v1.0.0Recraft AI Image Generation MCP Server for AI coding agents
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
recraft_check_credits
Check your Recraft account info and remaining API credits
recraft_generate_image
Generate images from text prompt. Supports all Recraft models (V4, V4 Vector/SVG, V4 Pro, V3, V2), 70+ styles, color palette control, text layout, and multiple sizes. V4 Vector models produce SVG output.
| Parameter | Type | Description |
|---|---|---|
prompt * | string | Image description (max 10,000 chars for V4, 1,000 for V3/V2) |
controls | object | Generation controls |
model | string | Model: recraftv4_1, recraftv4_1_vector, recraftv4_1_pro, recraftv4_1_pro_vector, recraftv4_1_utility, recraftv4_1_utility_vector, recraftv4_1_utility_pro, recraftv4_1_utility_pro_vector, recraftv4, re… |
n | integer | Number of images to generate (1-6) |
negative_prompt | string | What to exclude from the image |
response_format | string | Response format |
size | string | Image size (e.g., 1024x1024, 1344x768) or ratio (e.g., 16:9, 1:1 for vector models) |
style | string | Style name (V3/V2 only). E.g., photorealism, illustration, vector_art, pixel_art, icon |
style_id | string | Custom style UUID (from recraft_create_style). Cannot combine with style. |
text_layout | array | Text placement on image |
recraft_image_to_image
Transform an existing image with a text prompt. Adjustable strength controls how much the original is preserved. V3/V3 Vector models only.
| Parameter | Type | Description |
|---|---|---|
file_path * | string | Local path to source image (PNG/JPG/WEBP, max 5MB) |
prompt * | string | How to transform the image |
controls | object | Generation controls |
model | string | Model (V3 only) |
n | integer | Number of images to generate (1-6) |
negative_prompt | string | What to exclude |
response_format | string | Response format |
strength | number | Transform strength: 0=keep original, 1=fully regenerate |
style | string | Style name (V3 only) |
style_id | string | Custom style UUID |
text_layout | array | Text placement on image |
recraft_inpaint
Edit specific regions of an image using a mask. White mask areas are regenerated, black areas are preserved. V3/V3 Vector only.
| Parameter | Type | Description |
|---|---|---|
file_path * | string | Local path to source image |
mask_path * | string | Local path to mask image (white=inpaint, black=preserve) |
prompt * | string | What to generate in the masked region |
controls | object | Generation controls |
model | string | Model (V3 only) |
n | integer | Number of images to generate (1-6) |
negative_prompt | string | What to exclude |
response_format | string | Response format |
style | string | Style name |
style_id | string | Custom style UUID |
text_layout | array | Text placement on image |
recraft_replace_background
Replace the background of an image with AI-generated content. Keeps the subject, changes the scene. V3/V3 Vector only.
| Parameter | Type | Description |
|---|---|---|
file_path * | string | Local path to source image |
prompt * | string | Description of the new background |
controls | object | Generation controls |
model | string | Model (V3 only) |
n | integer | Number of images to generate (1-6) |
negative_prompt | string | What to exclude |
response_format | string | Response format |
style | string | Style name |
style_id | string | Custom style UUID |
text_layout | array | Text placement on image |
recraft_generate_background
Fill masked background areas within an image's existing canvas (same size in, same size out). White mask = fill area, black = preserve. For expanding the canvas beyond the original image bounds, use recraft_outpaint instead. V3/V3 Vector only.
| Parameter | Type | Description |
|---|---|---|
file_path * | string | Local path to source image |
mask_path * | string | Local path to mask (white=fill, black=preserve) |
prompt * | string | Description of background to generate |
controls | object | Generation controls |
model | string | Model (V3 only) |
n | integer | Number of images to generate (1-6) |
negative_prompt | string | What to exclude |
response_format | string | Response format |
style | string | Style name |
style_id | string | Custom style UUID |
text_layout | array | Text placement on image |
recraft_variate_image
Generate variations of an existing image. Produces similar but different versions.
| Parameter | Type | Description |
|---|---|---|
file_path * | string | Local path to source image |
size * | string | Output size (WxH format, required) |
image_format | string | Output format |
n | integer | Number of images to generate (1-6) |
random_seed | integer | Random seed for reproducibility |
response_format | string | Response format |
recraft_remove_background
Remove the background from an image, producing a transparent PNG.
| Parameter | Type | Description |
|---|---|---|
file_path * | string | Local path to image (PNG/JPG/WEBP, max 5MB, 256-4096px) |
response_format | string | Response format |
recraft_vectorize
Convert a raster image (PNG/JPG/WEBP) to SVG vector format.
| Parameter | Type | Description |
|---|---|---|
file_path * | string | Local path to raster image |
response_format | string | Response format |
recraft_crisp_upscale
Upscale an image with sharp, clean enhancement. Best for graphics, icons, illustrations.
| Parameter | Type | Description |
|---|---|---|
file_path * | string | Local path to image (max 4MP, 32-4096px) |
response_format | string | Response format |
recraft_creative_upscale
Upscale an image with AI-generated detail enhancement and face refinement. Best for photos and realistic images.
| Parameter | Type | Description |
|---|---|---|
file_path * | string | Local path to image (max 16MP, 256-4096px) |
response_format | string | Response format |
recraft_erase_region
Content-aware removal of a region in an image using a mask. White mask areas are erased and filled naturally.
| Parameter | Type | Description |
|---|---|---|
file_path * | string | Local path to source image (max 4MP) |
mask_path * | string | Local path to mask (white=erase, black=preserve, same dimensions) |
response_format | string | Response format |
recraft_create_style
Create a custom style from 1-5 reference images. Returns a style_id for use in generation tools. V3/V3 Vector only.
| Parameter | Type | Description |
|---|---|---|
file_paths * | array | Array of local paths to reference images (1-5 images) |
style_base * | string | Base style type |
recraft_download_image
Download an image from a URL and save it to a local file. Useful for saving generated images.
| Parameter | Type | Description |
|---|---|---|
output_path * | string | Local file path to save the image |
url * | string | Image URL to download |
recraft_generate_asset
Full asset pipeline: generate image → download → optionally remove background → save to file. Perfect for game assets, icons, and UI elements.
| Parameter | Type | Description |
|---|---|---|
output_path * | string | Where to save the final image |
prompt * | string | Image description |
model | string | Model: recraftv4_1, recraftv4_1_vector, recraftv4_1_pro, recraftv4_1_pro_vector, recraftv4_1_utility, recraftv4_1_utility_vector, recraftv4_1_utility_pro, recraftv4_1_utility_pro_vector, recraftv4, re… |
negative_prompt | string | What to exclude |
remove_bg | boolean | Remove background after generation (default: true) |
size | string | Image size (e.g., 1024x1024, 1344x768) or ratio (e.g., 16:9, 1:1 for vector models) |
style | string | Style name (V3/V2 only) |
recraft_batch_generate
Generate multiple assets in sequence with full pipeline (generate → bg remove → save). Each asset failure does not stop others. Includes 300ms rate limit delay between assets.
| Parameter | Type | Description |
|---|---|---|
assets * | array | Array of assets to generate |
recraft_generate_themed_set
Generate a complete themed asset set for game design. Creates a hero asset, builds a custom style from it, then generates all remaining symbols with visual consistency. Optionally generates background and outputs a Pixi.js-compatible asset manifest.
| Parameter | Type | Description |
|---|---|---|
output_dir * | string | Base output directory (symbols/ and ui/ subdirs will be created) |
prompt_suffix * | string | Suffix appended to every symbol prompt for consistent style (e.g., ", ultra detailed 3D render, polished metallic surface, dramatic volumetric lighting from above, centered composition on pure black b… |
symbols * | array | Array of symbols to generate |
theme * | string | Theme name (e.g., "Egyptian", "Viking", "Space") |
bg_prompt | string | Background image prompt (if omitted, no background is generated) |
bg_size | string | Background image size (default: 1344x768 / 16:9) |
generate_manifest | boolean | Generate asset-manifest.json for Pixi.js integration |
remove_bg | boolean | Remove background from symbols (default: true) |
size | string | Image size (e.g., 1024x1024, 1344x768) or ratio (e.g., 16:9, 1:1 for vector models) |
recraft_generate_sized
Generate an image at any target size (including small sizes like 64x64, 128x128, 256x256). Generates at API-compatible size, then resizes with Lanczos3 downsampling. Perfect for game sprites, icons, and UI elements.
| Parameter | Type | Description |
|---|---|---|
height * | integer | Target height in pixels (e.g., 64, 128, 256) |
output_path * | string | Where to save the final image |
prompt * | string | Image description |
width * | integer | Target width in pixels (e.g., 64, 128, 256) |
fit | string | Resize strategy: contain (letterbox), cover (crop to fill), fill (stretch) |
model | string | Model: recraftv4_1, recraftv4_1_vector, recraftv4_1_pro, recraftv4_1_pro_vector, recraftv4_1_utility, recraftv4_1_utility_vector, recraftv4_1_utility_pro, recraftv4_1_utility_pro_vector, recraftv4, re… |
negative_prompt | string | What to exclude |
remove_bg | boolean | Remove background before resize (default: false) |
style | string | Style name (V3/V2 only) |
style_id | string | Custom style UUID |
recraft_compare_styles
Generate the same prompt in multiple styles for side-by-side comparison. Creates individual images and an optional comparison grid. Great for choosing the best style for your project.
| Parameter | Type | Description |
|---|---|---|
output_dir * | string | Directory to save comparison images |
prompt * | string | Image description to test across styles |
styles * | array | Array of style names to compare (e.g., ["digital_illustration", "pixel_art", "vector_art"]) |
grid | boolean | Generate a comparison grid image (default: true) |
grid_columns | integer | Number of columns in grid (default: 3) |
model | string | Model to use (V3 recommended for style support) |
size | string | Image size (e.g., 1024x1024, 1344x768) or ratio (e.g., 16:9, 1:1 for vector models) |
recraft_texture_swap
Replace a specific region of an image with AI-generated content. Generates new content matching the region aspect ratio, resizes it, and composites it onto the original. Perfect for Spine atlas texture swaps and spritesheet updates.
| Parameter | Type | Description |
|---|---|---|
image_path * | string | Local path to source image (PNG/JPG/WEBP) |
output_path * | string | Where to save the result |
prompt * | string | Description of replacement content |
region * | object | Rectangle region to replace {x, y, width, height} |
feather | integer | Edge feather in pixels for smooth blending (0=hard edge, default: 0) |
model | string | Model: recraftv4_1, recraftv4_1_vector, recraftv4_1_pro, recraftv4_1_pro_vector, recraftv4_1_utility, recraftv4_1_utility_vector, recraftv4_1_utility_pro, recraftv4_1_utility_pro_vector, recraftv4, re… |
negative_prompt | string | What to exclude |
style | string | Style name (V3/V2 only) |
style_id | string | Custom style UUID |
recraft_outpaint
Extend an image beyond its original boundaries with AI-generated content (canvas expansion). Different from recraft_generate_background, which only fills masked areas within the existing canvas. Specify a target size, per-side expand amounts, and/or a zoom-out percentage. V3/V3 Vector only.
| Parameter | Type | Description |
|---|---|---|
file_path * | string | Local path to source image |
prompt * | string | Description of the content to generate in the extended area |
controls | object | Generation controls |
expand_bottom | integer | Pixels to add to the bottom. Cannot combine with size. |
expand_left | integer | Pixels to add to the left. Cannot combine with size. |
expand_right | integer | Pixels to add to the right. Cannot combine with size. |
expand_top | integer | Pixels to add to the top. Cannot combine with size. |
model | string | Model (V3 only): recraftv3, recraftv3_vector |
n | integer | Number of images to generate (1-6) |
negative_prompt | string | What to exclude |
response_format | string | Response format |
size | string | Target size for the resulting image — the source image is placed inside it. Cannot combine with expand_*. |
style | string | Style name |
style_id | string | Custom style UUID |
text_layout | array | Text placement on image |
zoom_out_percentage | number | Scales the source image down by this percentage before outpainting, revealing more surrounding context [0-100). Can combine with size or expand_*. |
recraft_explore
Generate a set of images for visual exploration and discovery — diverse results from a prompt, no fine-grained style/color control. Returns image IDs usable with recraft_explore_similar.
| Parameter | Type | Description |
|---|---|---|
prompt * | string | Image description |
controls | object | Generation controls |
model | string | Model: recraftv4_1, recraftv4_1_vector, recraftv4_1_pro, recraftv4_1_pro_vector, recraftv4, recraftv4_vector, recraftv4_pro, recraftv4_pro_vector |
response_format | string | Response format |
size | string | Image size or ratio |
recraft_explore_similar
Generate images visually similar to a source image previously created with recraft_explore. similarity controls how closely results resemble the source (1=slightly, 5=extremely similar).
| Parameter | Type | Description |
|---|---|---|
similarity * | integer | How closely to match the source image (1-5) |
source_image_id * | string | Image ID from a previous recraft_explore result |
response_format | string | Response format |
recraft_enhance_prompt
Expand a short prompt into a richer, more detailed description with added visual context, style cues, and composition details. Use the result with any generation tool for more vivid output.
| Parameter | Type | Description |
|---|---|---|
prompt * | string | The original prompt to enhance (max 2000 chars) |