MCP Now
Replicate

Replicate

by deepfates
GitHub

Search, run and manage machine learning models on Replicate through a simple tool-based interface. Browse models, create predictions, track their status, and handle generated images.

model
replicate
prediction
server
desktop

Replicate MCP Server

A Model Context Protocol server implementation for Replicate. Run Replicate models through a simple tool-based interface.

Quickstart

  1. Install the server:
1npm install -g mcp-replicate
  1. Get your Replicate API token:

  2. Configure Claude Desktop:

    • Open Claude Desktop Settings (,)
    • Select the "Developer" section in the sidebar
    • Click "Edit Config" to open the configuration file
    • Add the following configuration, replacing your_token_here with your actual Replicate API token:
1{ 2 "mcpServers": { 3 "replicate": { 4 "command": "mcp-replicate", 5 "env": { 6 "REPLICATE_API_TOKEN": "your_token_here" 7 } 8 } 9 } 10}
  1. Start Claude Desktop. You should see a 🔨 hammer icon in the bottom right corner of new chat windows, indicating the tools are available.

(You can also use any other MCP client, such as Cursor, Cline, or Continue.)

Alternative Installation Methods

Install from source

1git clone https://github.com/deepfates/mcp-replicate 2cd mcp-replicate 3npm install 4npm run build 5npm start

Run with npx

1npx mcp-replicate

Features

Models

  • Search models using semantic search
  • Browse models and collections
  • Get detailed model information and versions

Predictions

  • Create predictions with text or structured input
  • Track prediction status
  • Cancel running predictions
  • List your recent predictions

Image Handling

  • View generated images in your browser
  • Manage image cache for better performance

Configuration

The server needs a Replicate API token to work. You can get one at Replicate.

There are two ways to provide the token:

Add it to your Claude Desktop configuration as shown in the Quickstart section:

1{ 2 "mcpServers": { 3 "replicate": { 4 "command": "mcp-replicate", 5 "env": { 6 "REPLICATE_API_TOKEN": "your_token_here" 7 } 8 } 9 } 10}

2. As Environment Variable

Alternatively, you can set it as an environment variable if you're using another MCP client:

1export REPLICATE_API_TOKEN=your_token_here

Available Tools

Model Tools

  • search_models: Find models using semantic search
  • list_models: Browse available models
  • get_model: Get details about a specific model
  • list_collections: Browse model collections
  • get_collection: Get details about a specific collection

Prediction Tools

  • create_prediction: Run a model with your inputs
  • get_prediction: Check a prediction's status
  • cancel_prediction: Stop a running prediction
  • list_predictions: See your recent predictions

Image Tools

  • view_image: Open an image in your browser
  • clear_image_cache: Clean up cached images
  • get_image_cache_stats: Check cache usage

Troubleshooting

Server is running but tools aren't showing up

  1. Check that Claude Desktop is properly configured with the MCP server settings
  2. Ensure your Replicate API token is set correctly
  3. Try restarting both the server and Claude Desktop
  4. Check the server logs for any error messages

Tools are visible but not working

  1. Verify your Replicate API token is valid
  2. Check your internet connection
  3. Look for any error messages in the server output

Development

  1. Install dependencies:
1npm install
  1. Start development server (with auto-reload):
1npm run dev
  1. Check code style:
1npm run lint
  1. Format code:
1npm run format

Requirements

  • Node.js >= 18.0.0
  • TypeScript >= 5.0.0
  • Claude Desktop for using the tools

License

MIT