Skip to main content

MCP Server Replicate

Python Version License Code Style Type Checker Ruff PyPI version

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

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

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.

Release files for mcp-server-replicate 0.1.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mcp-server-replicate 0.1.9
File Size Uploaded
mcp_server_replicate-0.1.9.tar.gz 30.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mcp-server-replicate 0.1.9
File Interpreter ABI Platform
mcp_server_replicate-0.1.9-py3-none-any.whl Python 3 none any Details

Total release size: 34.0 kB

Release files / mcp_server_replicate-0.1.9.tar.gz

Download URL mcp_server_replicate-0.1.9.tar.gz
Size 30.2 kB
Tags Source
SHA-256 checksum
How to use checksums
e89858a7b39e3ec542502cffda84d1aa4c5f638902353f927c5b0575ed65ac1d
BLAKE2b-256 checksum
How to use checksums
da8dbc6e6c3130e2fe2ad17ee5d6cf7555bfc887e840cdd85bf99d9cfbdee567
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.11.10

Release files / mcp_server_replicate-0.1.9-py3-none-any.whl

Download URL mcp_server_replicate-0.1.9-py3-none-any.whl
Size 3.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
46ccace97d1c5336074cfc2e69584aa8508686435f7c2a38ef99c4a005cbe13d
BLAKE2b-256 checksum
How to use checksums
5153a1214e35e065cc9f9d7c7390cc48fe8ef031a7cc72eddc64a4a3a5121041
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.11.10

Release history Release notifications | RSS feed

This release

0.1.9 This release

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page