recraft-mcp-server
This server gives AI assistants direct access to the Recraft image-generation API through Model Context Protocol, enabling image creation, editing, enhancement, style management, and asset pipelines.
Generate images from text prompts across all Recraft models and styles, with controls for size, colors, text layout, and negative prompts
Batch & themed asset creation — generate multiple assets, themed sets with visual consistency, sprite/icons at custom sizes, and style comparison grids
Edit existing images — image-to-image transformation, inpainting, background replacement/generation, outpainting (canvas expansion), and texture/region swapping
Enhance & convert — remove backgrounds, vectorize to SVG, crisp or creative upscaling, and content-aware region erasing
Explore & refine — open-ended image exploration, generate visually similar images, and enhance prompts for richer results
Manage styles — create custom styles from reference images, list, inspect, and delete them
Save & manage assets locally — generate, download, background-remove, and write images directly to files
Monitor costs & account — check remaining credits and see the credit cost reported for every call
🎨 Recraft MCP Server
A Model Context Protocol (MCP) server that gives AI assistants (Claude, Gemini, or any MCP client) direct access to the Recraft AI image generation API — generate, transform, upscale, and vectorize images without leaving your chat.
"Generate a set of 8 fantasy game icons in the same art style." "Remove the background from this screenshot and upscale it." "Create 5 style variations of this logo and put them in a comparison grid."
Coming from the official server?
Recraft archived @recraft-ai/mcp-recraft-server in July 2026 and now points
users at a hosted endpoint, https://mcp.recraft.ai/mcp. Which of the three you
want depends on what you are doing:
Recraft hosted | This server | |
Setup | OAuth in a browser, no API key | npm install + API key |
Tools | 9 | 28 |
Billing | Subscription credits | API units, and every tool reports what its call cost |
Local files | No — URLs and base64 only | Reads and writes files on your machine |
Batch / pipelines | No | Generate → download → background-remove → save, themed sets, comparison grids |
Style management | Create only | Create, list, inspect, delete |
If you only generate the occasional image, the hosted server is less work and this one has nothing to offer you. If you are producing assets in bulk, working from files already on disk, or need to know what a run costs before it runs, that is what this exists for.
Tool name mapping
The names are the old ones with a recraft_ prefix, except where noted:
Official (archived) | Here |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
One behavioural difference worth knowing: Recraft's style field takes six
broad families, and the specific look (pixel_art, kawaii, b_and_w…) is a
separate substyle field. Passing a substyle name as style is silently
ignored by the API. This server accepts either and routes it correctly, so
prompts written against the old servers keep working.
Related MCP server: Replicate Designer MCP
🌟 Key Features
🖼️ Text-to-image generation across all Recraft models (V4.1, V4 Styles, V4, V4 Vector/SVG, V4 Pro, V3, V2), with the full style taxonomy — 6 families × 104 substyles, generated from Recraft's own API spec rather than transcribed by hand
🔁 Image transformation — image-to-image, inpaint, background replace/generate, outpaint (canvas expansion), variations
✨ Enhancement — background removal, vectorization, crisp/creative upscale, region erase
🔎 Discovery — open-ended exploration generation, "more like this," and automatic prompt enhancement
🧩 Asset pipelines — one-call generate → download → background-remove → save, batch generation, themed asset sets with style consistency
🎮 Game-dev extras — sized generation for sprites/icons, style comparison grids, texture/atlas swapping
👁️ The agent can see what it made — generations come back with an inline preview alongside the URL, downscaled to fit a context budget. Without it a model can produce four variations and judge none of them
💰 Every call reports its price — Recraft states the credit cost of each operation and this passes it through, so an agent can tell a 4-credit crisp upscale from a 250-credit creative one before it runs a batch of them
🎨 Style management — create custom styles, then list, inspect and delete them
🛠️ Provided Tools
This MCP server exposes 28 tools to your AI agent — full coverage of the Recraft API.
Generation
Tool | Description |
| Text-to-image across all Recraft models, 70+ styles, color/text-layout control |
| Generate at any target size (down to 64×64) — ideal for sprites/icons/UI |
| Generate multiple assets in sequence with full pipeline, resilient to per-asset failure |
| A hero asset + matching style + all remaining symbols, generated with visual consistency |
| Same prompt across multiple styles, with an optional side-by-side comparison grid |
Discovery
Tool | Description |
| Generate a diverse set of images for open-ended exploration of a prompt |
| Generate more images visually similar to a previous |
| Expand a short prompt into a richer, more detailed one |
Transformation
Tool | Description |
| Transform an existing image from a text prompt (strength-adjustable) |
| Regenerate masked regions of an image |
| AI-generate a new background while keeping the subject |
| Fill masked background areas within the existing canvas |
| Expand the canvas beyond the image's original bounds with AI-generated content |
| Generate variations of an existing image |
| Replace a region with new AI content — built for Spine atlas / spritesheet swaps |
Enhancement
Tool | Description |
| Transparent-PNG background removal |
| Raster (PNG/JPG/WEBP) → SVG |
| Clean upscale for graphics, icons, illustrations |
| AI-detail upscale with face refinement for photos |
| Content-aware removal of a masked region |
Style management
Tool | What it does |
| Create a custom style from 1-5 reference images |
| List the custom styles on the account — free, reads only |
| Look up one style by id — free, reads only |
| Delete a style permanently |
| Recraft's built-in styles per model, live from the API |
Assets & account
Tool | Description |
| Build a custom, reusable style from 1–5 reference images |
| Full pipeline: generate → download → optional bg-removal → save to file |
| Save an image URL to a local file |
| Check account info and remaining API credits |
Previews and cost
Two behaviours worth knowing about, because they change what the agent can do.
Previews. Generation tools return a small inline image alongside the URL, so the model can actually look at the result — pick the best of four variations, notice that the background removal left a halo, see that the text came out garbled. Previews are downscaled until they fit a context budget (WebP, longest edge ≤768px, ≤700KB of base64) and capped at four per call, because an unbounded base64 blob costs more context than the image is worth.
Turn it off per call when the image is not being judged:
recraft_generate_image(prompt: "...", preview: false)Cost. Every Recraft response states the credit cost of the call it served, and every tool here passes it through:
Model: recraftv4 | Size: 1024x1024 | Substyle: kawaii | Cost: 40 creditsThis matters more than it sounds. A creative upscale costs 250 credits against
a crisp upscale's 4 — 62× — and a themed set of 12 symbols runs to roughly 600.
recraft_check_credits reads the balance, and the style-management tools are
free reads, so an agent can look before it spends.
⚙️ Quick Start
Requires Node.js 20.9.0 or newer. Version 1.1.0 upgrades the native image-processing dependencies to address known libvips vulnerabilities; Node.js 18 is no longer supported.
1. Get a Recraft API key
Sign up at recraft.ai and grab an API key from your account settings.
2. Install & configure
claude mcp add --scope user recraft \
-e RECRAFT_API_KEY=your-api-key-here \
-- npx -y recraft-mcp-serverOr add it manually to your MCP client config:
{
"mcpServers": {
"recraft": {
"command": "npx",
"args": ["-y", "recraft-mcp-server"],
"env": {
"RECRAFT_API_KEY": "your-api-key-here"
}
}
}
}Environment Variables
Variable | Description |
| Your Recraft AI API key |
Docker
docker build -t recraft-mcp-server .
docker run -i --rm -e RECRAFT_API_KEY=your-key recraft-mcp-serverIn an MCP client config:
{
"mcpServers": {
"recraft": {
"command": "docker",
"args": ["run", "-i", "--rm", "-e", "RECRAFT_API_KEY", "recraft-mcp-server"],
"env": { "RECRAFT_API_KEY": "your-key" }
}
}
}The container talks MCP over stdio and never opens a port, so -i is
required and -p is not. It runs as an unprivileged user; tools that write
files need the target directory bind-mounted (-v /path:/path).
🤖 Example AI Prompts
Game asset pipeline:
"Generate a themed set of 6 fantasy potion icons in the same style, then export a Pixi.js manifest." →
recraft_generate_themed_set
Quick sprite generation:
"Generate a 64x64 pixel-art coin icon." →
recraft_generate_sized
Style exploration:
"Show me this logo prompt in 4 different styles side by side." →
recraft_compare_styles
Photo cleanup:
"Remove the background from this photo and upscale it for print." →
recraft_remove_background→recraft_creative_upscale
Asset swapping:
"Swap the texture in this region of the spritesheet with a new design." →
recraft_texture_swap
Canvas expansion:
"Widen this image to a 16:9 banner without cropping the subject." →
recraft_outpaint
Open-ended exploration:
"Explore some ideas for a race car on a track, then give me more like the third one." →
recraft_explore→recraft_explore_similar
Prompt polishing:
"Enhance this rough prompt before generating: 'red panda with a sign.'" →
recraft_enhance_prompt
Development
git clone https://github.com/muhammetali/recraft-mcp-server.git
cd recraft-mcp-server
npm install
npm run build
npm test
npm run audit:security
npm run verifyVersion 1.2.0 uses the official modular MCP SDK v2 while preserving all 24 tools. See security policy and dependency review for release checks, dependency decisions, and necessary runtime capabilities.
📄 License
MIT — see LICENSE.
Available Tools
24 toolsrecraft_batch_generateA
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.
Inputs: assets (required).
recraft_check_creditsA
Check your Recraft account info and remaining API credits
Inputs: no named parameters.
recraft_compare_stylesA
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.
Inputs: prompt (required), styles (required), output_dir (required), grid, +3 more.
recraft_create_styleA
Create a custom style from 1-5 reference images. Returns a style_id for use in generation tools. V3/V3 Vector only.
Inputs: file_paths (required), style_base (required).
recraft_creative_upscaleA
Upscale an image with AI-generated detail enhancement and face refinement. Best for photos and realistic images.
Inputs: file_path (required), response_format.
recraft_crisp_upscaleA
Upscale an image with sharp, clean enhancement. Best for graphics, icons, illustrations.
Inputs: file_path (required), response_format.
recraft_download_imageA
Download an image from a URL and save it to a local file. Useful for saving generated images.
Inputs: url (required), output_path (required).
recraft_enhance_promptA
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.
Inputs: prompt (required).
recraft_erase_regionB
Content-aware removal of a region in an image using a mask. White mask areas are erased and filled naturally.
Inputs: file_path (required), mask_path (required), response_format.
recraft_exploreA
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.
Inputs: prompt (required), size, model, controls, +1 more.
recraft_explore_similarA
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).
Inputs: similarity (required), source_image_id (required), response_format.
recraft_generate_assetA
Full asset pipeline: generate image → download → optionally remove background → save to file. Perfect for game assets, icons, and UI elements.
Inputs: prompt (required), output_path (required), size, model, +3 more.
recraft_generate_backgroundA
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.
Inputs: prompt (required), file_path (required), mask_path (required), n, +7 more.
recraft_generate_imageA
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.
Inputs: prompt (required), n, size, model, +6 more.
recraft_generate_sizedA
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.
Inputs: width (required), height (required), prompt (required), output_path (required), +6 more.
recraft_generate_themed_setA
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.
Inputs: theme (required), symbols (required), output_dir (required), prompt_suffix (required), +5 more.
recraft_image_to_imageB
Transform an existing image with a text prompt. Adjustable strength controls how much the original is preserved. V3/V3 Vector models only.
Inputs: prompt (required), file_path (required), n, model, +7 more.
recraft_inpaintA
Edit specific regions of an image using a mask. White mask areas are regenerated, black areas are preserved. V3/V3 Vector only.
Inputs: prompt (required), file_path (required), mask_path (required), n, +7 more.
recraft_outpaintA
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.
Inputs: prompt (required), file_path (required), n, size, +12 more.
recraft_remove_backgroundA
Remove the background from an image, producing a transparent PNG.
Inputs: file_path (required), response_format.
recraft_replace_backgroundA
Replace the background of an image with AI-generated content. Keeps the subject, changes the scene. V3/V3 Vector only.
Inputs: prompt (required), file_path (required), n, model, +6 more.
recraft_texture_swapA
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.
Inputs: prompt (required), region (required), image_path (required), output_path (required), +5 more.
recraft_variate_imageC
Generate variations of an existing image. Produces similar but different versions.
Inputs: size (required), file_path (required), n, random_seed, +2 more.
recraft_vectorizeA
Convert a raster image (PNG/JPG/WEBP) to SVG vector format.
Inputs: file_path (required), response_format.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 24 tools
Most tools fall into clearly distinguishable categories such as generation, background editing, upscaling, and vectorization, but several close-purpose tools overlap, including inpaint/erase_region/texture_swap and image_to_image/variate_image/explore_similar. The descriptions help, but an agent would need to read carefully to avoid selecting the wrong editing tool.
All tools share the recraft_ prefix and use snake_case, which keeps things readable, but the underlying pattern is mixed: many are verb_noun (generate_image, remove_background), while others are single verbs (inpaint, vectorize), reversed noun_verb (texture_swap), or adverb/adjective_verb (batch_generate, creative_upscale). This is not chaotic, but it lacks a single predictable convention.
24 tools is at the heavy end of a reasonable range and approaches the threshold where the surface becomes hard to navigate. The breadth is somewhat justified by the wide scope of image generation, editing, background replacement, upscaling, asset pipelines, and style exploration, but several tools could potentially be consolidated.
The server covers the core lifecycle of image creation and manipulation: generating, editing, inpainting/outpainting, background changes, upscaling, vectorizing, style creation, comparison, and batch asset generation. Minor gaps exist, such as no listing or deletion of custom styles and no image metadata retrieval, but these do not block typical agent workflows.
Maintenance
Related MCP Connectors
MCP server for Qwen Image 3 AI image generation
Generate AI images, video, music, and sound effects, and upscale them, from any MCP client.
MCP server for Midjourney AI image generation and editing
MCP server for Flux AI image generation
Related MCP Servers
AlicenseAqualityFmaintenanceAn MCP server that integrates with Recraft AI to enable generation and manipulation of high-quality raster and vector images through tools like image generation, editing, vectorization, background removal, and upscaling.9305 npm60MIT- AlicenseBqualityDmaintenanceAn MCP server that enables image generation using Replicate's Flux 1.1 Pro model. It provides a tool for creating visuals from text prompts with customizable settings for aspect ratio, output format, and quality.1MIT
- AlicenseAqualityDmaintenanceAn MCP server that provides AI image generation and editing capabilities using Google's Gemini 2.5 Flash Image API. It allows users to create new images from text, modify existing files, and perform iterative edits through natural language prompts.6MIT
- AlicenseAqualityCmaintenanceMCP server for AI image generation, transformation, and style management via the Recraft API. Provides tools for text-to-image, image-to-image, inpainting, background operations, vectorization, upscaling, and custom style creation.1636 npm12MIT