Replicate MCP Server
Provides tools for generating, editing, and evaluating images using the Replicate API, including text-to-image, image-to-image, image editing, batch processing, and creative prompt generation.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Replicate MCP Server Generate a photorealistic image of a serene landscape."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Replicate MCP Server
A comprehensive MCP (Model Context Protocol) server that enables LLM clients to generate, edit, and evaluate images through the Replicate API.
Features
Text-to-Image Generation: Generate single or batch images from text prompts
Image-to-Image Generation: Transform images based on reference images and prompts
Image Editing: Edit existing images with text-guided modifications
Creative Prompts: Generate creative image prompts based on style, subject, and mood
Batch Processing: Process up to 5 images concurrently
Progress Reporting: Real-time progress updates for long-running operations
Error Handling: Comprehensive error handling and validation
Related MCP server: Nano Banana Pro MCP
Installation
Clone the repository:
git clone https://github.com/yourusername/replicate-mcp-server.git
cd replicate-mcp-serverInstall dependencies using uv:
uv syncSet up your environment:
cp .env.example .env
# Edit .env and add your Replicate API tokenConfiguration
Environment Variables
Create a .env file with:
REPLICATE_API_TOKEN=your-replicate-api-token-here
LOG_LEVEL=INFO
MAX_BATCH_SIZE=5
REQUEST_TIMEOUT=300
ENABLE_DEBUG=falseClaude Desktop Configuration
Add to your Claude Desktop configuration:
{
"mcpServers": {
"replicate-image-server": {
"command": "uv",
"args": [
"run",
"python",
"/path/to/replicate-mcp-server/src/main.py"
],
"env": {
"REPLICATE_API_TOKEN": "your-replicate-api-token"
}
}
}
}Claude Code Configuration
Add to your Claude Code configuration:
{
"mcpServers": {
"replicate-image-server": {
"command": "uv",
"args": [
"run",
"python",
"/path/to/replicate-mcp-server/src/main.py"
],
"env": {
"REPLICATE_API_TOKEN": "your-replicate-api-token",
"LOG_LEVEL": "DEBUG"
}
}
}
}Available Tools
generate_image
Generate a single image from a text prompt.
Parameters:
prompt(str): Text description of the image to generatewidth(int): Image width in pixels (256-2048, default: 1024)height(int): Image height in pixels (256-2048, default: 1024)negative_prompt(str, optional): What to avoid in the imagenum_inference_steps(int): Number of denoising steps (1-50, default: 4)guidance_scale(float): How closely to follow the prompt (0.0-20.0, default: 0.0)seed(int, optional): Random seed for reproducibilitymodel_name(str, optional): Specific model to use
generate_image_batch
Generate multiple images concurrently from text prompts.
Parameters:
prompts(list[str]): List of text descriptions (max 5 prompts)Same optional parameters as
generate_image
generate_from_reference_image
Generate an image based on a reference image and text prompt.
Parameters:
image_url(str): URL of the reference imageprompt(str): Text description for transformationstrength(float): Transformation strength (0.1-1.0, default: 0.8)Other optional parameters similar to
generate_image
edit_image
Edit an existing image based on text prompts.
Parameters:
image_url(str): URL of the image to editprompt(str): Description of desired editsmask_url(str, optional): URL of mask imagestrength(float): Edit strength (0.1-1.0, default: 0.7)preserve_original(bool): Whether to preserve unmasked areas (default: true)model_name(str, optional): Specific model to use
Available Prompts
creative_image_prompt
Generate creative image prompts based on style, subject, and mood.
Parameters:
style(str): Art style (default: "photorealistic")Options: photorealistic, anime, oil_painting, watercolor, digital_art, impressionist, cyberpunk, minimalist
subject(str): Subject matter (default: "landscape")Options: landscape, portrait, architecture, nature, abstract, urban, fantasy, still_life
mood(str): Mood/atmosphere (default: "serene")Options: serene, dramatic, mysterious, joyful, melancholic, energetic, romantic, ethereal
Models
The server uses the following default models:
Text-to-Image:
bytedance/sdxl-lightning-4stepImage-to-Image:
google/nano-bananaImage Editing:
bytedance/seedream-4
Development
Running Tests
uv run pytestType Checking
uv run mypy srcCode Formatting
uv run black src
uv run ruff check srcLicense
MIT
Contributing
Contributions are welcome! Please read our contributing guidelines and submit pull requests to our repository.
Support
For issues and questions, please open an issue on GitHub.
Available Tools
4 toolsedit_imageB
Edit an existing image based on text prompts.
Inputs: prompt (required), image_url (required), mask_url, strength, +2 more. Returns: object
generate_from_reference_imageC
Generate an image based on a reference image and text prompt.
Inputs: prompt (required), image_url (required), seed, strength, +4 more. Returns: object
generate_imageC
Generate a single image from a text prompt using Replicate AI models.
Inputs: prompt (required), seed, width, height, +4 more. Returns: object
generate_image_batchC
Generate multiple images concurrently from text prompts.
Inputs: prompts (required), width, height, model_name, +3 more. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
generate_image and generate_image_batch are clearly distinct by cardinality, and each has a unique input type. However, edit_image and generate_from_reference_image overlap: both take an image and text prompt and return a modified/new image, which could cause misselection.
All tool names use snake_case with a clear verb_noun or verb_preposition_noun structure. The generate_ prefix is consistent across three tools, and edit_image is a natural semantic variation.
Four tools is well within the ideal 3-15 range for a focused image generation service. It covers key workflows without redundancy, though it could arguably support more operations.
The set covers single generation, batch generation, reference-based generation, and editing, which are core for image generation. Missing operations like listing available models or retrieving generation status are minor gaps an agent could work around.
Maintenance
Related MCP Connectors
LLM chat, text tools, image generation, editing, batch image jobs, and asynchronous video generation
Generate AI images and videos from your agent: list models, start jobs, and fetch the results.
Generate and edit images: article covers, pet portraits, product shots. Each call spends credits.
Turn any LLM multimodal; generate images, voices, videos, 3D models, music, and more.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables users to generate images from text prompts using Replicate's model, with configurable parameters and full MCP protocol compliance.1121ISC
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to generate, edit, and analyze images using Google's Gemini image generation models including Nano Banana Pro (gemini-3-pro-image-preview).234 npm18MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI image generation and editing using Replicate's official models like Flux, SDXL, and Seedream, with tools to search models and generate images.6MIT
- AlicenseNot gradedqualityDmaintenanceEnables LLM applications to generate, edit, describe, upscale, remix, reframe, and replace backgrounds in images using the Ideogram AI API.20 npmMIT