首页
学习
活动
专区
圈层
工具
发布
MCP广场 >详情页
MCP图像生成器2026-10-23663分享添加福利群:解决AI开发者的「MCP实战痛点」
一个模型上下文协议服务器,通过 Together AI 使用 Flux.1 Schnell 模型生成高质量图像,允许用户通过可自定义尺寸的文本提示创建图像。
By sarthakkimtani
2026-10-23663
github
详情内容

图像生成 MCP 服务器

一个模型上下文协议 (MCP) 服务器,通过 Together AI 实现无缝生成高质量图像。该服务器提供了一个标准化接口来指定图像生成参数。

图像生成服务器 MCP 服务器

功能

  • 由 Flux.1 Schnell 模型驱动的高质量图像生成
  • 支持自定义尺寸(宽度和高度)
  • 清晰的错误处理,用于提示验证和 API 问题
  • 与支持 MCP 的客户端轻松集成

安装

Claude 桌面版

  • 在 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>"
      }
    }
  }
}

可用工具

该服务器实现了一个工具:

generate_image

根据给定的文本提示和可选尺寸生成图像。

输入模式:

{
  "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
  • mcp

贡献

欢迎贡献!请按照以下步骤进行贡献:

  1. 分叉仓库
  2. 创建新分支 (feature/my-new-feature)
  3. 提交您的更改
  4. 将分支推送到您的分叉
  5. 打开拉取请求

对于重大更改,请先打开一个问题以讨论您提议的更改。

许可证

该项目根据 MIT 许可证许可。有关详细信息,请参阅 LICENSE 文件。

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档