Replicate Anywhere
An MCP server that enables AI assistants to search, discover, and run any model on Replicate.
README
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
Installation
Prerequisites
- Node.js 18+
- A Replicate API token
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:
- Call
search-modelswith query "flux" - Call
get-model-infoto get parameters for the best match - Call
run-modelwith appropriate parameters - 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:**

**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
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。