Gemini Image logo

Gemini Image

Generates and edits images with Gemini, plus local cropping, resizing, keying, trimming, and format conversion.

Install Gemini Image

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "gemini-image": {
      "command": "npx",
      "args": [
        "-y",
        "@jimothy-snicket/gemini-image-mcp"
      ],
      "env": {
        "GEMINI_API_KEY": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

We couldn’t confirm it starts correctly

We ran the install command but it didn't respond within our test window — this can mean a slow first-time install rather than a real problem.

npx -y @jimothy-snicket/gemini-image-mcp

No response to initialize.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked 1mo ago.

Overview

The gemini-image MCP server exposes Google Gemini image generation and local image-processing tools over stdio. It saves generated results to disk instead of returning image data through the agent context, and can maintain multi-turn editing sessions. Use it when an MCP client needs text-to-image generation, reference-image editing, transparent assets, or free local transformations; a GEMINI_API_KEY is required for Gemini operations.

Use cases

  • Generate image assets from text prompts
  • Edit reference images across multiple turns
  • Create transparent PNGs from generated or local images
  • Crop and resize images locally without API calls
  • Convert image files between PNG, JPEG, and WebP

Key features

  • Gemini text-to-image generation and editing
  • Multi-turn sessions with saved output files
  • Local crop, resize, trim, and format conversion
  • Threshold and chroma-key background removal
  • Configurable rate and cost limits
  • Generation manifests with cost estimates

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked 3d ago

Recent health check succeeded.

20/25 checks healthy over the last 92d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 6d ago via OSV.dev · @jimothy-snicket/gemini-image-mcp (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars2Stargazers on the source repository.
npm downloads1.3kPackage downloads in the last 30 days.
Last commit1mo agoMost recent push to the default branch.
Install checkInconclusiveDidn't respond in our test window — often a slow first install.
Directory activity9 viewsConfig copies, upvotes, and views on AllMCPs.

How Gemini Image works

What gemini-image MCP server does

The gemini-image MCP server connects MCP clients to Google Gemini's native image-generation models through the generateContent API. It provides two tools: generate_image for remote Gemini operations and process_image for local transformations. Generated images are saved to disk, so an agent can work with file paths rather than streaming image data through its context.

generate_image supports text-to-image requests, editing with reference images, multi-turn refinement through session IDs, configurable aspect ratios and resolutions, integer seeds, and optional Google Search grounding on supported Gemini 3.x image models. It can accept multiple reference images, with the README documenting approximate limits for specific models. Responses include token counts, estimated cost, and session totals.

The local tool handles crop, resize, background removal, whitespace trimming, and conversion among PNG, JPEG, and WebP. Background removal can use threshold-based processing, chroma keying, or the optional local AI matte workflow. The result can be a transparent PNG without an additional Gemini API call.

How it works

The gemini-image MCP server runs as a local stdio process. MCP clients start the package with npx -y @jimothy-snicket/gemini-image-mcp and provide the Gemini credential through the process environment. Gemini requests use the configured model and write output files to the selected directory. Duplicate names are automatically versioned, and subfolders can organize related outputs.

Multi-turn generation uses a sessionId; earlier turns remain available as context until the configured session timeout. Every generation is also recorded in a generations.jsonl manifest containing the prompt, parameters, and cost information. Request and cost limits can be configured to restrict agent activity over a rolling hour.

Setup and configuration

Install or run the package with npm:

Terminal
npx -y @jimothy-snicket/gemini-image-mcp

Create a Gemini API key in Google AI Studio and expose it as GEMINI_API_KEY. The same variable can be passed in an MCP client's environment configuration. Claude Code and Claude Desktop examples are provided in the project documentation, and any MCP client supporting stdio transport can launch the process.

Optional configuration can be supplied through environment variables or JSON files. Supported settings include OUTPUT_DIR, DEFAULT_MODEL, LOG_LEVEL, REQUEST_TIMEOUT_MS, MAX_REQUESTS_PER_HOUR, MAX_COST_PER_HOUR, SESSION_TIMEOUT_MS, and GEMINI_IMAGE_AUTO_INSTALL. Configuration precedence is environment variables, project config, global config, then defaults. The --init option creates a documented config file, while --init --local creates a project-specific one.

Tools and capabilities

  • Generate images from text prompts.
  • Edit images supplied as local reference-file paths.
  • Refine images across multi-turn sessions.
  • Save outputs with custom names, subfolders, and automatic versioning.
  • Crop by pixels, aspect ratio, center, or focal point.
  • Resize while maintaining aspect ratio.
  • Remove backgrounds with threshold, chroma-key, or optional AI matte processing.
  • Trim whitespace and convert between PNG, JPEG, and WebP.
  • Set model, aspect ratio, resolution, seed, output location, and request limits.

Limitations and notes

Gemini generation requires GEMINI_API_KEY and may incur API usage costs; the project reports estimates using a built-in pricing table and optional model-specific overrides. Unknown models can still run, but their cost is reported as unknown. The local processing tool does not require API calls.

The default output directory is ~/gemini-images, and the default model is gemini-2.5-flash-image. Supported parameters and aspect ratios depend on the selected Gemini model; for example, some resolutions and very wide or tall ratios are documented as model-specific. Automatic AI matte installation can be disabled with GEMINI_IMAGE_AUTO_INSTALL=0, in which case auto background removal falls back to chroma or threshold processing with instructions.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Gemini Image

Run `npx -y @jimothy-snicket/gemini-image-mcp`, or install it globally with `npm install -g @jimothy-snicket/gemini-image-mcp`.

Set the `GEMINI_API_KEY` environment variable to a Google Gemini API key created through Google AI Studio.

Yes. The README provides a Claude Desktop configuration using the `npx -y @jimothy-snicket/gemini-image-mcp` stdio command.

Yes. The `process_image` tool supports local threshold and chroma-key removal, and the project also documents a local AI matte option.

It supports generation, editing, cropping, resizing, background removal, whitespace trimming, and PNG, JPEG, and WebP conversion.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewGemini Image AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/gemini-image?style=directory)](https://allmcps.com/mcp/gemini-image)
HTML Embed
<a href="https://allmcps.com/mcp/gemini-image"><img src="https://allmcps.com/api/badge/gemini-image?style=directory" alt="Gemini Image on AllMCPs" /></a>