Gemini Imagen 3.0
Generate high-quality images using Google's Imagen 3.0 model via the Gemini API.
Gemini Imagen 3.0 MCP Server
A professional Model Context Protocol (MCP) server implementation that harnesses Google's Imagen 3.0 model through the Gemini API for high-quality image generation. Built with TypeScript and designed for seamless integration with Claude Desktop and other MCP-compatible hosts.
đ Features
- Leverage Google's state-of-the-art Imagen 3.0 model via Gemini API
- Generate up to 4 high-quality images per request
- Automatic file management with intelligent naming
- HTML preview generation with file:// protocol support
- Built on MCP protocol for AI agent compatibility
- TypeScript implementation with robust error handling
đ Quick Start
Prerequisites
- Node.js 18 or higher
- Google Gemini API key
- Claude Desktop or another MCP-compatible host
Installation
- Clone the repository:
git clone https://github.com/yourusername/gemini-imagen-mcp-server.git
cd gemini-imagen-mcp-server
- Install dependencies:
npm install
- Build the TypeScript code:
npm run build
âď¸ Configuration
- Configure Claude Desktop by adding to
claude_desktop_config.json:
{
"mcpServers": {
"gemini-image-gen": {
"command": "node",
"args": ["./build/index.js"],
"cwd": "<path-to-project-directory>",
"env": {
"GEMINI_API_KEY": "your-gemini-api-key"
}
}
}
}
- Replace placeholders:
<path-to-project-directory>: Your project pathyour-gemini-api-key: Your Gemini API key
đ ď¸ Available Tools
1. generate_images
Generates images using Google's Imagen 3.0 model.
Parameters:
prompt(required): Text description of the image to generatenumberOfImages(optional): Number of images (1-4, default: 1)
File Management:
- Images are automatically saved in
G:\image-gen3-google-mcp-server\images - Filenames follow the pattern:
{sanitized-prompt}-{timestamp}-{index}.png - Timestamps ensure unique filenames
- Prompts are sanitized for safe filesystem usage
Example:
Generate an image of a futuristic city at night
2. create_image_html
Creates HTML preview tags for generated images.
Parameters:
imagePaths(required): Array of image file pathswidth(optional): Image width in pixels (default: 512)height(optional): Image height in pixels (default: 512)
Returns HTML tags with absolute file:// URLs for local viewing.
Example:
Create HTML tags for the generated images with width=400
đ§ Development
# Install dependencies
npm install
# Build TypeScript
npm run build
# Run tests (when available)
npm test
đ¤ Contributing
Contributions are welcome! Please feel free to submit a Pull Request. For major changes:
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
đ Error Handling
The server implements two main error codes:
tool_not_found(1): When the requested tool is not availableexecution_error(2): When image generation or HTML creation fails
đ License
MIT License - see the LICENSE file for details.
⨠Author
Falah G. Salieh
- Copyright Š 2025
- GitHub: @yourgithubhandle
- Email: [email protected]
đ Acknowledgments
- Google Gemini API and Imagen 3.0 model
- Model Context Protocol (MCP) by Anthropic
- Claude Desktop team for MCP host implementation
đ Tags
#MCP #Gemini #Imagen3 #AI #ImageGeneration #TypeScript #NodeJS #GoogleAI #ClaudeDesktop
Made with â¤ď¸ by Falah G. Salieh
Related Servers
Scout Monitoring MCP
sponsorPut performance and error data directly in the hands of your AI assistant.
Alpha Vantage MCP Server
sponsorAccess financial market data: realtime & historical stock, ETF, options, forex, crypto, commodities, fundamentals, technical indicators, & more
Sandbox MCP Server
Provides isolated Docker environments for secure code execution.
MLflow Prompt Registry
Access prompt templates managed in an MLflow Prompt Registry. Requires a running MLflow server configured via the MLFLOW_TRACKING_URI environment variable.
ComfyUI
An MCP server for ComfyUI integration.
MCP Remote Machine Control
Provides remote machine control capabilities, eliminating SSH overhead for token-efficient system operations.
.NET Types Explorer
Provides detailed type information from .NET projects including assembly exploration, type reflection, and NuGet integration for AI coding agents
OpenDia
An open-source server that exposes browser functions via MCP, allowing AI models to interact with browser capabilities.
TransformerBee.MCP
An MCP server for the transformer.bee service, configurable via environment variables.
Lifecycle MCP Server
An MCP server for managing the software development lifecycle, with support for an optional external SQLite database.
ęłľęłľ API ě°ë MCP ěí
Integrates the Korea Meteorological Administration's public weather API to provide climate data.
Universal Infinite Loop MCP Server
A goal-agnostic parallel orchestration framework implementing Infinite Agentic Loop patterns as a Model Context Protocol (MCP) server.