- Home
- MCP servers
- Replicate Recraft
Replicate Recraft
- javascript
0
GitHub Stars
javascript
Language
5 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
You can run a dedicated MCP server that exposes the Recraft v3 image generation model through Replicate. This server lets you generate high-quality images with flexible sizes and styles, track asynchronous predictions, and optionally receive webhook notifications. It’s useful when you want a self-contained endpoint for image generation that you can integrate into your MCP workflow.
How to use
Start by choosing your preferred deployment method. If you want a quick start without local setup, use the universal execution option to run the server directly through your MCP client. If you prefer hosting the server locally, install dependencies, build, and then run the server on your machine. You will be able to initiate synchronous generations with recraft_v3_generate or manage long-running tasks with recraft_v3_generate_async, monitor status with recraft_v3_get_prediction, and cancel tasks with recraft_v3_cancel_prediction. Generated images are saved locally in WebP format and you can configure webhook notifications for completed asynchronous jobs.
How to install
Prerequisites: you need Node.js (and npm) for local installation. If you want a quick start without installing locally, you can run the MCP server via a single npx command.
# Quick start without local installation
npx -y https://github.com/PierrunoYT/replicate-recraft-v3-mcp-server.git
# Local installation steps
# 1) Clone the repository
git clone https://github.com/PierrunoYT/replicate-recraft-v3-mcp-server.git
cd replicate-recraft-v3-mcp-server
# 2) Install dependencies
npm install
# 3) Build the project
npm run build
# 4) Run in development mode (optional)
npm run dev
Configuration
Set your Replicate API token as an environment variable to authorize requests to the Recraft v3 model.
export REPLICATE_API_TOKEN="r8_NBY**********************************"
You can use this token in the MCP client configurations shown below.
## HTTP MCP config (remote server)
If you want to run the server by pointing to a remote runtime, you can configure an HTTP MCP entry pointing to the server URL.
{ "mcpServers": { "recraft_v3_http": { "type": "http", "name": "recraft_v3_http", "url": "https://github.com/PierrunoYT/replicate-recraft-v3-mcp-server.git", "args": [] } } }
## STDIO MCP config (local server)
If you prefer running the server locally, provide the stdio configuration with the runtime command and path to the built index. Include the API token in the environment for authentication.
{ "mcpServers": { "recraft_v3_local": { "type": "stdio", "name": "recraft_v3_local", "command": "node", "args": ["/path/to/replicate-recraft-v3-mcp-server/build/index.js"], "env": { "REPLICATE_API_TOKEN": "r8_NBY**********************************" } } } }
## Available tools (functions)
Your MCP setup provides four core functions to generate and manage images.
- recraft\_v3\_generate — Generate images synchronously using a text prompt, with optional size, aspect\_ratio, and style parameters.
- recraft\_v3\_generate\_async — Generate images asynchronously and receive a prediction ID for tracking; supports webhook notifications.
- recraft\_v3\_get\_prediction — Retrieve the status and results of an asynchronous prediction.
- recraft\_v3\_cancel\_prediction — Cancel a running asynchronous prediction to save resources.
## Sizes, aspect ratios, and style options
You can customize the output with a variety of sizes and aspect ratios and apply different visual styles to fit your needs.
## Output and error handling
Images are saved locally in a dedicated images/ directory in WebP format. The server returns local file paths, original URLs, image filenames, and the parameters used for generation. If something goes wrong, you’ll receive detailed error information for missing API tokens, invalid parameters, network issues, rate limits, or generation failures.
## Development and testing
Run in development mode to test changes, or run tests to ensure stability.
npm run dev
## Notes
This server integrates with Replicate’s Recraft v3 model and provides prediction tracking, webhook support, and flexible generation options to suit your workflow.
## Available tools
### recraft\_v3\_generate
Generate images synchronously using a text prompt with optional size, aspect\_ratio, and style parameters.
### recraft\_v3\_generate\_async
Generate images asynchronously; returns a prediction ID and supports webhook notifications for completion.
### recraft\_v3\_get\_prediction
Retrieve status and results for an asynchronous prediction.
### recraft\_v3\_cancel\_prediction
Cancel a running asynchronous prediction to conserve resources.