image_gen_mcp
Verified Safeby pietrozullo
Overview
Generates high-quality images from text prompts and transforms existing images using Google's Gemini AI model.
Installation
python server.pyEnvironment Variables
- GEMINI_API_KEY
- PORT
- MCP_URL
- IMAGE_STORAGE_DIR
Security Notes
The server uses `os.environ.get` for API keys, avoiding hardcoded secrets. It implements path sanitization (`is_relative_to`) to prevent directory traversal when serving images. Image uploads and URLs are validated for size and format (`MAX_IMAGE_SIZE_BYTES`, `ALLOWED_IMAGE_FORMATS`) to mitigate risks like decompression bombs and arbitrary file uploads. A cleanup mechanism for old images is in place. While `host="0.0.0.0"` is used, typical for cloud deployments, it requires proper firewalling in production environments. No `eval` or `exec` from user input was found.
Similar Servers
gemini-mcp-server
An MCP server providing a suite of 7 AI-powered tools (Image Gen/Edit, Chat, Audio Transcribe, Code Execute, Video/Image Analysis) powered by Google Gemini, featuring a self-learning "Smart Tool Intelligence" system for prompt enhancement and user preference adaptation.
nanobanana-api-mcp
An MCP server providing image generation and editing capabilities via the Google Gemini API, integrable with various AI coding assistants and IDEs.
gemini-mcp
The server provides a Model Context Protocol (MCP) interface to Google Gemini AI services, enabling multimodal generation including image creation, image editing, and video production.
GeminiMCP
Integrate Google's Gemini API for AI-powered tasks and search with Model Control Protocol (MCP) clients, focusing on developer-centric features like code analysis and context handling.