recraft
MCP Server implementation for recraft.ai using the Model Context Protocol SDK
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:
-
Clone the repository: git clone https://github.com/yourusername/recraft-mcp-server.git cd recraft-mcp-server
-
Install dependencies: npm install
-
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
-
Run the server (example): npm start
-
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:
- RECRAFT_API_URL: Recraft API endpoint (default: https://external.api.recraft.ai)
- RECRAFT_API_KEY: Your Recraft API key
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
iterm
A Model Context Protocol server that executes commands in the current iTerm session - useful for REPL and CLI assistance
mcp
Octopus Deploy Official MCP Server
furi
CLI & API for MCP management
editor
MCP Server for Phaser Editor
DoorDash
MCP server from JordanDalton/DoorDash-MCP-Server
mcp
MCP сервер для автоматического создания и развертывания приложений в Timeweb Cloud