MCP 图像生成器
一个模型上下文协议 (MCP) 服务器,用于使用 Together AI 的图像生成模型生成图像。此 MCP 服务器可以在本地运行,也可以使用 SSE 端点运行。MCP 图像生成器需要一个提供程序,目前仅支持“Replicate”和“Together”。您需要设置TOGETHER_API_KEY
或REPLICATE_API_TOKEN
环境变量,并将PROVIDER
环境变量设置为“replicate”或“together”。
SSE 端点(Docker 环境)
克隆存储库
构建并运行 Docker 容器
使用 MCP 客户端进行配置
将url
调整为您要使用的 MCP 服务器的端点。 provider
可以是“replicate”或“together”。
使用 stdio 在本地运行
先决条件
- Node.js
- Together AI API 密钥或复制 API 令牌
安装
- 克隆存储库:
- 安装依赖项:
配置
为您的 MCP 客户端创建一个配置文件。以下是示例配置:
将/path/to/mcp-imagegen
替换为克隆存储库的绝对路径,并将your-replicate-api-token
替换为实际的复制 API 令牌。
用法
MCP 图像生成器提供了一个名为generate_image
的工具,可用于根据文本提示生成图像。
工具:generate_image
根据提供的提示生成图像。
参数:
prompt
(字符串):生成图像的文本提示width
(数字,可选):要生成的图像的宽度(默认值:512)height
(数字,可选):要生成的图像的高度(默认值:512)numberOfImages
(数字,可选):要生成的图像数量(默认值:1)
环境变量
PROVIDER
:用于图像生成的提供程序(默认值:“replicate”)REPLICATE_API_TOKEN
:您的复制 API 令牌TOGETHER_API_KEY
:您的 Together AI API 密钥MODEL_NAME
:用于图像生成的模型(默认值:“black-forest-labs/flux-schnell”)
执照
麻省理工学院
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
使用 Together.ai 生成并返回图像
Related Resources
Related MCP Servers
- AsecurityAlicenseAqualityEnables the generation of images using Together AI's models through an MCP server, supporting customizable parameters such as model selection, image dimensions, and output directory.Last updated -14JavaScriptMIT License
- -securityAlicense-qualityA server that integrates Flux's advanced image generation and manipulation features into AI coding assistants, enabling seamless text-to-image and image control workflows in IDEs like Cursor and Windsurf.Last updated -410PythonMIT License
- AsecurityAlicenseAqualityA Model Context Protocol server that enables high-quality image generation using the Flux.1 Schnell model via Together AI with customizable parameters.Last updated -1298JavaScriptMIT License
- AsecurityAlicenseAqualityA MCP server that enables Claude and other MCP-compatible assistants to generate images from text prompts using Together AI's image generation models.Last updated -12TypeScriptMIT License