Smart Image Generator
Enables AI assistants to generate and edit images using Google's Gemini 2.5 Flash Image API with intelligent prompt enhancement. Supports text-to-image generation, image editing with natural language instructions, and advanced features like character
What is Smart Image Generator?
Smart Image Generator is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to enables ai assistants to generate and edit images using google's gemini 2.5 flash image api with intelligent prompt enhancement. supports text-to-image generation, image editing with natural language ...
Enables AI assistants to generate and edit images using Google's Gemini 2.5 Flash Image API with intelligent prompt enhancement. Supports text-to-image generation, image editing with natural language instructions, and advanced features like character
This server falls under the Data Science & ML category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- generate_image
Use Cases
Maintainer
Works with
Installation
NPM
npx -y mcp-imageManual Installation
npx -y mcp-imageConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Smart Image Generator
The Smart Image Generator MCP server (mcp-image) enables AI assistants to generate and edit images using Google's Gemini 2.5 Flash Image API or OpenAI's image generation API. It exposes a `generate_image` tool that automatically enhances prompts with photographic and artistic details to improve output quality, and supports text-to-image creation, image editing with natural language instructions, character consistency, multiple aspect ratios, and high-resolution output up to 4K. Developers use it with tools like Claude Code, Cursor, and Codex to add image generation capabilities directly into their AI-assisted workflows.
Prerequisites
- Node.js version 22 or higher
- A Google Gemini API key from https://aistudio.google.com/apikey (required for the default Gemini provider)
- An OpenAI API key from https://platform.openai.com/api-keys (required only if using IMAGE_PROVIDER=openai)
- An absolute file system path where generated images will be saved
- An MCP-compatible client such as Claude Desktop, Cursor, or Codex
Obtain a Gemini API key
Go to https://aistudio.google.com/apikey and create a new API key. This key is required to use the default Gemini 2.5 Flash image provider. Keep it secure and never commit it to version control.
Choose an output directory
Create an absolute path directory where generated images will be saved. The IMAGE_OUTPUT_DIR environment variable must be an absolute path — relative paths are not supported.
mkdir -p /Users/yourname/images/mcp-generatedAdd the server to your MCP client configuration
Configure your MCP client to run mcp-image via npx, providing your Gemini API key and the absolute output directory path as environment variables.
{
"mcpServers": {
"mcp-image": {
"command": "npx",
"args": ["-y", "mcp-image"],
"env": {
"GEMINI_API_KEY": "your_gemini_api_key",
"IMAGE_OUTPUT_DIR": "/absolute/path/to/images"
}
}
}
}Optional: Configure advanced settings
Set optional environment variables to control image quality, provider selection, or to disable automatic prompt enhancement.
# Optional env vars:
# IMAGE_PROVIDER=gemini # or 'openai'
# IMAGE_QUALITY=balanced # 'fast', 'balanced', or 'quality'
# SKIP_PROMPT_ENHANCEMENT=true # disable auto prompt enrichment
# OPENAI_API_KEY=your_key # only needed when IMAGE_PROVIDER=openaiUse Claude Code quick setup (alternative)
If using Claude Code, you can add the server with a single command instead of editing the config file manually.
claude mcp add mcp-image \
--env GEMINI_API_KEY=your-key \
--env IMAGE_OUTPUT_DIR=/path/to/images \
-- npx -y mcp-imageSmart Image Generator Examples
Client configuration
Claude Desktop configuration using npx to run the mcp-image server with the Gemini API key and an absolute output directory.
{
"mcpServers": {
"mcp-image": {
"command": "npx",
"args": ["-y", "mcp-image"],
"env": {
"GEMINI_API_KEY": "your_gemini_api_key",
"IMAGE_OUTPUT_DIR": "/Users/yourname/Pictures/mcp-images"
}
}
}
}Prompts to try
These prompts invoke the generate_image tool. The server automatically enhances them with lighting, composition, and atmosphere details.
- "Generate a serene mountain landscape at sunset with a reflective lake in the foreground"
- "Create a photorealistic image of a modern home office with natural lighting and minimalist decor"
- "Generate a portrait of a medieval knight in full armor standing in a misty forest"
- "Edit this image to change the background to a starry night sky"
- "Generate 4 variations of a product logo concept with a circular gradient design"Troubleshooting Smart Image Generator
Error: GEMINI_API_KEY is not set or invalid
Verify the GEMINI_API_KEY environment variable is correctly set in your MCP client config. Get a valid key from https://aistudio.google.com/apikey and ensure there are no extra spaces or quotes around the value.
Images are not appearing after generation
Confirm IMAGE_OUTPUT_DIR is set to an absolute path (starting with /) and that the directory exists and is writable. Relative paths are not supported. Create the directory with `mkdir -p /your/absolute/path` if it does not exist.
Generated images do not meet quality expectations
Change IMAGE_QUALITY from 'fast' to 'balanced' or 'quality' for better results. If automatic prompt enhancement is hurting results for specific use cases, set SKIP_PROMPT_ENHANCEMENT=true to pass your prompt directly to the model.
Frequently Asked Questions about Smart Image Generator
What is Smart Image Generator?
Smart Image Generator is a Model Context Protocol (MCP) server that enables ai assistants to generate and edit images using google's gemini 2.5 flash image api with intelligent prompt enhancement. supports text-to-image generation, image editing with natural language instructions, and advanced features like character It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Smart Image Generator?
Install via npm with the command: npx -y mcp-image. Then add the server configuration to your AI client's JSON config file (e.g., claude_desktop_config.json or .cursor/mcp.json).
Which AI clients work with Smart Image Generator?
Smart Image Generator works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Smart Image Generator free to use?
Yes, Smart Image Generator is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.
Smart Image Generator Alternatives — Similar Data Science & ML Servers
Looking for alternatives to Smart Image Generator? Here are other popular data science & ml servers you can use with Claude, Cursor, and VS Code.
Ultrarag
★ 5.6kA Low-Code MCP Framework for Building Complex and Innovative RAG Pipelines
RocketRide
★ 3.1k📇 🏠 - MCP server that exposes RocketRide AI pipelines as t
Aix Db
★ 2.1kAix-DB 基于 LangChain/LangGraph 框架,结合 MCP Skills 多智能体协作架构,实现自然语言到数据洞察的端到端转换。
NeMo Data Designer
★ 1.9k🎨 NeMo Data Designer: Generate high-quality synthetic data from scratch or from seed data.
PaperBanana
★ 1.7kOpen source implementation and extension of Google Research’s PaperBanana for automated academic figures, diagrams, and research visuals, expanded to new domains like slide generation.
MiniMax
★ 1.5kBridges MiniMax AI capabilities to the Model Context Protocol, enabling AI agents to perform image understanding, text-to-image generation, and speech synthesis. It provides a standardized interface for accessing MiniMax's core tools via JSON-RPC.
Browse More Data Science & ML MCP Servers
Explore all data science & ml servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Smart Image Generator in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Smart Image Generator?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.