Mcp Recraft Server

by recraft-ai

61 stars
313 downloads
Not rated
GitHub

About

Generate and edit raster/vector images, vectorize, remove/replace backgrounds, and upscale using the Recraft AI API.

Details

Author
recraft-ai
GitHub stars
61
Downloads
313
Categories
Developer Tools, Design, Other

- Generates raster and vector images from text prompts
- Creates custom styles from a set of images
- Vectorizes raster images
- Edits images via image-to-image with prompt control
- Removes or replaces image backgrounds
- Upscales images with crisp or creative mode
- Reports user info and remaining credit balance

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Mcp Recraft Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Obtain a Recraft API key from your Recraft profile API page. Install via Claude Desktop Extensions (download the .dxt file and double‑click), via Smithery (remote storage only), or manually by editing claude_desktop_config.json with npx or a built source. Configure the environment variables RECRAFT_API_KEY (mandatory), IMAGE_STORAGE_DIRECTORY (optional, defaults to $HOME_DIR/.mcp-recraft-server), and RECRAFT_REMOTE_RESULTS_STORAGE (set to "1" for remote storage).

generate_image

Generate an image using Recraft from a text prompt. You can specify the image size, style, model, and number of images to generate. You don't need to change default parameters if you don't have any specific requirements. You can use styles to refine the image generation, and also to generate raster or vector images. Local paths or URLs to generated images and their previews will be returned in the response.

create_style

Create a style in Recraft from the set of style reference images. A style is extracted from the provided images and can be used in image generation tools. ID of the created style will be returned in the response.

vectorize_image

Vectorize an input image using Recraft. This operation takes an input image and returns a vector SVG image, close to it. Local path or URL to resulting image and its preview will be returned in the response.

image_to_image

Generate an image using Recraft from an input image and a text prompt. You can specify the reference input image, style, model, and number of images to generate. You should provide the same style/substyle/styleID settings as were used for input image generation (if exists) if there are no specific requirements to change the style. Other parameters are recommended to keep default if you don't have any specific requirements on them. You can use styles to refine the image generation, and also to generate raster or vector images. Local paths or URLs to generated images and their previews will be returned in the response.

remove_background

Remove background in the input image using Recraft. This operation takes an input image and returns the same image with detected background removed. Raster image will be always returned. Local path or URL to resulting image and its preview will be returned in the response.

replace_background

Generate an image using Recraft from an input image with its detected background replaced based on the prompt. You can specify the input image, style, model, and number of images to generate. You should provide the same style/substyle/styleID settings as were used for input image generation (if exists) if there are no specific requirements to change the style. Other parameters are recommended to keep default if you don't have any specific requirements on them. You can use styles to refine the image background generation, and also to generate raster or vector images. Local paths or URLs to generated images and their previews will be returned in the response.

crisp_upscale

Crisp upscale of the input image using Recraft. This operation takes an input image and returns an upscaled image, making the image sharper and cleaner. This version of upscale is much cheaper and faster than creative upscale. Local path or URL to resulting image and its preview will be returned in the response.

creative_upscale

Creative upscale of the input image using Recraft. This operation takes an input image and returns an upscaled image, boosting resolution with a focus on refining small details and faces. This version of upscale is expensive and slower than crisp upscale. Local path or URL to resulting image and its preview will be returned in the response.

get_user

Get information about the current Recraft API user (their email, name, and credit balance).

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "mcp recraft server": {
            "recraft": {
                "command": "npx",
                "args": [
                    "-y",
                    "@recraft-ai/mcp-recraft-server@latest"
                ],
                "env": {
                    "RECRAFT_API_KEY": "<YOUR_RECRAFT_API_KEY>",
                    "IMAGE_STORAGE_DIRECTORY": "<YOUR_IMAGE_STORAGE_DIRECTORY>",
                    "RECRAFT_REMOTE_RESULTS_STORAGE": "<YOUR_REMOTE_RESULTS_STORAGE_INDICATOR>"
                }
            }
        }
    }
}

McpServers

{
    "recraft": {
        "command": "npx",
        "args": [
            "-y",
            "@recraft-ai/mcp-recraft-server@latest"
        ],
        "env": {
            "RECRAFT_API_KEY": "<YOUR_RECRAFT_API_KEY>",
            "IMAGE_STORAGE_DIRECTORY": "<YOUR_IMAGE_STORAGE_DIRECTORY>",
            "RECRAFT_REMOTE_RESULTS_STORAGE": "<YOUR_REMOTE_RESULTS_STORAGE_INDICATOR>"
        }
    }
}

<div align="center">
<h1>

<br/>Recraft MCP Server
</h1>


npm version
npm downloads
<a href="https://smithery.ai/server/@recraft-ai/mcp-recraft-server">
smithery badge
</a>
</div>

This is an MCP (Model Context Protocol) server integrating MCP clients with Recraft's raster- and vector-image operations:

- raster and vector image generation
- raster and vector image editing
- creating custom styles and generating images in them
- vectorization of raster images
- background removal and replacement
- upscaling of raster images

By connecting this MCP server to your MCP client you will be able to generate high-quality raster and vector images using Recraft, combining different tools.

Table of Contents

- Table of Contents
- Setup
- Prerequisites
- Claude Desktop Extensions
- Smithery
- Manual Setup
- From NPM
- From source
- Tools

Setup

Prerequisites

- First of all, you will need a Recraft API key. To obtain it, register your account on Recraft; then go to your profile API page. Here you can buy API units (credits) and generate an API key.

- You will need to have an MCP client installed, for example Claude Desktop.

Claude Desktop Extensions

If you are using Claude Desktop you can set up this server using Claude Desktop Extensions.

- Download mcp-recraft-server.dxt from the latest release
- Double-click the file to open it with Claude Desktop
- Click Install
- Fill out the form
- Enable the server

In the form you need to paste your Recraft API key obtained on your profile API page. You can also specify a local path for generated image storage or indicate that all results should be stored remotely.

In case of installation issues, check that you have the latest version of Claude Desktop.

Smithery

You can find this MCP server on Smithery. If this MCP is installed from Smithery, all generation results will be stored remotely. Use Desktop Extensions or Manual Setup to store generation results on your local device.

Manual Setup

You're going to need Node running on your machine so you can run npx or node commands in your terminal. If you don't have Node, you can install it from nodejs.org.

From NPM

Modify your claude_desktop_config.json file to add the following:

{
  "mcpServers": {
    "recraft": {
      "command": "npx",
      "args": [
        "-y",
        "@recraft-ai/mcp-recraft-server@latest"
      ],
      "env": {
        "RECRAFT_API_KEY": "<YOUR_RECRAFT_API_KEY>",
        "IMAGE_STORAGE_DIRECTORY": "<YOUR_IMAGE_STORAGE_DIRECTORY>",
        "RECRAFT_REMOTE_RESULTS_STORAGE": "<YOUR_REMOTE_RESULTS_STORAGE_INDICATOR>"
      }
    }
  }
}

From source

Clone this repository:

git clone https://github.com/recraft-ai/mcp-recraft-server.git

In the directory with cloned repository run:

npm install
npm run build

Modify your claude_desktop_config.json file to add the following:

{
  "mcpServers": {
    "recraft": {
      "command": "node",
      "args": ["<ABSOLUTE_PATH_TO_CLONED_DIRECTORY>/dist/index.js"],
      "env": {
        "RECRAFT_API_KEY": "<YOUR_RECRAFT_API_KEY>",
        "IMAGE_STORAGE_DIRECTORY": "<YOUR_IMAGE_STORAGE_DIRECTORY>",
        "RECRAFT_REMOTE_RESULTS_STORAGE": "<YOUR_REMOTE_RESULTS_STORAGE_INDICATOR>"
      }
    }
  }
}

You can specify these parameters:

- RECRAFT_API_KEY: mandatory parameter, your Recraft API key.
- IMAGE_STORAGE_DIRECTORY: optional parameter, you can specify the directory in which all generated images will be stored. By default this directory is $HOME_DIR/.mcp-recraft-server. If RECRAFT_REMOTE_RESULTS_STORAGE="1", the value of this parameter is ignored.
- RECRAFT_REMOTE_RESULTS_STORAGE: optional parameter, you can set the value to "1", in this case all generated images will be stored remotely and their URLs will be returned. Also, IMAGE_STORAGE_DIRECTORY will be ignored in this case.

Tools

In this MCP you can use the following tools:

| Tool Name | Description | Parameters | Price |
|-----------|-------------|------------|-------|
| generate_image | Generates raster/vector images from prompt | - prompt <br/> - style <br/> - size <br/> - model <br/> - number of images | \$0.04/\$0.08 per raster/vector image |
| create_style | Creates a style from the list of images | - list of images <br/> - basic style | \$0.04 |
| vectorize_image | Vectorizes raster image | - image | \$0.01 |
| image_to_image | Generates raster/vector images from image and prompt | - image <br/> - prompt <br/> - similarity strength <br/> - style <br/> - size <br/> - model <br/> - number of images | \$0.04/\$0.08 per raster/vector image |
| remove_background | Removes background in image | - image | \$0.01 |
| replace_background | Generates new background in image from prompt | - image <br/> - prompt for background <br/> - style <br/> - size <br/> - model <br/> - number of images | \$0.04/\$0.08 per raster/vector image |
| crisp_upscale | Crisp upscale of image | - image | \$0.004 |
| creative_upscale | Creative upscale of image | - image | \$0.25 |
| get_user | Get information about the user and left balance | | |

You can find the detailed explanation of tools, their parameters, and prices in Recraft API docs.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.