
MCP Server Replicate
一个 FastMCP 服务器实现,它促进对 AI 模型推理的基于资源的访问,重点是通过 Replicate API 进行图像生成,并具有实时更新、Webhook 集成和安全 API 密钥管理等功能。
Tools
generate_image
Generate an image using the specified parameters.
list_models
List available models on Replicate with optional filtering by owner.
search_models
Search for models using semantic search.
list_collections
List available model collections on Replicate.
get_collection_details
Get detailed information about a specific collection.
list_hardware
List available hardware options for running models.
list_templates
List all available templates with their schemas.
validate_template_parameters
Validate parameters against a template schema.
create_prediction
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
get_prediction
Get the status and results of a prediction.
cancel_prediction
Cancel a running prediction.
get_webhook_secret
Get the signing secret for verifying webhook requests.
verify_webhook
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
search_available_models
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
get_model_details
Get detailed information about a specific model. Args: model_id: Model identifier in format owner/name Returns: Detailed model information
subscribe_to_generation
Handle resource subscription requests.
unsubscribe_from_generation
Handle resource unsubscribe requests.
open_image_with_system
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
README
MCP Server Replicate
一个用于 Replicate API 的 FastMCP 服务器实现,提供基于资源的 AI 模型推理访问,重点是图像生成。
<a href="https://glama.ai/mcp/servers/r830bzsk7r"><img width="380" height="200" src="https://glama.ai/mcp/servers/r830bzsk7r/badge" alt="Server Replicate MCP server" /></a>
特性
- 🖼️ 基于资源的图像生成和管理
- 🔄 通过订阅进行实时更新
- 📝 模板驱动的参数配置
- 🔍 全面的模型发现和选择
- 🪝 用于外部通知的 Webhook 集成
- 🎨 用于优化结果的质量和风格预设
- 📊 进度跟踪和状态监控
- 🔒 安全的 API 密钥管理
可用提示词
该服务器为不同的任务提供了一些专门的提示词:
文本到图像 (主要)
我们经过最彻底测试和最强大的提示词。 针对从文本描述生成高质量图像进行了优化,具有:
- 详细的风格控制
- 质量预设(草稿、平衡、质量、极致)
- 尺寸和宽高比自定义
- 进度跟踪和实时更新
示例:
Create a photorealistic mountain landscape at sunset with snow-capped peaks, quality level: quality, style: photorealistic
其他提示词
- 图像到图像: 转换现有图像 (即将推出)
- 模型选择: 获取选择适合您任务的模型的帮助
- 参数帮助: 了解和配置模型参数
前提条件
- Python 3.11 或更高版本
- 一个 Replicate API 密钥 (在 https://replicate.com/account 获取)
- 用于依赖管理的 UV
安装
通过 Smithery 安装
要通过 Smithery 为 Claude Desktop 自动安装 MCP Server Replicate:
npx -y @smithery/cli install @gerred/mcp-server-replicate --client claude
手动安装
您可以直接从 PyPI 安装该软件包:
# 使用 UV (推荐)
uv pip install mcp-server-replicate
# 使用 UVX 进行隔离环境
uvx install mcp-server-replicate
# 使用 pip
pip install mcp-server-replicate
Claude Desktop 集成
- 确保您已安装最新版本的 Claude Desktop
- 打开您的 Claude Desktop 配置:
# macOS
code ~/Library/Application\ Support/Claude/claude_desktop_config.json
# Windows
code %APPDATA%\Claude\claude_desktop_config.json
- 使用以下选项之一添加服务器配置:
{
"globalShortcut": "Shift+Alt+A",
"mcpServers": {
"replicate": {
"command": "uv",
"args": ["tool", "run", "mcp-server-replicate"],
"env": {
"REPLICATE_API_TOKEN": "APITOKEN"
},
"cwd": "$PATH_TO_REPO"
}
}
}
- 设置您的 Replicate API 密钥:
# 选项 1:在您的环境中设置
export REPLICATE_API_TOKEN=your_api_key_here
# 选项 2:在您的主目录中创建一个 .env 文件
echo "REPLICATE_API_TOKEN=your_api_key_here" > ~/.env
- 完全重启 Claude Desktop
您现在应该在 Claude Desktop 中看到 🔨 图标,表明 MCP 服务器可用。
用法
连接到 Claude Desktop 后,您可以:
-
使用自然语言生成图像:
Create a photorealistic mountain landscape at sunset with snow-capped peaks
-
浏览您的生成:
Show me my recent image generations
-
搜索生成:
Find my landscape generations
-
检查生成状态:
What's the status of my last generation?
故障排除
服务器未在 Claude Desktop 中显示
- 检查 Claude Desktop 日志:
tail -n 20 -f ~/Library/Logs/Claude/mcp*.log
- 验证您的配置:
- 确保
claude_desktop_config.json
中的路径是绝对路径 - 确保 UV 已安装并在您的 PATH 中
- 检查您的 Replicate API 密钥是否已设置
- 尝试重启 Claude Desktop
有关更详细的故障排除,请参阅我们的 调试指南。
文档
开发
- 克隆存储库:
git clone https://github.com/gerred/mcp-server-replicate.git
cd mcp-server-replicate
- 安装开发依赖项:
uv pip install --system ".[dev]"
- 安装 pre-commit 钩子:
pre-commit install
- 运行测试:
pytest
贡献
欢迎贡献! 请参阅我们的 贡献指南 了解详情。
许可证
该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅 LICENSE 文件。
推荐服务器

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 模型以安全和受控的方式获取实时的网络信息。