home / mcp / recraft mcp server

Recraft MCP Server

Provides MCP-based access to Recraft.ai image generation and transformation services via HTTP and local runtime.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "bartwaardenburg-recraft-mcp-server": {
      "url": "https://external.api.recraft.ai",
      "headers": {
        "RECRAFT_API_KEY": "YOUR_API_KEY",
        "RECRAFT_API_URL": "https://external.api.recraft.ai"
      }
    }
  }
}

You can run a Recraft MCP Server to connect your LLM assistants with Recraft.aiโ€™s image generation services. This server exposes MCP tools that let you generate, transform, and upscale images through MCP-enabled clients, giving you a practical, scalable way to incorporate AI-powered imagery into your workflows.

How to use

Use an MCP client to send tool requests to the Recraft MCP Server. You can generate new images from text prompts, modify existing images, and apply upscale or style transformations. The server responds with generated outputs or status updates, allowing you to chain tools for complex image creation tasks.

How to install

Prerequisites you need before installing are Node.js v18 or later and a Recraft API key.

Install steps in sequence:

git clone https://github.com/yourusername/recraft-mcp-server.git
cd recraft-mcp-server
npm install
cp .env.example .env
# Edit .env and add your Recraft API key
```}]}]},{

Build and run the server with the following commands. You can choose the standard start or the provided startup script.

npm run build
npm start
# Or use the provided startup script
./start-mcp.sh
```} ]},{

Development and inspection options allow you to test the MCP integration and run type checks. Use the following commands to develop and validate your setup.

npm run dev
npm run inspect
```} ]},{

Testing and quality checks help ensure reliability. Use these commands to run tests and coverage as part of your development workflow.

npm test
npm run test:coverage
npm run test:watch
```} ]},{

Validation relies on Zod for schema validation. See the schema implementation notes for how inputs are validated and how errors are surfaced to clients.

Additional notes

You can interact with a set of MCP tools that perform a range of image-related tasks. The available tools include image generation, image-to-image transformations, inpainting, background manipulation, vectorization, upscaling, style creation, user information retrieval, and saving results to disk.

Key environment variables youโ€™ll configure are the Recraft API URL and API key. They govern how the server authenticates with Recraft and where requests are sent.

Available tools

generate_image

Generate images from text prompts using Recraft's image generation service.

image_to_image

Transform an existing image based on a new text prompt to apply changes or styling.

inpaint_image

Edit parts of an image using a mask to specify areas for inpainting.

replace_background

Replace the background of an image with a new background or style.

vectorize_image

Convert raster images to vector formats for scalable edits.

remove_background

Remove the background from an image, isolating the main subject.

crisp_upscale

Upscale images with enhanced detail and clarity.

creative_upscale

Upscale images with creative enhancements and effects.

create_style

Create a new style based on reference images for consistent outputs.

get_user_info

Retrieve information about the current user session or account.

save_image_to_disk

Save generated images to the local filesystem.

help

Provide general information about the available tools in a helper context.