Gemini Imagen 3.0 MCP Server
Provides access to Google's state-of-the-art Imagen 3.0 model for high-quality image generation from text prompts with automated file management.
Uses the Gemini API to harness the Imagen 3.0 model for generating up to four professional images per request and creating HTML previews for local viewing.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Gemini Imagen 3.0 MCP Server generate 2 high-quality images of a cozy cabin in the woods during winter"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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
Related MCP server: Gemini Image MCP
🚀 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-serverInstall dependencies:
npm installBuild 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\imagesFilenames follow the pattern:
{sanitized-prompt}-{timestamp}-{index}.pngTimestamps ensure unique filenames
Prompts are sanitized for safe filesystem usage
Example:
Generate an image of a futuristic city at night2. 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: your.email@example.com
🙏 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
Available Tools
2 toolscreate_image_htmlB
Create HTML img tags from image file paths with gallery view
Inputs: imagePaths (required), width, height, gallery.
generate_imagesC
Generate images using Google Gemini AI
Inputs: prompt (required), category, numberOfImages.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools have completely distinct purposes: generate_images creates new images via AI, while create_image_html produces HTML img tags from existing file paths. There is no overlap or ambiguity between them.
Both tool names follow a verb_noun pattern (generate_images and create_image_html). The verbs 'generate' and 'create' are similar but not identical, and the nouns differ in structure (plural vs. compound), but the overall pattern is consistent and readable.
With only 2 tools, the server feels somewhat thin. While the scope is narrow (image generation and HTML formatting), this is borderline on the low end; a small utility set would benefit from at least one additional tool for managing or inspecting generated images.
The core workflow of generating images and then creating HTML for viewing is covered, but there are notable gaps: no way to list, delete, or manage previously generated images, and no tool to adjust model parameters beyond what might be embedded in generate_images. This limits the server to a single-generation flow.
Maintenance
Related MCP Connectors
Generate AI images and videos from any compatible MCP client.
Generate AI images, video, music, and sound effects, and upscale them, from any MCP client.
Generate AI video, images and audio, and browse your history, from any MCP client.
Generate images and videos with Seedance, Veo, Wan, Grok, GPT-Image and Nano Banana via one MCP.
Related MCP Servers
- AlicenseAqualityNot gradedmaintenanceEnables image generation using Gemini native models, supporting both single prompts and batch processing via a file-based queue. It allows for detailed configuration of aspect ratios and models using YAML frontmatter across various MCP-enabled clients.318 npmMIT
- AlicenseBqualityDmaintenanceEnables image generation and multi-turn editing sessions using the Gemini API within MCP-compatible environments. Users can create, modify, and configure images through natural language commands, supporting features like aspect ratio adjustments and session-based image transformations.5ISC
- FlicenseBqualityDmaintenanceEnables high-quality image generation using Google's Imagen 3.0 model via the Gemini API, with support for multiple images per request and automatic file management and HTML preview generation.2-
- AlicenseAqualityCmaintenanceGenerates and edits images using OpenAI GPT Image or Google Gemini models, saving every result to disk and returning local file paths so AI assistants can continue working with the images. It enables prompt-based image creation, editing, inpainting, multi-image composition, and model listing through MCP tools.131 npm1Apache 2.0