# mcp-replicate

> MCP Server

This repository provides a Model Context Protocol (MCP) server implementation for Replicate, enabling users to run Replicate models through a tool-based interface. It supports model search, prediction management, and image handling.

## Overview

- **Category:** AI
- **Language:** TypeScript
- **Stars:** 95
- **Forks:** 8
- **Owner:** deepfates
- **GitHub:** https://github.com/deepfates/mcp-replicate
- **Created:** 2025-01-08T01:29:44+00:00
- **Updated:** 2025-03-28T22:24:13+00:00
- **Source:** https://model-context-protocol.com/servers/replicate-model-context-protocol-mcp-server

## Setup

## Setup

1. Install the server: `npm install -g mcp-replicate`
2. Get your Replicate API token from [Replicate API tokens page](https://replicate.com/account/api-tokens).
3. Configure Claude Desktop by adding the `mcpServers` configuration to the config file, replacing `your_token_here` with your actual Replicate API token.
4. Start Claude Desktop to see the hammer icon indicating the tools are available.

Alternative Installation Methods:

*   Install from source:
    ```bash
    git clone https://github.com/deepfates/mcp-replicate
    cd mcp-replicate
    npm install
    npm run build
    npm start
    ```
*   Run with npx:
    ```bash
    npx mcp-replicate
    ```

## Tools

## Available Tools

Models:

1.  Search models using semantic search
2.  Browse models and collections
3.  Get detailed model information and versions

Predictions:

4.  Create predictions with text or structured input
5.  Track prediction status
6.  Cancel running predictions
7.  List your recent predictions

Image Handling:

8.  View generated images in your browser
9.  Manage image cache for better performance

Model Tools:

10. `search_models`: Find models using semantic search
11. `list_models`: Browse available models
12. `get_model`: Get details about a specific model
13. `list_collections`: Browse model collections
14. `get_collection`: Get details about a specific collection

Prediction Tools:

15. `create_prediction`: Run a model with your inputs
16. `get_prediction`: Check a prediction's status
17. `cancel_prediction`: Stop a running prediction
18. `list_predictions`: See your recent predictions

Image Tools:

19. `view_image`: Open an image in your browser
20. `clear_image_cache`: Clean up cached images
21. `get_image_cache_stats`: Check cache usage
