mcp-replicate mcp

v1.0.0 · MCP Tool · ai · registry.pascalai.org

Replicate.com — run AI models (image generation, LLM, audio, video) via cloud API. Operations: run (run a model synchronously), predict (start async prediction), get (get prediction status/result), cancel (cancel prediction), list (list predictions), search (search models), model_info (get model details). Requires API key.

replicateaimodelsinferencecloud

Input Parameters

ParameterTypeDescription
operationrequired string run: sync run a model; predict: start async; get: get prediction result; cancel: cancel prediction; list: list predictions; search: search models; model_info: get model details. One of: run, predict, get, cancel, list, search, model_info.
apiKeyrequired string Replicate API token.
modeloptional string Model in format 'owner/name' (e.g. stability-ai/stable-diffusion). Required for run, predict, model_info.
versionoptional string Specific model version hash. If omitted, uses latest.
inputoptional string JSON object with model input parameters (e.g. {"prompt":"a cat"}).
predIdoptional string Prediction ID for get and cancel operations.
webhookoptional string Webhook URL to receive prediction results.
cursoroptional string Pagination cursor for list.
searchoptional string Search query for search operation.
limitoptional integer Max results for list/search (default: 10). Default: 10.
maxWaitoptional integer Max seconds to wait for run to complete (default: 120). Default: 120.

Output Fields

FieldTypeDescription
output any Model output (type depends on model)
status string
id string
models array[object]
error string

Examples

Generate an image with Stable Diffusion

// Input
{
  "operation": "run",
  "apiKey": "your-key",
  "model": "stability-ai/stable-diffusion",
  "input": "{\"prompt\":\"a sunset over mountains\"}"
}

// Output
{
  "output": [
    "https://replicate.delivery/...image.png"
  ]
}

Install & Discovery

Install

ppm install mcp-replicate

Get JSON Schema

GET /v1/packages/mcp-replicate/1.0.0/schema

Discover by keyword

GET /v1/mcp/discover?q=replicate
Discovery hint: Install with ppm install mcp-replicate or invoke remotely via POST /v1/invoke/mcp-replicate on the MCP Service.

PascalAI Usage

uses toolslib;
var Tool := LoadTool('mcp-replicate');
var R := Tool.Call(JsonObj(['operation','run','apiKey','r8_xxx','model','stability-ai/stable-diffusion','input','{"prompt":"sunset"}']));
Writeln(R.ToJSON);