mcp -replicate
MCP server from gerred/mcp-server-replicate
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:
- Python 3.11 or higher
- An active Replicate API key (get one at https://replicate.com/account)
- UV for dependency management (recommended)
Installation via UV (recommended):
- Install the package from PyPI using UV:
uv pip install mcp-server-replicate
- 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
mcp-vegalite
MCP server from isaacwasserman/mcp-vegalite-server
github-chat
A Model Context Protocol (MCP) for analyzing and querying GitHub repositories using the GitHub Chat API.
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
pagerduty
PagerDuty's official local MCP (Model Context Protocol) server which provides tools to interact with your PagerDuty account directly from your MCP-enabled client.
futu-stock
mcp server for futuniuniu stock
mcp -boilerplate
Boilerplate using one of the 'better' ways to build MCP Servers. Written using FastMCP