home / mcp / recraft mcp server
Provides MCP-based access to Recraft.ai image generation and transformation services via HTTP and local runtime.
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.
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.
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.
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.
Generate images from text prompts using Recraft's image generation service.
Transform an existing image based on a new text prompt to apply changes or styling.
Edit parts of an image using a mask to specify areas for inpainting.
Replace the background of an image with a new background or style.
Convert raster images to vector formats for scalable edits.
Remove the background from an image, isolating the main subject.
Upscale images with enhanced detail and clarity.
Upscale images with creative enhancements and effects.
Create a new style based on reference images for consistent outputs.
Retrieve information about the current user session or account.
Save generated images to the local filesystem.
Provide general information about the available tools in a helper context.