MCP Server Replicate

MCP Server Replicate

A FastMCP server implementation that facilitates resource-based access to AI model inference, focusing on image generation through the Replicate API, with features like real-time updates, webhook integration, and secure API key management.

gerred

Image & Video Processing
Category.security-and-iam
Visit Server

Tools

generate_image

Generate an image using the specified parameters.

list_models

List available models on Replicate with optional filtering by owner.

search_models

Search for models using semantic search.

list_collections

List available model collections on Replicate.

get_collection_details

Get detailed information about a specific collection.

list_hardware

List available hardware options for running models.

list_templates

List all available templates with their schemas.

validate_template_parameters

Validate parameters against a template schema.

create_prediction

Create a new prediction using a specific model version on Replicate. Args: input: Model input parameters including version or model details confirmed: Whether the user has explicitly confirmed the generation Returns: Prediction details if confirmed, or a confirmation request if not

get_prediction

Get the status and results of a prediction.

cancel_prediction

Cancel a running prediction.

get_webhook_secret

Get the signing secret for verifying webhook requests.

verify_webhook

Verify that a webhook request came from Replicate using HMAC-SHA256. Args: payload: The webhook payload to verify signature: The signature from the X-Replicate-Signature header secret: The webhook signing secret from get_webhook_secret Returns: True if signature is valid, False otherwise

search_available_models

Search for available models matching the query. Args: query: Search query describing the desired model style: Optional style to filter by Returns: List of matching models with scores

get_model_details

Get detailed information about a specific model. Args: model_id: Model identifier in format owner/name Returns: Detailed model information

subscribe_to_generation

Handle resource subscription requests.

unsubscribe_from_generation

Handle resource unsubscribe requests.

open_image_with_system

Open an image URL with the system's default application. Args: image_url: URL of the image to open Returns: Dict containing status of the operation

README

MCP Server Replicate

Python Version License Code Style Type Checker Ruff PyPI version smithery badge

A FastMCP server implementation for the Replicate API, providing resource-based access to AI model inference with a focus on image generation.

<a href="https://glama.ai/mcp/servers/r830bzsk7r"><img width="380" height="200" src="https://glama.ai/mcp/servers/r830bzsk7r/badge" alt="Server Replicate MCP server" /></a>

Features

  • 🖼️ Resource-based image generation and management
  • 🔄 Real-time updates through subscriptions
  • 📝 Template-driven parameter configuration
  • 🔍 Comprehensive model discovery and selection
  • 🪝 Webhook integration for external notifications
  • 🎨 Quality and style presets for optimal results
  • 📊 Progress tracking and status monitoring
  • 🔒 Secure API key management

Available Prompts

The server provides several specialized prompts for different tasks:

Text to Image (Primary)

Our most thoroughly tested and robust prompt. Optimized for generating high-quality images from text descriptions with:

  • Detailed style control
  • Quality presets (draft, balanced, quality, extreme)
  • Size and aspect ratio customization
  • Progress tracking and real-time updates

Example:

Create a photorealistic mountain landscape at sunset with snow-capped peaks, quality level: quality, style: photorealistic

Other Prompts

  • Image to Image: Transform existing images (coming soon)
  • Model Selection: Get help choosing the right model for your task
  • Parameter Help: Understand and configure model parameters

Prerequisites

  • Python 3.11 or higher
  • A Replicate API key (get one at https://replicate.com/account)
  • UV for dependency management

Installation

Installing via Smithery

To install MCP Server Replicate for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @gerred/mcp-server-replicate --client claude

Installing Manually

You can install the package directly from PyPI:

# Using UV (recommended)
uv pip install mcp-server-replicate

# Using UVX for isolated environments
uvx install mcp-server-replicate

# Using pip
pip install mcp-server-replicate

Claude Desktop Integration

  1. Make sure you have the latest version of Claude Desktop installed
  2. Open your Claude Desktop configuration:
# macOS
code ~/Library/Application\ Support/Claude/claude_desktop_config.json

# Windows
code %APPDATA%\Claude\claude_desktop_config.json
  1. Add the server configuration using one of these options:
{
  "globalShortcut": "Shift+Alt+A",
  "mcpServers": {
    "replicate": {
      "command": "uv",
      "args": ["tool", "run", "mcp-server-replicate"],
      "env": {
        "REPLICATE_API_TOKEN": "APITOKEN"
      },
      "cwd": "$PATH_TO_REPO"
    }
  }
}
  1. Set your Replicate API key:
# Option 1: Set in your environment
export REPLICATE_API_TOKEN=your_api_key_here

# Option 2: Create a .env file in your home directory
echo "REPLICATE_API_TOKEN=your_api_key_here" > ~/.env
  1. Restart Claude Desktop completely

You should now see the 🔨 icon in Claude Desktop, indicating that the MCP server is available.

Usage

Once connected to Claude Desktop, you can:

  1. Generate images with natural language:

    Create a photorealistic mountain landscape at sunset with snow-capped peaks
    
  2. Browse your generations:

    Show me my recent image generations
    
  3. Search through generations:

    Find my landscape generations
    
  4. Check generation status:

    What's the status of my last generation?
    

Troubleshooting

Server not showing up in Claude Desktop

  1. Check the Claude Desktop logs:
tail -n 20 -f ~/Library/Logs/Claude/mcp*.log
  1. Verify your configuration:
  • Make sure the path in claude_desktop_config.json is absolute
  • Ensure UV is installed and in your PATH
  • Check that your Replicate API key is set
  1. Try restarting Claude Desktop

For more detailed troubleshooting, see our Debugging Guide.

Documentation

Development

  1. Clone the repository:
git clone https://github.com/gerred/mcp-server-replicate.git
cd mcp-server-replicate
  1. Install development dependencies:
uv pip install --system ".[dev]"
  1. Install pre-commit hooks:
pre-commit install
  1. Run tests:
pytest

Contributing

We welcome contributions! Please see our Contributing Guide for details.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Recommended Servers

Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
@kazuph/mcp-fetch

@kazuph/mcp-fetch

Model Context Protocol server for fetching web content and processing images. This allows Claude Desktop (or any MCP client) to fetch web content and handle images appropriately.

Featured
Local
JavaScript
mermaid-mcp-server

mermaid-mcp-server

A Model Context Protocol (MCP) server that converts Mermaid diagrams to PNG images.

Featured
JavaScript
VirusTotal MCP Server

VirusTotal MCP Server

A MCP server for querying the VirusTotal API. This server provides tools for scanning URLs, analyzing file hashes, and retrieving IP address reports.

Featured
TypeScript
mcp-shodan

mcp-shodan

MCP server for querying the Shodan API and Shodan CVEDB. This server provides tools for IP lookups, device searches, DNS lookups, vulnerability queries, CPE lookups, and more.

Featured
JavaScript
mcp-pinterest

mcp-pinterest

A Pinterest Model Context Protocol (MCP) server for image search and information retrieval

Featured
TypeScript
Azure MCP Server

Azure MCP Server

Enables natural language interaction with Azure services through Claude Desktop, supporting resource management, subscription handling, and tenant selection with secure authentication.

Official
Local
TypeScript
DeepSRT MCP Server

DeepSRT MCP Server

An MCP server that enables users to generate summaries of YouTube videos in multiple languages and formats through integration with DeepSRT's API.

Official
JavaScript
ScreenshotOne MCP Server

ScreenshotOne MCP Server

An official MCP server implementation that allows AI assistants to capture website screenshots through the ScreenshotOne API, enabling visual context from web pages during conversations.

Official
TypeScript
Glif

Glif

Run AI workflows hosted on Glif.app via MCP, including ComfyUI-based image generators, meme generators, selfies, chained LLM calls, and more

Official
TypeScript