Gemini 图像处理服务
基于 Google Gemini 的图像生成与编辑服务,通过 MCP 协议提供 AI 图像处理能力。
安装运行
- 安装依赖: 使用 uv pip install -r requirements.txt
- 设置环境变量: Linux/macOS: export GEMINI_API_KEY=your_api_key_here Windows: setx GEMINI_API_KEY "your_api_key_here"
主要功能
- 文本到图像生成 (generate_image)
- 图像编辑与修改 (edit_image)
- 支持 PNG 格式和自动路径管理
配置
在 mcp.json 中添加服务配置: { "mcpServers": { "gemini-image-mcp-server": { "command": "uv", "args": [ "--directory", "/ABSOLUTE/PATH/TO/PARENT/FOLDER/", "run", "server.py" ] } } } 注意:确保替换绝对路径并设置 API 密钥。