Skip to main content
Glama
motionharvest

Replicate Anywhere

Replicate Anywhere

An MCP (Model Context Protocol) server that enables AI assistants to search, discover, and run any model on Replicate. No hardcoded model lists - just describe what you want and let the AI find and run the right model.

Features

  • πŸ” Smart Model Search - Find models by fuzzy name matching (e.g., "flux", "stable diffusion", "nano banana pro")

  • πŸ€– Automatic Model Discovery - AI searches first, asks questions later

  • πŸ“‹ Parameter Detection - Automatically retrieves and understands model input schemas

  • πŸ–ΌοΈ Inline Image Display - Image outputs are formatted as markdown for inline display

  • ⏱️ Async Prediction Handling - Long-running predictions return status URLs instead of timing out

  • βœ… Prediction Status Checking - Check on running predictions that haven't completed yet

Related MCP server: OpenRouter MCP Server

Installation

Prerequisites

NPM (Global)

npm install -g replicate-anywhere

From Source

git clone https://github.com/fifthseason-ai/replicate-anywhere.git
cd replicate-anywhere
npm install
npm run build

Configuration

Environment Variables

Variable

Required

Default

Description

REPLICATE_API_TOKEN

Yes

-

Your Replicate API token

MAX_POLL_TIME

No

300000

Maximum time (ms) to wait for predictions before returning async status

MCP Client Configuration

Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "replicate-anywhere": {
      "command": "npx",
      "args": ["-y", "replicate-anywhere"],
      "env": {
        "REPLICATE_API_TOKEN": "r8_your_token_here"
      }
    }
  }
}

LibreChat

Add to your librechat.yaml:

mcpServers:
  replicate-anywhere:
    type: stdio
    command: npx
    args:
      - -y
      - replicate-anywhere
    env:
      REPLICATE_API_TOKEN: "${REPLICATE_API_TOKEN}"

Docker

services:
  replicate-anywhere:
    build:
      context: ./replicate-anywhere
    environment:
      REPLICATE_API_TOKEN: ${REPLICATE_API_TOKEN}

Tools

search-models

Search for AI models on Replicate by name or description. This tool is designed to be called first when a user mentions any model name.

{
  "query": "flux pro"
}

get-model-info

Get detailed information about a specific model, including its input parameters schema.

{
  "owner": "black-forest-labs",
  "name": "flux-pro"
}

run-model

Run a prediction on any Replicate model.

{
  "model": "black-forest-labs/flux-pro",
  "input": {
    "prompt": "A beautiful sunset over mountains",
    "aspect_ratio": "16:9"
  }
}

list-models

List public models on Replicate (paginated).

{
  "cursor": "optional_pagination_cursor"
}

check-prediction

Check the status of a running prediction.

{
  "prediction_id": "abc123xyz"
}

Usage Examples

Generate an Image

User: "Generate an image of a cat wearing a space helmet using flux"

The AI will:

  1. Call search-models with query "flux"

  2. Call get-model-info to get parameters for the best match

  3. Call run-model with appropriate parameters

  4. Return the image inline (markdown formatted)

Use a Specific Model

User: "Use stable diffusion xl to create a cyberpunk cityscape"

The AI will search for "stable diffusion xl", find stability-ai/sdxl, and run it.

Check a Long-Running Prediction

User: "Check on my prediction abc123"

The AI will call check-prediction to get the current status and output if complete.

Output Formatting

Images

When a model returns image URLs, the output is automatically formatted as markdown:

**Generated Image:**

![Generated Image](https://replicate.delivery/...)

**Direct link:** https://replicate.delivery/...

Other Outputs

Non-image outputs are returned as JSON.

Development

# Install dependencies
npm install

# Build
npm run build

# Watch mode
npm run dev

# Run locally
REPLICATE_API_TOKEN=your_token npm start

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   AI Assistant  │────▢│ replicate-anywhere│────▢│  Replicate API  β”‚
β”‚  (Claude, etc.) │◀────│    MCP Server    │◀────│                 β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

The server acts as a bridge between MCP-compatible AI assistants and the Replicate API, providing:

  • Tool definitions that guide the AI on how to search and run models

  • Smart response formatting for different output types

  • Timeout handling for long-running predictions

License

MIT

Contributing

Contributions are welcome! Please open an issue or submit a pull request.

Credits

Built by Aaron Sherrill

Available Tools

5 tools
check-predictionA

Check the status of a running prediction. Use this if a previous run-model call returned a prediction_id with status "processing".

ParametersJSON Schema
NameRequiredDescriptionDefault
prediction_idYesThe prediction ID returned from a previous run-model call

TDQS

A3.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full responsibility for behavioral disclosure. It only says 'check the status' but does not clarify if the operation is read-only, whether it can be called repeatedly, or what the response format contains. Lack of side-effect information and return details leaves a transparency gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, front-loaded with the purpose, and contains no fluff. Every phrase earns its place, making it highly concise and easy to skim.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description should explain what the tool returns (e.g., status values like processing, completed, failed). It only covers the trigger condition but lacks return behavior details, making it somewhat incomplete for a simple tool that is otherwise straightforward.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%: the parameter 'prediction_id' is already described as returned from a previous run-model call. The description does not add extra semantics beyond the schema, so baseline of 3 applies.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Check' and the resource 'the status of a running prediction', which is specific and distinct from sibling tools like run-model, search-models, and list-models. It also includes the context of a prediction_id from a prior run-model call.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly states when to use the tool: after a run-model call returns a prediction_id with status 'processing'. This provides clear usage context, though it does not mention exclusions or alternative tools, but for this polling function the trigger condition is well-defined.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get-model-infoA

Get detailed information about a specific Replicate model including its input parameters schema. Call this AFTER search-models to get parameter details for the best matching model before running it.

ParametersJSON Schema
NameRequiredDescriptionDefault
nameYesThe name of the model from search results (e.g., "stable-diffusion", "flux-pro")
ownerYesThe owner/organization of the model from search results (e.g., "stability-ai", "black-forest-labs")

TDQS

A4.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are present, so the description carries the full burden. It discloses that the tool returns detailed information and the input parameters schema, and that it is a prerequisite step before running a model. However, it does not describe response structure or error behavior, leaving some gaps for a no-annotation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with purpose, then workflow. Every word earns its place; no redundancy or fluff.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema and no annotations, the description provides enough context for a simple lookup tool: what it does, when to call it, and how parameters relate to search results. It could mention return format more explicitly, but the phrase 'detailed information' and 'input parameters schema' gives a reasonable picture.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already covers both parameters with descriptions at 100% coverage. The description adds valuable context by explaining that these values come from search results and are used to get details for the best matching model, reinforcing the workflow and data provenance.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states a specific action ('Get detailed information about a specific Replicate model') and a specific resource ('including its input parameters schema'). It distinguishes itself from siblings by emphasizing per-model detail rather than listing or running models.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explicit usage guidance is provided: 'Call this AFTER search-models' and 'before running it.' This positions the tool in a clear workflow relative to search-models and run-model, which are sibling tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list-modelsA

List public models on Replicate. Use search-models instead when the user mentions a specific model name - this tool is only for browsing all available models without a specific query.

ParametersJSON Schema
NameRequiredDescriptionDefault
cursorNoCursor for pagination (from previous response)

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description bears the full burden. It states the tool lists public models and is for browsing, which implies a read-only operation, but it does not disclose pagination behavior, authentication requirements, or response structure. This is minimally adequate but has notable gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences with zero fluff. It front-loads the purpose and immediately provides usage guidance, making it highly efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple with one optional parameter and no output schema. The description effectively covers purpose and usage differentiation, but it omits any mention of pagination workflow, which is partially covered by the schema's cursor description. This is a minor gap, but overall the description is adequate for the tool's simplicity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description covers 100% of the single parameter (cursor) with a clear explanation. The tool description adds no additional parameter semantics beyond what the schema already provides, so the baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function with a specific verb ('List') and resource ('public models on Replicate'). It also distinguishes itself from the sibling tool search-models, making its purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit guidance on when to use this tool versus alternatives, stating 'Use search-models instead when the user mentions a specific model name' and clarifying that this tool is for browsing without a specific query.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

run-modelA

Run a prediction on any Replicate model. WORKFLOW: If the user provides a fuzzy model name, first call search-models to find the exact model identifier, then call get-model-info to understand required parameters, then call this tool.

ParametersJSON Schema
NameRequiredDescriptionDefault
inputYesInput parameters for the model. The required parameters depend on the specific model - use get-model-info to see what parameters are needed.
modelYesModel identifier in format "owner/name" or "owner/name:version" (e.g., "stability-ai/stable-diffusion", "black-forest-labs/flux-pro"). Must be an exact identifier from search-models results.

TDQS

A3.8/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden of behavioral disclosure. It does not mention that predictions are typically asynchronous, that running a model may incur costs or take significant time, or that the response will be a prediction object rather than the final result. This is a significant gap given the dynamic nature of Replicate models.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences, with the main purpose front-loaded and the workflow compactly stated. No wasted words; every sentence contributes actionable guidance.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

This tool has high complexity (dynamic input schema, external dependencies on get-model-info) and no output schema. The description does not explain what the tool returns or how the agent should handle the prediction lifecycle, such as polling with check-prediction. This leaves a critical gap for a multi-step workflow.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already provides detailed descriptions for both parameters, including the model identifier format and the instruction to use get-model-info for input parameters. Since schema coverage is 100%, the description adds little beyond reiterating the workflow, which is also embedded in the schema. Baseline of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb and resource: "Run a prediction on any Replicate model." This clearly states what the tool does and distinguishes it from siblings like search-models, get-model-info, and check-prediction by focusing on the action of running the prediction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly provides a workflow: if the model name is fuzzy, call search-models first, then get-model-info, then this tool. This gives clear when-to-use guidance and names the alternative tools, making it easy for an agent to sequence correctly.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search-modelsA

IMPORTANT: This tool MUST be called FIRST before asking any clarifying questions about model names. When a user mentions ANY model name (exact, fuzzy, or incomplete like "flux", "stable diffusion", "nano banana pro"), immediately search for it. Do NOT ask the user to confirm model names - search first, then pick the best match from results based on name similarity and run count. Only ask for clarification if the search returns zero results.

ParametersJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query - can be a model name, description, or capability (e.g., "image generation", "flux pro", "stable diffusion xl", "nano banana"). Use the exact text the user provided.

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description must carry the full burden. It discloses the intended agent behavior (search first, then pick best match) but does not explicitly state that the tool is read-only, describe the result format, or mention any potential side effects. The lack of a return value description is a notable gap.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, dense paragraph with an IMPORTANT warning up front. It is concise and every sentence contributes directly to the tool's usage. The heavy use of emphasis and multiple clauses makes it slightly less scannable, but it remains appropriately sized.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has one parameter, no annotations, and no output schema, the description is moderately complete. It explains when and how to use it but fails to describe what the results look like (e.g., fields, match quality, run count) or how many results are returned. This leaves some ambiguity for the agent when interpreting the response.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already covers the single parameter with a description and examples (100% coverage). The description adds a useful instruction: 'Use the exact text the user provided.' This supplements the schema by clarifying the expected input source and format.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool is for searching models, with a specific verb ('search') and resource ('models'). It also distinguishes from siblings by explicitly directing that this tool MUST be called first before any clarifying questions, positioning it as the initial lookup step.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit when-to-use guidance: call this tool whenever a user mentions any model name, including fuzzy matches. It also gives exclusions: do not ask for confirmation before searching, and only ask for clarification if zero results. This effectively preempts common agent missteps.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 5 tool updatesv1.0.0
    • First observedcheck-prediction
    • First observedget-model-info
    • First observedlist-models
    • First observedrun-model
    • First observedsearch-models

TDQS

A4.2/5.0
Disambiguation5/5

Each tool has a distinct role in the model-running workflow: search vs browse, get info, run, and check status. There is no overlap between search-models and list-models because the former is for specific queries and the latter for browsing.

Naming Consistency5/5

All tool names use a consistent verb_noun pattern in snake_case: search-models, get-model-info, run-model, list-models, check-prediction. This makes the API predictable and easy to navigate.

Tool Count5/5

With 5 tools, the server is well-scoped for its purpose of running Replicate models. Each tool covers a necessary step in the workflow without unnecessary bloat.

Completeness4/5

The core lifecycle of searching, inspecting, running, and checking predictions is fully covered. A minor gap is the lack of a cancel-prediction tool, but this is not essential for the primary workflow.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    An MCP server that enables AI applications to access 20+ model providers (including OpenAI, Anthropic, Google) through a unified interface for text and image generation.
    2
    30
    MIT
  • F
    license
    A
    quality
    C
    maintenance
    An MCP server for discovering and querying over 300 AI models available on OpenRouter. It enables users to list, search, filter, compare, and get detailed information about models with pricing, context limits, and capabilities.
    5
    1
    -
  • A
    license
    Not graded
    quality
    B
    maintenance
    A plugin-based MCP server that enables AI assistants to interact with external systems through custom tools, resources, and prompts.
    4
    AGPL 3.0

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/motionharvest/replicate-anywhere'

If you have feedback or need assistance with the MCP directory API, please join our Discord server