Skip to main content
Glama
MCP Server Replicate

MCP Server Replicate

by gerred

MCP サーバー複製

Pythonバージョン ライセンス コードスタイル 型チェッカー ラフ PyPIバージョン 鍛冶屋のバッジ

Replicate API 用の FastMCP サーバー実装。画像生成に重点を置いた AI モデル推論へのリソースベースのアクセスを提供します。

特徴

  • 🖼️ リソースベースの画像生成と管理

  • 🔄 サブスクリプションによるリアルタイム更新

  • 📝 テンプレート駆動型パラメータ設定

  • 🔍 包括的なモデルの発見と選択

  • 🪝 外部通知のためのWebhook統合

  • 🎨 最適な結果を得るための品質とスタイルのプリセット

  • 📊 進捗状況の追跡とステータスの監視

  • 🔒 安全なAPIキー管理

Related MCP server: MCP Server for Replicate

利用可能なプロンプト

サーバーは、さまざまなタスクに対していくつかの特殊なプロンプトを提供します。

テキストから画像へ(プライマリ)

徹底的にテストされた堅牢なプロンプト。以下の機能により、テキストの説明から高品質な画像を生成するために最適化されています。

  • 詳細なスタイルコントロール

  • 品質プリセット(ドラフト、バランス、品質、エクストリーム)

  • サイズとアスペクト比のカスタマイズ

  • 進捗状況の追跡とリアルタイム更新

例:

Create a photorealistic mountain landscape at sunset with snow-capped peaks, quality level: quality, style: photorealistic

その他のプロンプト

  • 画像から画像へ:既存の画像を変換します(近日公開予定)

  • モデルの選択: タスクに適したモデルの選択を支援します

  • パラメータヘルプ: モデルパラメータを理解して設定する

前提条件

インストール

Smithery経由でインストール

Smithery経由で Claude Desktop 用の MCP Server Replicate を自動的にインストールするには:

npx -y @smithery/cli install @gerred/mcp-server-replicate --client claude

手動でインストールする

PyPI から直接パッケージをインストールできます。

# Using UV (recommended)
uv pip install mcp-server-replicate

# Using UVX for isolated environments
uvx install mcp-server-replicate

# Using pip
pip install mcp-server-replicate

クロードデスクトップ統合

  1. Claude Desktopの最新バージョンがインストールされていることを確認してください

  2. Claude デスクトップ構成を開きます。

# macOS
code ~/Library/Application\ Support/Claude/claude_desktop_config.json

# Windows
code %APPDATA%\Claude\claude_desktop_config.json
  1. 次のいずれかのオプションを使用してサーバー構成を追加します。

{
  "globalShortcut": "Shift+Alt+A",
  "mcpServers": {
    "replicate": {
      "command": "uv",
      "args": ["tool", "run", "mcp-server-replicate"],
      "env": {
        "REPLICATE_API_TOKEN": "APITOKEN"
      },
      "cwd": "$PATH_TO_REPO"
    }
  }
}
  1. レプリケート API キーを設定します。

# Option 1: Set in your environment
export REPLICATE_API_TOKEN=your_api_key_here

# Option 2: Create a .env file in your home directory
echo "REPLICATE_API_TOKEN=your_api_key_here" > ~/.env
  1. Claude Desktopを完全に再起動します

Claude Desktop に 🔨 アイコンが表示され、MCP サーバーが利用可能であることがわかります。

使用法

Claude Desktop に接続すると、次のことが可能になります。

  1. 自然言語で画像を生成します:

    Create a photorealistic mountain landscape at sunset with snow-capped peaks
  2. 世代を閲覧する:

    Show me my recent image generations
  3. 世代別に検索:

    Find my landscape generations
  4. 生成ステータスを確認します:

    What's the status of my last generation?

トラブルシューティング

Claude Desktop にサーバーが表示されない

  1. Claude Desktop のログを確認します。

tail -n 20 -f ~/Library/Logs/Claude/mcp*.log
  1. 設定を確認します。

  • claude_desktop_config.jsonのパスが絶対パスであることを確認してください

  • UVがインストールされ、PATHに含まれていることを確認してください

  • レプリケートAPIキーが設定されていることを確認してください

  1. Claude Desktopを再起動してみてください

より詳細なトラブルシューティングについては、デバッグ ガイドを参照してください。

ドキュメント

発達

  1. リポジトリをクローンします。

git clone https://github.com/gerred/mcp-server-replicate.git
cd mcp-server-replicate
  1. 開発依存関係をインストールします。

uv pip install --system ".[dev]"
  1. 事前コミットフックをインストールします。

pre-commit install
  1. テストを実行します:

pytest

貢献

貢献を歓迎します!詳細については貢献ガイドをご覧ください。

ライセンス

このプロジェクトは MIT ライセンスに基づいてライセンスされています - 詳細についてはLICENSEファイルを参照してください。

Available Tools

18 tools
cancel_predictionC

Cancel a running prediction.

Inputs: prediction_id (required).

create_predictionC

Create a new prediction using a specific model version on Replicate.

    Args:
        input: Model input parameters including version or model details
        confirmed: Whether the user has explicitly confirmed the generation

    Returns:
        Prediction details if confirmed, or a confirmation request if not
    

Inputs: input (required), confirmed.

generate_imageC

Generate an image using the specified parameters.

Inputs: prompt (required), style, quality, width, +3 more.

get_collection_detailsC

Get detailed information about a specific collection.

Inputs: collection_slug (required).

get_model_detailsC

Get detailed information about a specific model.

    Args:
        model_id: Model identifier in format owner/name

    Returns:
        Detailed model information
    

Inputs: model_id (required).

get_predictionC

Get the status and results of a prediction.

Inputs: prediction_id (required), wait, max_retries.

get_webhook_secretA

Get the signing secret for verifying webhook requests.

Inputs: no named parameters.

list_collectionsB

List available model collections on Replicate.

Inputs: no named parameters.

list_hardwareB

List available hardware options for running models.

Inputs: no named parameters.

list_modelsC

List available models on Replicate with optional filtering by owner.

Inputs: owner.

list_templatesB

List all available templates with their schemas.

Inputs: no named parameters.

open_image_with_systemB

Open an image URL with the system's default application.

    Args:
        image_url: URL of the image to open

    Returns:
        Dict containing status of the operation
    

Inputs: image_url (required).

search_available_modelsB

Search for available models matching the query.

    Args:
        query: Search query describing the desired model
        style: Optional style to filter by

    Returns:
        List of matching models with scores
    

Inputs: query (required), style.

search_modelsC

Search for models using semantic search.

Inputs: query (required).

subscribe_to_generationD

Handle resource subscription requests.

Inputs: request (required).

unsubscribe_from_generationC

Handle resource unsubscribe requests.

Inputs: request (required).

validate_template_parametersC

Validate parameters against a template schema.

Inputs: input (required).

verify_webhookA

Verify that a webhook request came from Replicate using HMAC-SHA256.

    Args:
        payload: The webhook payload to verify
        signature: The signature from the X-Replicate-Signature header
        secret: The webhook signing secret from get_webhook_secret

    Returns:
        True if signature is valid, False otherwise
    

Inputs: payload (required), signature (required), secret (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    C2.9/5.0

    Scored across 18 tools

    Disambiguation4/5

    Most tools have distinct purposes, but there is some overlap between 'search_available_models' and 'search_models' that could cause confusion, as both involve searching for models. The descriptions help differentiate them slightly, but the boundaries are not entirely clear.

    Naming Consistency5/5

    Tool names follow a consistent snake_case pattern with clear verb_noun structures throughout, such as 'create_prediction', 'get_model_details', and 'list_collections'. There are no deviations in naming conventions, making the set predictable and readable.

    Tool Count3/5

    With 18 tools, the count is borderline high for a server focused on Replicate's AI model platform. While it covers various aspects like predictions, models, and webhooks, it may feel slightly heavy and could benefit from consolidation to reduce complexity.

    Completeness4/5

    The tool set provides good coverage for the Replicate domain, including prediction lifecycle (create, get, cancel), model discovery (list, get, search), and webhook management. Minor gaps exist, such as missing tools for updating or deleting predictions or models, but agents can work around these with the available operations.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers