imagen-server
If you are the rightful owner of imagen-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
Imagen MCP Server is a TypeScript-based server that utilizes the SiliconFlow API for generating high-quality images, offering seamless integration with Claude Desktop and cross-platform support.
Imagen MCP Server
A TypeScript-based image generation MCP server using SiliconFlow API for image generation.
一个基于 TypeScript 的图像生成 MCP 服务器,使用 SiliconFlow API 进行图像生成。
Features
- 🎨 Generate high-quality images using SiliconFlow API
- 🔧 Support customizable generation parameters (prompts, image sizes)
- 🚀 Perfect integration with Claude Desktop
- 💻 Cross-platform support (Windows, MacOS)
功能特点
- 🎨 使用 SiliconFlow API 生成高质量图像
- 🔧 支持自定义生成参数(如提示词、图像尺寸等)
- 🚀 与 Claude Desktop 完美集成
- 💻 跨平台支持 (Windows, MacOS)
Prerequisites
- Node.js >= 16.0.0
- npm >= 7.0.0
- SiliconFlow API Token
前置要求
- Node.js >= 16.0.0
- npm >= 7.0.0
- SiliconFlow API Token
Installation
- Clone the repository:
git clone https://github.com/zym9863/imagen-server.git
cd imagen-server
- Install dependencies:
npm install
- Build the project:
npm run build
- Set environment variables:
export SILICONFLOW_API_TOKEN=your_api_token_here # Linux/MacOS
set SILICONFLOW_API_TOKEN=your_api_token_here # Windows
安装
- 克隆仓库:
git clone https://github.com/zym9863/imagen-server.git
cd imagen-server
- 安装依赖:
npm install
- 构建项目:
npm run build
- 设置环境变量:
export SILICONFLOW_API_TOKEN=your_api_token_here # Linux/MacOS
set SILICONFLOW_API_TOKEN=your_api_token_here # Windows
Configuration
To use with Claude Desktop, add the server configuration:
- MacOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:
%APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"imagen": {
"command": "/path/to/imagen/build/index.js"
}
}
}
配置
要与 Claude Desktop 一起使用,请添加服务器配置:
- MacOS:
~/Library/Application Support/Claude/claude_desktop_config.json
- Windows:
%APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"imagen": {
"command": "/path/to/imagen/build/index.js"
}
}
}
Usage
The server provides the following tools:
generate_image
Generate and save images locally:
- Required parameter:
prompt
(generation prompt) - Optional parameter:
image_size
(image size, supports "720x1280", "1280x720", or "1024x1024", default is "1024x1024")
Generated images are saved to the system temporary directory (os.tmpdir()/imagen-cache/
).
使用方法
服务器提供以下工具:
generate_image
生成图像并保存到本地:
- 必需参数:
prompt
(生成提示词) - 可选参数:
image_size
(图像尺寸,支持 "720x1280"、"1280x720" 或 "1024x1024",默认为 "1024x1024")
生成的图像保存在系统临时目录(os.tmpdir()/imagen-cache/
)中。
Development
Development mode (auto-rebuild):
npm run watch
Debugging
Since MCP servers communicate via stdio, debugging can be challenging. We recommend using MCP Inspector:
npm run inspector
Inspector will provide a URL to access the debugging tools in your browser.
开发
开发模式(自动重新构建):
npm run watch
调试
由于 MCP 服务器通过 stdio 通信,调试可能具有挑战性。我们推荐使用 MCP Inspector:
npm run inspector
Inspector 将提供一个 URL,用于在浏览器中访问调试工具。
Contributing
Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.
贡献
欢迎提交 Pull Requests!对于重大更改,请先开 issue 讨论您想要更改的内容。
License
许可证
Acknowledgments
- SiliconFlow API - Image generation service provider (using model: black-forest-labs/FLUX.1-dev)
- Model Context Protocol - MCP SDK support
致谢
- SiliconFlow API - 提供图像生成服务(使用模型:black-forest-labs/FLUX.1-dev)
- Model Context Protocol - MCP SDK 支持