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

mcp-replicate

MCP.Pizza Chef: deepfates

mcp-replicate is a Model Context Protocol (MCP) server that provides a streamlined interface to interact with Replicate's API. It allows developers to run and manage AI models hosted on Replicate through a simple, tool-based approach, facilitating easy integration into AI workflows and applications. Installation is straightforward via npm, and configuration involves setting up an API token from Replicate. This server is ideal for developers looking to leverage Replicate's diverse model ecosystem within MCP-compatible environments like Claude Desktop, enabling real-time model execution and interaction.

Use This MCP server To

Run Replicate AI models through MCP-compatible clients Integrate Replicate model outputs into AI workflows Enable real-time interaction with Replicate models Simplify API token management for Replicate within MCP Use Replicate models in Claude Desktop and similar apps

README

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:
npm install -g mcp-replicate
  1. Get your Replicate API token:

    • Go to Replicate API tokens page
    • Create a new token if you don't have one
    • Copy the token for the next step
  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:
{
  "mcpServers": {
    "replicate": {
      "command": "mcp-replicate",
      "env": {
        "REPLICATE_API_TOKEN": "your_token_here"
      }
    }
  }
}
  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

git clone https://github.com/deepfates/mcp-replicate
cd mcp-replicate
npm install
npm run build
npm start

Run with npx

npx 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:

1. In Claude Desktop Config (Recommended)

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

{
  "mcpServers": {
    "replicate": {
      "command": "mcp-replicate",
      "env": {
        "REPLICATE_API_TOKEN": "your_token_here"
      }
    }
  }
}

2. As Environment Variable

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

export 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:
npm install
  1. Start development server (with auto-reload):
npm run dev
  1. Check code style:
npm run lint
  1. Format code:
npm run format

Requirements

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

License

MIT

mcp-replicate FAQ

How do I install the mcp-replicate server?
Install it globally using npm with the command `npm install -g mcp-replicate`.
Where do I get the Replicate API token required for mcp-replicate?
Obtain your API token from the Replicate API tokens page at https://replicate.com/account/api-tokens by creating or copying an existing token.
How do I configure mcp-replicate in Claude Desktop?
In Claude Desktop settings, under Developer > Edit Config, add the mcp-replicate server configuration with your Replicate API token in the environment variables.
Can mcp-replicate be used with LLM providers like OpenAI, Claude, or Gemini?
Yes, mcp-replicate integrates with MCP clients that can use models from OpenAI, Claude, Gemini, and others, enabling combined workflows.
Is mcp-replicate limited to specific Replicate models?
No, it supports running any model available through the Replicate API, providing broad access to their model catalog.
What environment variables are required to run mcp-replicate?
The primary environment variable is `REPLICATE_API_TOKEN`, which must be set to your valid Replicate API token.
Does mcp-replicate support real-time model interaction?
Yes, it enables real-time execution and interaction with Replicate models through the MCP protocol.
Is mcp-replicate open source and where can I find its code?
Yes, it is open source and available on GitHub under the MCP SDK organization.