io.github.muhammetali/recraft-mcp-server
Recraft AI Image Generation MCP Server for AI coding agents
Open source Open in the app JSON README (API)
About
Recraft AI Image Generation MCP Server for AI coding agents
Details
- Kind
- MCP servers
- Topic
- AI, RAG & memory
- Publisher
- muhammetali
- Origin
- official
- Category
- ferramentas
- Transport
- local
- Version
- 1.0.0
- Last push
- 2026-09-03T18:22:09Z
- Repository state
- ativo
- Language
- TypeScript
- License
- MIT
- Added
- 2026-09-03 19:00:52
- Updated
- 2026-09-03 19:00:52
- Origin id
io.github.muhammetali/recraft-mcp-server
README
# ๐จ Recraft MCP Server
[](https://npmjs.org/package/recraft-mcp-server)
[](https://opensource.org/licenses/MIT)
[](https://modelcontextprotocol.io/)
A [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server that gives AI assistants
(Claude, Gemini, or any MCP client) direct access to the [Recraft AI](https://www.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."
## ๐ Key Features
- ๐ผ๏ธ **Text-to-image generation** across all Recraft models (V4.1, V4 Styles, V4, V4 Vector/SVG, V4 Pro, V3, V2), 70+ styles
- ๐ **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
## ๐ ๏ธ Provided Tools
This MCP server exposes 24 tools to your AI agent โ full coverage of the Recraft API.
### Generation
| Tool | Description |
|---|---|
| `recraft_generate_image` | Text-to-image across all Recraft models, 70+ styles, color/text-layout control |
| `recraft_generate_sized` | Generate at any target size (down to 64ร64) โ ideal for sprites/icons/UI |
| `recraft_batch_generate` | Generate multiple assets in sequence with full pipeline, resilient to per-asset failure |
| `recraft_generate_themed_set` | A hero asset + matching style + all remaining symbols, generated with visual consistency |
| `recraft_compare_styles` | Same prompt across multiple styles, with an optional side-by-side comparison grid |
### Discovery
| Tool | Description |
|---|---|
| `recraft_explore` | Generate a diverse set of images for open-ended exploration of a prompt |
| `recraft_explore_similar` | Generate more images visually similar to a previous `recraft_explore` result |
| `recraft_enhance_prompt` | Expand a short prompt into a richer, more detailed one |
### Transformation
| Tool | Description |
|---|---|
| `recraft_image_to_image` | Transform an existing image from a text prompt (strength-adjustable) |
| `recraft_inpaint` | Regenerate masked regions of an image |
| `recraft_replace_background` | AI-generate a new background while keeping the subject |
| `recraft_generate_background` | Fill masked background areas within the existing canvas |
| `recraft_outpaint` | Expand the canvas beyond the image's original bounds with AI-generated content |
| `recraft_variate_image` | Generate variations of an existing image |
| `recraft_texture_swap` | Replace a region with new AI content โ built for Spine atlas / spritesheet swaps |
### Enhancement
| Tool | Description |
|---|---|
| `recraft_remove_background` | Transparent-PNG background removal |
| `recraft_vectorize` | Raster (PNG/JPG/WEBP) โ SVG |
| `recraft_crisp_upscale` | Clean upscale for graphics, icons, illustrations |
| `recraft_creative_upscale` | AI-detail upscale with face refinement for photos |
| `recraft_erase_region` | Content-aware removal of a masked region |
### Styles, assets & account
| Tool | Description |
|---|---|
| `recraft_create_style` | Build a custom, reusable style from 1โ5 reference images |
| `recraft_generate_asset` | Full pipeline: generate โ download โ optional bg-removal โ save to file |
| `recraft_download_image` | Save an image URL to a local file |
| `recraft_check_credits` | Check account info and remaining API credits |
## โ๏ธ Quick Start
### 1. Get a Recraft API key
Sign up at [recraft.ai](https://www.recraft.ai/) and grab an API key from your account settings.
### 2. Install & configure
```bash
claude mcp add --scope user recraft \
-e RECRAFT_API_KEY=your-api-key-here \
-- npx -y recraft-mcp-server
```
Or add it manually to your MCP client config:
```json
{
"mcpServers": {
"recraft": {
"command": "npx",
"args": ["-y", "recraft-mcp-server"],
"env": {
"RECRAFT_API_KEY": "your-api-key-here"
}
}
}
}
```
### Environment Variables
| Variable | Description |
|----------|-------------|
| `RECRAFT_API_KEY` | Your Recraft AI API key |
## ๐ค 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
```bash
git clone https://github.com/muhammetali/recraft-mcp-server.git
cd recraft-mcp-server
npm install
npm run build
npm test
```
## ๐ License
MIT โ see [LICENSE](LICENSE).