Together AI 图像服务器
English |简体中文
基于 TypeScript 的 MCP(模型上下文协议)服务器,用于使用 Together AI API 生成图像。
概述
该服务器提供了一个简单的接口,可以通过 MCP 协议使用 Together AI 的图像生成模型生成图像。它允许 Claude 和其他兼容 MCP 的助手根据文本提示生成图像。
特征
工具
generate_image
- 根据文本提示生成图像- 将文本提示作为必需参数
- 用于控制生成步骤和图像数量的可选参数
- 返回生成图像的 URL 和本地路径
先决条件
- Node.js(建议使用 v14 或更高版本)
- Together AI API 密钥
安装
配置
将您的 Together AI API 密钥设置为环境变量:
或者,您可以在项目根目录中创建一个.env
文件:
发展
构建服务器:
对于使用自动重建的开发:
与 Claude Desktop 一起使用
要与 Claude Desktop 一起使用,请添加服务器配置:
在 macOS 上: ~/Library/Application Support/Claude/claude_desktop_config.json
在 Windows 上: %APPDATA%/Claude/claude_desktop_config.json
将/path/to/together-ai-image-server
替换为安装的实际路径。
调试
由于 MCP 服务器通过 stdio 进行通信,调试起来可能比较困难。我们推荐使用MCP Inspector ,它以包脚本的形式提供:
检查器将提供一个 URL 来访问浏览器中的调试工具。
API 参考
生成图像
使用 Together AI 的图像生成 API 根据文本提示生成图像。
参数:
prompt
(字符串,必需):图像生成的文本提示steps
(数字,可选,默认值:4):扩散步骤数(1-4)n
(数字,可选,默认值:1):要生成的图像数量(1-4)
返回:
JSON 对象包含:
image_urls
:生成的图像的 URL 数组local_paths
:本地缓存图像的路径数组
执照
麻省理工学院
贡献
欢迎贡献代码!欢迎提交 Pull 请求。
You must be authenticated.
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.
Tools
MCP 服务器使 Claude 和其他兼容 MCP 的助手能够使用 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 MCP server that integrates with Cursor IDE to generate images based on text descriptions using JiMeng AI, allowing users to create and save custom images directly within their development environment.Last updated -82PythonMIT License
- AsecurityAlicenseAqualityAn MCP server implementation that integrates with Minimax API to provide AI-powered image generation and text-to-speech functionality in editors like Windsurf and Cursor.Last updated -21921JavaScriptMIT License
- AsecurityAlicenseAqualityAllows AI assistants to generate and transform high-quality images from text prompts using Google's Gemini model via the MCP protocol.Last updated -35PythonMIT License