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 ServerGenerate 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.
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | ||
| mask_url | No | ||
| strength | No | ||
| image_url | Yes | ||
| model_name | No | ||
| preserve_original | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description bears full behavioral disclosure burden. It does not state whether editing is reversible, what preserve_original means operationally, whether mask_url requires specific formats, or how strength affects output. One sentence is insufficient for a 6-parameter mutation tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence with no redundancy, front-loads the core operation. Appropriate brevity given the description's limited scope.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a 6-parameter mutation tool with no annotations and incomplete schema descriptions, the description is far too thin. It doesn't explain key parameters, side effects, or how it relates to sibling image generation tools.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, meaning none of the 6 parameters have descriptions in the schema. The tool description mentions only 'text prompts' which loosely maps to the prompt parameter. mask_url, strength, preserve_original, and model_name remain completely undocumented.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb (edit) and resource (image) with the mechanism (text prompts). This distinguishes it from generate_image (create new) though it doesn't explicitly name siblings as alternatives.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The verb 'edit' implies usage context, but there is no explicit guidance on when to use this over generate_image or generate_from_reference_image. An agent must infer the boundary from the name alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
generate_from_reference_imageC
Generate an image based on a reference image and text prompt.
| Name | Required | Description | Default |
|---|---|---|---|
| seed | No | ||
| prompt | Yes | ||
| strength | No | ||
| image_url | Yes | ||
| model_name | No | ||
| guidance_scale | No | ||
| negative_prompt | No | ||
| num_inference_steps | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full behavioral burden, and it says nothing about cost, latency, determinism via seed, how 'strength' alters fidelity to the reference, or safety filtering. For a generation tool that returns a new artifact, this is a substantial gap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single front-loaded sentence with no wasted words, but the brevity reflects under-specification rather than tight editing. Concise in form, thin in substance.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
An output schema exists so return values need not be explained, but for an 8-parameter generation tool with no annotations and 0% schema coverage, the description leaves tuning parameters and sibling selection entirely unspecified. Inadequate for the tool's complexity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0% across 8 parameters, so the description must compensate and does not. It only gestures at image_url and prompt; strength, guidance_scale, seed, negative_prompt, num_inference_steps, and model_name are left entirely undefined in both places.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and output ('Generate an image') conditioned on two named inputs ('reference image and text prompt'). This distinguishes it in spirit from generate_image (text-only) and edit_image, but it never names or contrasts those siblings explicitly.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No when-to-use guidance at all. With siblings generate_image, edit_image, and generate_image_batch available, an agent gets no criteria for choosing reference-image generation over plain text-to-image or editing. The reference-image condition is only implied.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
generate_imageC
Generate a single image from a text prompt using Replicate AI models.
| Name | Required | Description | Default |
|---|---|---|---|
| seed | No | ||
| width | No | ||
| height | No | ||
| prompt | Yes | ||
| model_name | No | ||
| guidance_scale | No | ||
| negative_prompt | No | ||
| num_inference_steps | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full behavioral burden. It discloses only the provider (Replicate) and that one image is produced; it says nothing about cost, latency, model selection behavior, reproducibility via seed, or failure modes.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single well-formed sentence with zero waste, front-loading the verb and resource. It is efficient, though its brevity stems partly from under-specification rather than tight editing.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
An output schema exists, so return values need not be described. However, for an 8-parameter generative tool with no annotations and 0% schema coverage, the description leaves the agent without enough information to tune parameters or anticipate behavior.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0% for 8 parameters, and the schema exposes only bare titles. The description clarifies only 'prompt' (text prompt) and adds nothing about seed, width, height, model_name, guidance_scale, negative_prompt, or num_inference_steps.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb (generate), resource (image), scope (single), input type (text prompt), and backend (Replicate AI models). The word 'single' implicitly distinguishes it from generate_image_batch, though no sibling is named explicitly.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No when-to-use guidance beyond the implicit 'single image' scope. Nothing tells the agent when to prefer this over generate_from_reference_image or edit_image, and no prerequisites or exclusions are stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
generate_image_batchC
Generate multiple images concurrently from text prompts.
| Name | Required | Description | Default |
|---|---|---|---|
| width | No | ||
| height | No | ||
| prompts | Yes | ||
| model_name | No | ||
| guidance_scale | No | ||
| negative_prompt | No | ||
| num_inference_steps | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full behavioral burden, yet it discloses almost nothing beyond 'concurrently'. It omits whether concurrency is bounded, rate limits, cost, partial-failure handling, or whether all prompts use identical width/height/model settings. The single adjective 'concurrently' is the only behavioral hint.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single tight sentence that front-loads the verb and resource with zero filler. It is appropriately sized, though its brevity is partly the cause of the missing parameter and behavioral detail rather than pure economy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
An output schema exists, so return values need not be explained, but for a 7-parameter generative tool with no annotations the description is far too thin. It leaves key operational facts (per-prompt vs global settings, concurrency limits, failure behavior) undefined for an agent to call it correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Seven parameters with 0% schema description coverage, so the description is responsible for compensating and it does not name a single parameter. It never explains that prompts is an array of independent prompts, nor what guidance_scale, num_inference_steps, model_name, or negative_prompt control. The only inference available is that width/height likely apply globally to the batch.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
States a specific verb and resource ('Generate multiple images') with a clear scope qualifier ('concurrently from text prompts') that implicitly distinguishes it from the single-image sibling generate_image. The plural 'multiple' and 'batch' naming make the batching purpose obvious, though no sibling is named explicitly.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Gives no when-to-use guidance. It never says to prefer this over generate_image when generating several prompts, nor does it describe any conditions, prerequisites, or exclusions relative to generate_from_reference_image or edit_image. The batch intent is inferable only from the name and the word 'concurrently'.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
4 tool updates
v1.0.0- First observed
edit_image - First observed
generate_from_reference_image - First observed
generate_image - First observed
generate_image_batch
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
Turn any LLM multimodal; generate images, voices, videos, 3D models, music, and more.
Generate reproducible image, video, and audio assets with leading models and your own provider keys.
Image, video, music and text generation across 100+ models through one endpoint.
Related MCP Servers
- FlicenseBqualityDmaintenanceEnables users to generate images from text prompts using Replicate's model, with configurable parameters and full MCP protocol compliance.1123-
- AlicenseNot gradedqualityFmaintenanceEnables AI agents to generate, edit, and analyze images using Google's Gemini image generation models including Nano Banana Pro (gemini-3-pro-image-preview).100 npm17MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI image generation and editing using Replicate's official models like Flux, SDXL, and Seedream, with tools to search models and generate images.1,485 npm6Apache 2.0
- AlicenseNot gradedqualityCmaintenanceEnables LLM applications to generate, edit, describe, upscale, remix, reframe, and replace backgrounds in images using the Ideogram AI API.14 npmMIT