Replicate recently released an MCP (Model Context Protocol) server that lets Claude Desktop and VS Code users generate images, run models, and deploy AI pipelines through a natural language interface — no API calls, no authentication setup, just a prompt in your coding environment.
This post explains what Replicate MCP is, how to set it up, and what it means for developers who want AI image generation in their workflow without switching context.
What Is Replicate MCP?
MCP (Model Context Protocol) is Anthropic's open standard for connecting AI assistants like Claude to external tools and data sources. When you install an MCP server, Claude can call it directly — the AI assistant gains new capabilities without needing API code.
Replicate's MCP server exposes Replicate's model library (thousands of AI models including Stable Diffusion, FLUX, and others) directly to Claude Desktop and VS Code's Copilot Chat. You type "generate a header image for my blog" and Claude calls Replicate, returns the image URL, and you keep working.
How to Set Up Replicate MCP
Prerequisites
- Claude Desktop (Mac or Windows) or VS Code with Copilot Chat
- Replicate API token (free at replicate.com)
- Node.js 18+ installed
Installation
For Claude Desktop, add the MCP configuration to ~/.config/claude/claude_desktop_config.json:
{
"mcpServers": {
"replicate": {
"command": "npx",
"args": ["-y", "@replicate/mcp-server"],
"env": {
"REPLICATE_API_TOKEN": "your-replicate-token-here"
}
}
}
}
For VS Code, add to your .vscode/mcp.json or user settings:
{
"servers": {
"replicate": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@replicate/mcp-server"],
"env": {
"REPLICATE_API_TOKEN": "your-replicate-token-here"
}
}
}
}
Restart Claude Desktop or VS Code after adding the configuration.
Verify It's Working
In Claude Desktop, look for the hammer icon (🔨) in the bottom-left corner — this shows available tools. If Replicate MCP is installed correctly, you'll see Replicate tools listed. Ask Claude to "generate a simple test image" to confirm it's connected.
What You Can Do With Replicate MCP
Image Generation in Your Workflow
The primary use case: generate images while coding or writing without leaving your environment.
In Claude Desktop:
"Generate a dark-themed hero image for a developer documentation site.
Tech aesthetic, code symbols, 16:9 ratio."
In VS Code:
# In Copilot Chat:
"Create a product screenshot mockup for my landing page based on
the UI components in this file"
Model Discovery and Comparison
Ask Claude to search Replicate's model library and compare options:
"What are the best FLUX models on Replicate for product photography?
Show me the top 3 by recent runs."
Running Any Replicate Model
MCP gives access to all public models on Replicate, not just image generation:
"Run the background removal model on this image URL: [url]"
"Use the image upscaling model to upscale this image 4x"
"Run face detection on this image and tell me how many faces are detected"
Replicate MCP vs Direct API Integration
The MCP approach has real advantages for certain workflows:
No code required: You don't write API calls, handle authentication, or manage response parsing. Claude does all that.
Natural language model selection: Instead of knowing the exact model ID for SDXL Turbo, you say "use a fast Stable Diffusion model" and Claude picks the right one.
Inline in your workflow: Generate images while staying in Claude Desktop or VS Code. No tab switching, no Postman, no separate image generation app.
The limitations:
Less control: You can't fine-tune every parameter the way direct API calls allow. The MCP interface exposes the most common parameters.
Not for production pipelines: MCP is for developer productivity, not for building apps that generate images for end users. Your production app still needs direct API integration.
Replicate only: The Replicate MCP server only connects to Replicate's model library. If you want models from other providers (like ModelsLab's fine-tuned collections), you need the direct API.
ModelsLab MCP vs Replicate MCP
ModelsLab is also developing MCP integration, giving developers access to ModelsLab's 200+ models (including fine-tuned Stable Diffusion variants, FLUX, video generation, and audio models) directly in Claude and VS Code.
The difference:
- Replicate MCP: Access to Replicate's community model library — broad selection, community-trained models
- ModelsLab MCP: Access to ModelsLab's curated model library — commercial fine-tunes, specialized models for specific industries (product photography, architecture, fashion)
For most developers, both are worth installing. Different models excel at different tasks, and having both available in Claude/VS Code costs nothing (just API usage when you actually generate).
Setting Up ModelsLab for Direct API Access
For production pipelines where you need the control that MCP doesn't provide:
import requests
MODELSLAB_API_KEY = "your-modelslab-key"
def generate_image_production(prompt, model="realistic-vision-v6"):
"""Production-ready image generation with full parameter control."""
response = requests.post(
"https://modelslab.com/api/v6/realtime/text2img",
headers={"Content-Type": "application/json"},
json={
"key": MODELSLAB_API_KEY,
"model_id": model,
"prompt": prompt,
"negative_prompt": "blurry, low quality, distorted, watermark, text",
"width": "1024",
"height": "1024",
"samples": "1",
"num_inference_steps": 20,
"guidance_scale": 7,
"safety_checker": False,
"enhance_prompt": "yes",
"seed": None # Set for reproducible outputs
}
)
result = response.json()
if result.get("status") == "success":
return result["output"][0] # Return image URL
else:
raise Exception(f"Generation failed: {result}")
The Broader MCP Ecosystem for Developers
Replicate's MCP launch is part of a larger trend: every major AI API provider is building MCP servers to get into developer workflows. The current landscape includes:
- Replicate MCP — Community AI models
- GitHub MCP — Repository operations from Claude
- Stripe MCP — Payment API calls from Claude
- Postgres MCP — Database queries from Claude
- Browser MCP — Web browsing and scraping from Claude
The pattern is clear: MCP is becoming the integration layer between AI assistants and every tool developers use. Getting your API into this ecosystem — whether as an MCP server or through integration guides — is a growing priority for API providers.
Getting Started
Install Replicate MCP in 3 steps:
- Get a free Replicate API token at replicate.com
- Add the MCP config to Claude Desktop or VS Code (see config above)
- Restart and test with a simple image generation prompt
For image generation in production apps (not just developer tooling), ModelsLab API provides the reliability, model variety, and commercial licensing that production applications need — with direct API access that gives you full parameter control.
Summary
Replicate MCP brings one-click AI image generation into Claude Desktop and VS Code. It's excellent for developer productivity — generating assets, testing prompts, and exploring models without leaving your coding environment. It's not a replacement for direct API integration in production applications, but for solo developers and small teams, it significantly reduces the friction of working with AI models day-to-day.