Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT and other tools is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AI Fire in da houseCheck it out free

mcp-server-replicate

MCP.Pizza Chef: gerred

mcp-server-replicate is a FastMCP server implementation that connects to the Replicate API, providing structured, resource-based access to AI model inference. It specializes in image generation models, allowing developers to integrate and interact with Replicate-hosted AI models seamlessly within the MCP ecosystem. This server supports efficient, real-time model calls and context sharing for enhanced AI workflows.

Use This MCP server To

Integrate Replicate AI models into MCP workflows for image generation Enable real-time AI image generation via Replicate API Provide structured access to Replicate-hosted AI inference models Facilitate multi-step AI reasoning with Replicate model outputs Embed Replicate model calls in developer tools and applications

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.

Server Replicate MCP server

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

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

  • Implementation Plan
  • Contributing Guide
  • API Reference
  • Resource System
  • Template System

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.

mcp-server-replicate FAQ

How do I install mcp-server-replicate?
You can install it via PyPI using 'pip install mcp-server-replicate'. It requires Python 3.11 or higher.
What AI model types does mcp-server-replicate support?
It primarily supports image generation models available through the Replicate API, enabling rich visual AI workflows.
Can mcp-server-replicate be used with multiple LLM providers?
Yes, while it focuses on Replicate API for image models, it can be integrated alongside LLMs from OpenAI, Claude, and Gemini within MCP workflows.
Is mcp-server-replicate compatible with MCP clients other than FastMCP?
It is designed as a FastMCP server but can be adapted to work with other MCP clients that support the protocol.
How does mcp-server-replicate handle API authentication?
It uses standard Replicate API authentication methods, typically via API keys configured in the server environment.
What programming languages is mcp-server-replicate implemented in?
It is implemented in Python 3.11+, following modern code style and type checking standards.
Does mcp-server-replicate support real-time inference?
Yes, it provides real-time access to Replicate model inference for responsive AI applications.
Where can I find documentation and source code for mcp-server-replicate?
The source code and documentation are available on its GitHub repository and PyPI page.