mcp-server-helios-gemini
v0.1.9
Published
MCP server for Helios Gemini image generation service
Maintainers
Readme
mcp-server-helios-gemini
MCP (Model Context Protocol) server for Helios Gemini image generation service powered by Google Gemini's gemini-2.5-flash-image model. This server allows Claude Desktop, Cherry Studio, and other MCP clients to generate and edit images using Gemini's powerful image generation capabilities.
✨ Features
- 🎨 Text-to-Image: Generate images from text descriptions
- 🖼️ Image-to-Image: Transform and edit existing images with text prompts
- 🚀 Fast: Powered by Gemini 2.5 Flash Image model
- 💾 Auto-save: Generated images automatically saved to local filesystem
- 🔄 Base64 Support: Handles image conversion seamlessly
Installation
npm install -g mcp-server-helios-geminiConfiguration
For Claude Desktop
Add to your Claude Desktop config file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"helios-gemini": {
"command": "mcp-server-helios-gemini",
"args": [],
"env": {
"NANANA_API_TOKEN": "your-api-token-here"
}
}
}
}For Cherry Studio
Add to Cherry Studio MCP settings:
{
"mcpServers": {
"helios-gemini": {
"command": "mcp-server-helios-gemini",
"args": [],
"env": {
"NANANA_API_TOKEN": "your-api-token-here"
}
}
}
}Get Your API Token
Visit i-helios.top to get your API token.
Available Tools
text_to_image
Generate an image from a text prompt.
Parameters:
prompt(string, required): The text description of the image to generate (max 1000 characters)
Returns:
Base64-encoded image data in markdown format
Example:
Generate an image of a cute cat wearing a hatimage_to_image
Transform existing images based on a text prompt.
Parameters:
imageUrls(array of strings, required): 1-9 image URLs or local file paths to transformprompt(string, required): The text description of how to transform the images
Returns:
Base64-encoded transformed image data
Examples:
# Using URL
Transform this image to look like oil paintings: ["https://example.com/image1.jpg"]
# Using local file path (NEW in v0.1.3!)
Edit this image to add a rainbow: ["D:\\AI\\image\\myimage.png"]
Edit this photo: ["/home/user/pictures/vacation.jpg"]Environment Variables
NANANA_API_TOKENorAPI_TOKEN(required): Your API token for the Helios Gemini serviceNANANA_API_URL(optional): Custom API base URL (default: https://i-helios.top)IMAGE_SAVE_PATHorHELIOS_IMAGE_PATH(optional): Custom directory path for saving generated images
Image Storage
Generated images are automatically saved to your local filesystem. You can customize the save location using environment variables.
Default Save Locations
- Windows:
%USERPROFILE%\Pictures\HeliosGemini\ - macOS:
~/Pictures/HeliosGemini/ - Linux:
~/Pictures/HeliosGemini/
Custom Save Path
Set one of these environment variables to specify your preferred save location:
# Option 1: Use IMAGE_SAVE_PATH
export IMAGE_SAVE_PATH="/path/to/your/images"
# Option 2: Use HELIOS_IMAGE_PATH
export HELIOS_IMAGE_PATH="D:\\MyImages\\AI Generated"Configuration Examples
Claude Desktop with custom path:
{
"mcpServers": {
"helios-gemini": {
"command": "mcp-server-helios-gemini",
"env": {
"API_TOKEN": "your-api-token",
"IMAGE_SAVE_PATH": "D:\\AI\\generated-images"
}
}
}
}Cherry Studio with custom path:
{
"mcpServers": {
"helios-gemini": {
"command": "mcp-server-helios-gemini",
"env": {
"API_TOKEN": "your-api-token",
"IMAGE_SAVE_PATH": "/home/user/ai-images"
}
}
}
}Images are named with timestamp and prompt snippet for easy identification.
Recent Updates
v0.1.9 (Latest) 🔥
- 🐛 FIXED: Image-to-image API request format inconsistency
- Changed from snake_case (
inline_data,mime_type) to camelCase (inlineData,mimeType) - Ensures consistent format with API response for better reliability
- Changed from snake_case (
- ✨ IMPROVED: Enhanced error handling
- Added validation for empty API responses
- Better logging when API doesn't return images
- More detailed error messages for debugging
- 🔍 ADDED: Response validation
- Checks if API returns expected image data
- Warns when transformation doesn't produce an image
v0.1.8
- 🎨 OSS Integration: Images now automatically uploaded to Alibaba Cloud OSS
- Get instant CDN URLs (https://dev-res.tishiii.com)
- Local temp files auto-deleted after upload
- Fallback to local storage if upload fails
v0.1.4
- 🎨 NEW: Customizable image save paths
- Set
IMAGE_SAVE_PATHorHELIOS_IMAGE_PATHenvironment variable - Default locations:
~/Pictures/HeliosGemini/(cross-platform) - Full backward compatibility with existing installations
- Set
v0.1.3
- 🎉 NEW: Local file support for
image_to_image- Can now use local file paths:
D:\path\to\image.jpg - Works with both Windows and Unix paths
- Supports PNG, JPG, GIF, WEBP formats
- Can now use local file paths:
v0.1.2
- ⚡ Optimized: Image download timeout set to 10 seconds (standard timeout)
- 🔍 Improved: Better error messages showing exact failure reasons
- 🌐 Enhanced: Added User-Agent and Accept headers for compatibility
- 📝 Better logging: Clear error messages for debugging
v0.1.1
- 🐛 Fixed:
image_to_imagetool now works correctly- Images are properly downloaded and converted to base64
- Correct request format matching Gemini API specification
- Added automatic MIME type detection
- ✅ All functionality tested and verified
v0.1.0
- Initial release with text-to-image and image-to-image tools
Development
Local Testing
- Clone the repository
- Install dependencies:
npm install - Build:
npm run build - Test locally by updating Claude Code config to point to the built file
Build
npm run buildWatch mode
npm run devAPI Details
This MCP server uses the Helios Gemini API which wraps Google's Gemini 2.5 Flash Image model. The API:
- Uses OpenAI-compatible chat completions format
- Returns images as base64-encoded PNG data in markdown format
- Supports both text-to-image and image-to-image generation
Support
For issues and questions:
- Visit i-helios.top
License
MIT
