Smart Image Generator

v0.11.0Data Science & MLstable

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

agent-skillsai-toolsclaude-codecodexcursor
Share:
112
Stars
0
Downloads
0
Weekly
0/5

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

Generate and edit images using Google's Gemini 2.5 Flash with intelligent prompt enhancement.
Create images from text descriptions with automatic quality optimization.
Edit images with natural language instructions and character consistency.
shinpr

Maintainer

LicenseMIT License
Languagetypescript
Versionv0.11.0
UpdatedMay 21, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

NPM

npx -y mcp-image

Manual Installation

npx -y mcp-image

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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
1

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.

2

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-generated
3

Add 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"
      }
    }
  }
}
4

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=openai
5

Use 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-image

Smart 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.

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.

Quick Config Preview

{ "mcpServers": { "smart-image-generator": { "command": "npx", "args": ["-y", "mcp-image"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides