Sponsored by Deepsite.site

Gemini Imagen 3.0 MCP Server

Created By
falahgs8 months ago
Content

Gemini Imagen 3.0 MCP Server

License Node TypeScript

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

  1. Clone the repository:
git clone https://github.com/yourusername/gemini-imagen-mcp-server.git
cd gemini-imagen-mcp-server
  1. Install dependencies:
npm install
  1. Build the TypeScript code:
npm run build

⚙️ Configuration

  1. 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"
      }
    }
  }
}
  1. Replace placeholders:
    • <path-to-project-directory>: Your project path
    • your-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 generate
  • numberOfImages (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 paths
  • width (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:

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

📝 Error Handling

The server implements two main error codes:

  • tool_not_found (1): When the requested tool is not available
  • execution_error (2): When image generation or HTML creation fails

📄 License

MIT License - see the LICENSE file for details.

✨ Author

Falah G. Salieh

🙏 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

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
DeepChatYour AI Partner on Desktop
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
WindsurfThe new purpose-built IDE to harness magic
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Tavily Mcp
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Serper MCP ServerA Serper MCP Server
ChatWiseThe second fastest AI chatbot™
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Amap Maps高德地图官方 MCP Server
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
CursorThe AI Code Editor
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Playwright McpPlaywright MCP server