Flux 图像 MCP 服务器
该 MCP 服务器使用 Replicate 上的 Flux Schnell 模型提供图像生成功能。
安装
全局安装 MCP SDK:
将此存储库克隆到您的 MCP 服务器目录:
构建服务器:
将服务器配置添加到您的 MCP 设置文件(全局或工作区):
配置
服务器需要以下环境变量:
REPLICATE_API_TOKEN
:您的 Replicate API 令牌。您可以从Replicate 帐户设置中获取此令牌。
用法
一旦安装并配置完毕,服务器将提供以下工具:
生成图像
根据文本提示,使用 Flux Schnell 模型生成图像。
参数:
prompt
(字符串,必需):所需图像的文本描述
使用示例:
该工具将返回包含以下内容的 JSON 响应:
status
:生成请求的状态output
:生成图像的 URL(如果成功)error
:任何错误消息(如果失败)
发展
要对服务器进行更改:
修改
src/index.ts
中的源代码重建服务器:
npm run build
重新启动 MCP 服务器以使更改生效
错误处理
该服务器包括针对以下方面的全面错误处理:
缺少 API 令牌
参数无效
API 请求失败
网络问题
安全
切勿将您的复制 API 令牌提交到版本控制
始终通过环境变量提供令牌
服务器在发出 API 请求之前验证所有输入参数
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
使用 Replicate 上的 Flux Schnell 模型提供图像生成功能,允许用户根据文本提示创建图像。
Related Resources
Related MCP Servers
- AsecurityFlicenseAqualityEnables users to generate images from text prompts using Replicate's model, with configurable parameters and full MCP protocol compliance.Last updated -1126
- AsecurityAlicenseAqualityA Model Context Protocol server that enables generation of high-quality images using the Flux.1 Schnell model via Together AI, allowing users to create images from text prompts with customizable dimensions.Last updated -115MIT License
- AsecurityFlicenseAqualityA Model Context Protocol server that generates images using Replicate's FLUX model and stores them in Cloudflare R2, allowing users to create images through simple prompts and retrieve accessible URLs.Last updated -110
- -securityAlicense-qualityA server that enables generating images through the Replicate API by calling the Flux Schnell model via the Model Context Protocol (MCP).Last updated -3MIT License