Get the FREE Ultimate OpenClaw Setup Guide →

recraft

MCP Server implementation for recraft.ai using the Model Context Protocol SDK

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio bartwaardenburg-recraft-mcp-server node path/to/server.js \
  --env RECRAFT_API_KEY="Your Recraft API key" \
  --env RECRAFT_API_URL="The Recraft API endpoint (default: https://external.api.recraft.ai)"

How to use

The Recraft MCP Server exposes a set of MCP tools that interface with Recraft.ai to generate and modify images. It supports common image generation tasks such as generating images from prompts, transforming images with text prompts, inpainting, background replacement, upscaling, style creation, and basic user information retrieval. Tools include generate_image, image_to_image, inpaint_image, replace_background, vectorize_image, remove_background, crisp_upscale, creative_upscale, create_style, get_user_info, and save_image_to_disk. You can invoke these tools from an MCP-enabled agent or application to compose complex image workflows, leveraging Recraft’s capabilities through the MCP protocol. The server also offers a help endpoint that provides general information about available tools as a convenience for clients. To use, ensure your MCP client connects to this server and issues the appropriate tool calls with the required parameters as defined by the MCP tool definitions and Zod schemas used by the server for validation.

How to install

Prerequisites:

  • Node.js v18 or later
  • Access to a Recraft.ai API key

Install and configure:

  1. Clone the repository: git clone https://github.com/yourusername/recraft-mcp-server.git cd recraft-mcp-server

  2. Install dependencies: npm install

  3. Copy the environment file and configure your API key: cp .env.example .env

    Edit .env and set RECRAFT_API_KEY and optionally RECRAFT_API_URL

  4. Run the server (example): npm start

  5. Optional development and testing commands:

    • Build the project (if applicable): npm run build
    • Run in development mode: npm run dev
    • Inspect MCP server: npm run inspect

Note: Ensure your environment variables are properly set in .env before starting the server.

Additional notes

Environment variables:

Tips:

  • Ensure the API key has the necessary permissions for image generation and related actions.
  • Validate prompts and image inputs according to the MCP tool schemas to avoid runtime errors.
  • Use the inspector tool to familiarize yourself with tool parameters and expected formats.
  • If you encounter authentication errors, double-check that RECRAFT_API_KEY is correctly loaded in the environment where the server runs.
  • When deploying, consider securing environment variables and rotating API keys regularly.

Related MCP Servers

Sponsor this space

Reach thousands of developers