Get the FREE Ultimate OpenClaw Setup Guide →

mcp -replicate

MCP server from gerred/mcp-server-replicate

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio gerred-mcp-server-replicate uv tool run mcp-server-replicate \
  --env REPLICATE_API_TOKEN="APITOKEN"

How to use

This MCP server provides a resource-based interface to the Replicate AI model inference API, enabling image generation and management through a centralized MCP protocol. It exposes image-generation capabilities via prompts, supports real-time status updates, and includes template-driven parameter configuration for consistent results. You can discover models, adjust quality presets, and integrate webhook notifications for external events. To use it, connect through a client that supports MCP (for example Claude Desktop as described in the README) and point the client at the server’s MCP endpoint. The server relies on a Replicate API key for authentication, which you supply via environment variables when launching the service.

Key capabilities include:

  • Text-to-image generation with detailed style and quality presets
  • Parameter help and model selection guidance to choose appropriate models for tasks
  • Real-time progress tracking and status queries for generations
  • Webhook support for external notifications upon task completion
  • Resource-based prompts and templates to streamline repetitive tasks

To get started, install the server, set your Replicate API key, and run the MCP server via UV. Then configure your client (for example Claude Desktop) to connect to the server and begin generating images from natural language prompts or parameterized templates.

How to install

Prerequisites:

Installation via UV (recommended):

  1. Install the package from PyPI using UV:
uv pip install mcp-server-replicate
  1. Run the MCP server (example using the same environment as in README):
uv tool run mcp-server-replicate

Manual installation (pip): Option A: Using UV

uv pip install mcp-server-replicate

Option B: Using pip

pip install mcp-server-replicate

Environment configuration (required):

  • Create a file or export the Replicate API token:
# Option 1: Environment variable
export REPLICATE_API_TOKEN=your_api_key_here

# Option 2: .env file in home directory
echo "REPLICATE_API_TOKEN=your_api_key_here" > ~/.env

Launching the server with UV (example):

uv tool run mcp-server-replicate

Optional: If you are integrating with Claude Desktop as shown in the README, ensure the working directory is set to your repository path and the environment variable REPLICATE_API_TOKEN is available to the process.

Additional notes

Tips and common issues:

  • Ensure the REPLICATE_API_TOKEN is present in the environment before starting the server; without it, API calls to Replicate will fail.
  • If using Claude Desktop integration, set cwd to the repository path and provide the appropriate env variable and API token in the config.
  • The server relies on UV for isolated dependency management; ensure UV is installed and accessible in PATH.
  • If you encounter authentication errors, double-check the API key scope and that the key is active for your Replicate account.
  • When updating the server, reinstall the package with your package manager to pick up changes.
  • If you want to customize prompts or templates, look for the template system and resource definitions in the repository documentation.

Related MCP Servers

Sponsor this space

Reach thousands of developers