图像生成 MCP 服务器
模型上下文协议 (MCP) 服务器,可通过 Together AI 无缝生成高质量图像。该服务器提供标准化接口来指定图像生成参数。
特征
由 Flux.1 Schnell 模型提供支持的高质量图像生成
支持自定义尺寸(宽度和高度)
清除提示验证和 API 问题的错误处理
轻松与 MCP 兼容客户端集成
Related MCP server: Image Generation MCP Server
安装
克劳德桌面
在 MacOS 上:
~/Library/Application\ Support/Claude/claude_desktop_config.json在 Windows 上:
%APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"image-gen": {
"command": "uv",
"args": ["--directory", "/ABSOLUTE/PATH/TO/image-gen/", "run", "image-gen"],
"env": {
"TOGETHER_AI_API_KEY": "<API KEY>"
}
}
}
}可用工具
服务器实现了一个工具:
生成图像
根据给定的文本提示和可选尺寸生成图像。
输入模式:
{
"prompt": {
"type": "string",
"description": "A descriptive prompt for generating the image (e.g., 'a futuristic cityscape at sunset')"
},
"width": {
"type": "integer",
"description": "Width of the generated image in pixels (optional)"
},
"height": {
"type": "integer",
"description": "Height of the generated image in pixels (optional)"
},
"model": {
"type": "string",
"description": "The exact model name as it appears in Together AI. If incorrect, it will fallback to the default model (black-forest-labs/FLUX.1-schnell)."
}
}先决条件
Python 3.12 或更高版本
httpx
甲基氯丙烯
贡献
欢迎贡献!请按以下步骤进行贡献:
分叉存储库
创建新分支 (
feature/my-new-feature)提交你的更改
将树枝推到你的叉子上
打开拉取请求
对于重大更改,请先打开问题来讨论您提议的更改。
执照
本项目遵循 MIT 许可证。详情请参阅 LICENSE 文件。
Resources
Looking for Admin?
Admins can modify the Dockerfile, update the server description, and track usage metrics. If you are the server author, to access the admin panel.