Back to MCP directory
publicPublicdnsLocal runtime

mcp-image-gen

基于Together AI的高质量图像生成MCP服务

article

README

🚀 图像生成 MCP 服务器

本项目是一个模型上下文协议(MCP)服务器,借助 Together AI 达成无缝且高质量的图像生成。它提供了标准化接口,可用于指定图像生成参数。

🚀 快速开始

本图像生成 MCP 服务器能助力你轻松实现高质量图像生成。你只需按照后续的安装步骤完成配置,即可使用标准化接口指定图像生成参数,开启图像生成之旅。

✨ 主要特性

  • 💎 使用 Flux.1 Schnell 模型实现高质量图像生成。
  • 📏 支持自定义维度(宽度和高度)。
  • 🚫 提供清晰的错误处理,用于提示验证和 API 问题。
  • 🔌 与 MCP 兼容客户端轻松集成。

📦 安装指南

Claude Desktop

  • 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": "生成图像的描述性提示(例如,'一个未来城市的天际线在日落时分'" 
  },
  "width": {
    "type": "integer",
    "description": "生成图像的宽度(以像素为单位)(可选)"
  },
  "height": {
    "type": "integer"
  }
}
help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client