Skip to main content
AllMCPs
BrowseBestCategoriesStackCompareToolsGuidesBlog Log in Submit MCP

Stay in the loop

Get new MCP servers and top picks in your inbox.

AllMCPs

The open directory for discovering and installing Model Context Protocol servers.

Explore

  • Browse servers
  • Best MCP servers
  • Categories
  • MCP clients
  • Agent prompts
  • Stack Builder
  • Compare servers
  • Tags index
  • Submit a server
  • Pricing

Learn

  • Guides hub
  • What is MCP?
  • Install guide
  • Troubleshooting
  • Security
  • Blog
  • Blog RSS

Tools

  • All tools
  • Config generator
  • Config validator
  • MCP playground
  • OpenAPI β†’ MCP
  • Badge generator

For agents

  • API docs
  • Trust & traffic
  • llms.txt β†— (opens in a new tab)
  • Catalog JSON β†— (opens in a new tab)
  • Remote MCP β†— (opens in a new tab)

Company

  • About
  • Contact
  • X (@AllMCPs) β†— (opens in a new tab)
  • GitHub β†— (opens in a new tab)
  • Terms
  • Privacy
AllMCPs VerifiedAllMCPs VerifiedFeatured on Nick LaunchesFeatured on Nick LaunchesLaunch Llama NewsletterLaunch Llama NewsletterVerified DR - allmcps.comVerified DR - allmcps.comFeatured on SaaSGrowFeatured on SaaSGrowFeatured on Twelve ToolsFeatured on Twelve ToolsFeatured on Saaspa.geFeatured on Saaspa.geFeatured on Findly.toolsFeatured on Findly.toolsFeatured on Startup FameFeatured on Startup FameFeatured on LaunchKiwiFeatured on LaunchKiwiFeatured on ScrollLaunchFeatured on ScrollLaunchFeatured on DailyPingsFeatured on DailyPingsFazier badgeFazier badgeFeatured on NewTool.siteFeatured on NewTool.siteFeatured on saasfame.comFeatured on saasfame.comDR Checker - Domain RatingDR Checker - Domain RatingListed on Turbo0Listed on Turbo0Launched on LaunchBoard - Product Launch PlatformLaunched on LaunchBoard - Product Launch PlatformList on SimilarlabsList on Similarlabshttps://codetrendy.comhttps://codetrendy.comListed on DevTool.ioFeatured on BuildlistFeatured on BuildlistAllMCPs VerifiedAllMCPs VerifiedFeatured on Nick LaunchesFeatured on Nick LaunchesLaunch Llama NewsletterLaunch Llama NewsletterVerified DR - allmcps.comVerified DR - allmcps.comFeatured on SaaSGrowFeatured on SaaSGrowFeatured on Twelve ToolsFeatured on Twelve ToolsFeatured on Saaspa.geFeatured on Saaspa.geFeatured on Findly.toolsFeatured on Findly.toolsFeatured on Startup FameFeatured on Startup FameFeatured on LaunchKiwiFeatured on LaunchKiwiFeatured on ScrollLaunchFeatured on ScrollLaunchFeatured on DailyPingsFeatured on DailyPingsFazier badgeFazier badgeFeatured on NewTool.siteFeatured on NewTool.siteFeatured on saasfame.comFeatured on saasfame.comDR Checker - Domain RatingDR Checker - Domain RatingListed on Turbo0Listed on Turbo0Launched on LaunchBoard - Product Launch PlatformLaunched on LaunchBoard - Product Launch PlatformList on SimilarlabsList on Similarlabshttps://codetrendy.comhttps://codetrendy.comListed on DevTool.ioFeatured on BuildlistFeatured on Buildlist
Β© 2026 Jackalope Digital LLC. All rights reserved.
  1. Home
  2. πŸ’» Developer Tools
  3. Gemini Image
G
Health: Not checked yetWe have not completed a health check for this listing yet.Last checked 8/11/2026, 12:03:54 AM

Gemini Image

Enrichment pendingWe haven’t run our AI enrichment pass on this listing yet, so the overview, use cases, and FAQ below may be sparse or missing. We work through the catalog over time β€” check back soon.
View Repository

Google Gemini image generation, editing, and local processing via MCP

Quick Install

Automated & IDE Setup

Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β€” or use 1-click editor setup below.

Add to CursorAdd to VS Code
Manual Client & Custom JSON ConfigExpand JSON β–Ύ

Install Config Generator

Choose your client
claude_desktop_config.json
{
  "mcpServers": {
    "gemini-image": {
      "command": "npx",
      "args": [
        "-y",
        "gemini-image"
      ]
    }
  }
}

πŸ’‘ Paste into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)

Install Directory Badge Claim listing AlternativesπŸ’» More in Developer Tools

Documentation Overview

gemini-image-mcp

A simple, focused MCP server for Google Gemini's native image generation β€” the "Nano Banana" models. Generate, edit, and locally process images from Claude Code, Claude Desktop, or any stdio-based MCP client. Two tools, no bloat.

Built for agents: a single call returns a saved image β€” or, with one-call background removal, a ready-to-use transparent PNG β€” without streaming image data through your agent's context. Uses Gemini's generateContent API (not the deprecated Imagen API).

Install

Terminal
npm install -g @jimothy-snicket/gemini-image-mcp

Or use directly with npx:

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

Claude Code (one command):

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

Requires a GEMINI_API_KEY environment variable β€” see Setup for details.

Set up a config file (optional):

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

Creates ~/.gemini-image-mcp.json with commented defaults. For project-specific overrides:

Terminal
npx @jimothy-snicket/gemini-image-mcp --init --local

Features

generate_image β€” AI-powered

  • Text-to-image β€” describe what you want, get an image
  • Image editing β€” provide reference images and an editing instruction
  • Transparent assets in one call β€” removeBackground returns a clean transparent PNG: a local AI matte (works on any subject; optional add-on, see below) by default, or built-in green-screen / white-threshold keying. No extra API cost
  • Multi-turn edits β€” pass a sessionId to refine an image across calls, with prior turns kept as context
  • Multi-image input β€” up to ~14 reference images on gemini-3.1-flash-image (~11 on gemini-3-pro-image)
  • Cost reporting β€” every response includes token counts, estimated USD cost, and session totals
  • Rate limiting β€” configurable per-hour caps on requests and cost to prevent runaway agents
  • Auto model discovery β€” detects available image models from your API key at startup
  • Seed β€” reproducible generation with integer seeds
  • Google Search grounding β€” real-world accuracy on the gemini-3.x image models

process_image β€” Local (free, no API calls)

  • Crop β€” pixel-exact, aspect ratio (center), or focal point (attention/entropy)
  • Resize β€” to width, height, or both (maintains aspect ratio)
  • Background removal β€” threshold-based (white backgrounds) or chroma key (green screen, any solid colour)
  • Chroma key pipeline β€” HSV keying with smoothstep feather, spill suppression, and edge anti-aliasing
  • Trim β€” auto-remove whitespace borders
  • Format conversion β€” PNG, JPEG, WebP with quality control

Both tools

  • Output organization β€” meaningful filenames with auto-versioning, subfolders
  • Generation manifest β€” generations.jsonl logs every generation with prompt, params, cost
  • Full aspect ratio support β€” 1:1, 16:9, 9:16, 3:2, 2:3, 4:3, 3:4, 21:9
  • Resolution control β€” 1K, 2K, 4K

Setup

1. Get a Gemini API Key

Go to Google AI Studio and create an API key. It's free to start with generous rate limits.

2. Set the API Key

The server reads your key from the GEMINI_API_KEY environment variable. Set it once so it's available in every session:

Windows (PowerShell β€” run as admin):

powershell
[System.Environment]::SetEnvironmentVariable('GEMINI_API_KEY', 'your-key-here', 'User')

Then restart your terminal.

macOS / Linux:

server.ts
echo 'export GEMINI_API_KEY="your-key-here"' >> ~/.bashrc
source ~/.bashrc

(Use ~/.zshrc if you're on zsh.)

Verify it's set:

bash
echo $GEMINI_API_KEY

3. Connect to Your MCP Client

Pick the method that matches how you use MCP:

Claude Code (one-liner)

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

Claude Code will pick up GEMINI_API_KEY from your environment automatically.

Claude Code (manual .mcp.json)

Add to .mcp.json in your project root or ~/.claude/.mcp.json for global access:

config.json
{
  "mcpServers": {
    "gemini-image": {
      "command": "npx",
      "args": ["-y", "@jimothy-snicket/gemini-image-mcp"],
      "env": {
        "GEMINI_API_KEY": "${GEMINI_API_KEY}"
      }
    }
  }
}

The ${GEMINI_API_KEY} syntax reads the value from your shell environment β€” your actual key never gets written into config files.

Claude Desktop

Edit claude_desktop_config.json:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
config.json
{
  "mcpServers": {
    "gemini-image": {
      "command": "npx",
      "args": ["-y", "@jimothy-snicket/gemini-image-mcp"],
      "env": {
        "GEMINI_API_KEY": "${GEMINI_API_KEY}"
      }
    }
  }
}

Restart Claude Desktop after saving.

Other MCP Clients

Any client that supports stdio transport works. Point it at npx -y @jimothy-snicket/gemini-image-mcp and pass GEMINI_API_KEY in the environment.

Security Notes

  • Never commit your API key to version control. The ${GEMINI_API_KEY} syntax in config files references your environment β€” the key itself stays in your shell profile.
  • If your .mcp.json is in a project repo, add it to .gitignore or use the global config at ~/.claude/.mcp.json instead.
  • For extra security, you can use a wrapper script that reads the key from your OS keychain (macOS Keychain, Windows Credential Manager) and launches the server with it injected.

Configuration

All optional. The only required setup is GEMINI_API_KEY (covered above).

VariableDefaultDescription
OUTPUT_DIR~/gemini-imagesDefault directory for saved images
DEFAULT_MODELgemini-2.5-flash-imageDefault Gemini model
LOG_LEVELinfodebug, info, or error
REQUEST_TIMEOUT_MS60000API request timeout in milliseconds
MAX_REQUESTS_PER_HOUR0 (unlimited)Max image generations per rolling hour
MAX_COST_PER_HOUR0 (unlimited)Max estimated cost (USD) per rolling hour
SESSION_TIMEOUT_MS1800000 (30min)Multi-turn session expiry
GEMINI_IMAGE_AUTO_INSTALL1 (on)Auto-install the AI matte engine on first removeBackground: { mode: "auto" } use. Set 0 to disable (then auto falls back to chroma/threshold with instructions)

Set these the same way as GEMINI_API_KEY, or pass them in the env block of your MCP config.

Rate limiting is recommended when agents have access to this tool. An agent in a loop can generate images quickly β€” set MAX_REQUESTS_PER_HOUR=20 and MAX_COST_PER_HOUR=5 as sensible defaults.

Config File

Instead of environment variables, you can use a JSON config file. Create one with:

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

This creates ~/.gemini-image-mcp.json with all defaults and inline documentation. Edit it to set your preferences.

Priority: env vars > local config (.gemini-image-mcp.json in CWD) > global config (~/.gemini-image-mcp.json) > defaults.

You can also set per-tool defaults so every request uses your preferred settings:

config.json
{
  "defaultModel": "gemini-3.1-flash-image",
  "defaults": {
    "generate": {
      "aspectRatio": "16:9",
      "resolution": "2K"
    },
    "process": {
      "removeBackground": { "color": "#00FF00" },
      "trim": true
    }
  }
}

Per-request parameters always override config defaults.

Custom pricing. Cost estimates come from a built-in per-token rate table (there's no pricing API to fetch live). If you use a model the table doesn't know yet β€” or Google changes a rate before this package updates β€” add pricingOverrides so cost reporting stays accurate without waiting for a release:

config.json
{
  "pricingOverrides": {
    "some-new-image-model": {
      "inputPerMillion": 0.5,
      "textOutputPerMillion": 60,
      "imageOutputPerMillion": 60,
      "thinkingPerMillion": 60
    }
  }
}

Models with no entry (built-in or override) still generate β€” their cost is reported as unknown rather than guessed.

Tool: generate_image

Parameters

ParameterRequiredDescription
promptYesText description or editing instruction
imagesNoArray of file paths to input/reference images
modelNoGemini model ID
aspectRatioNo1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9, plus 1:4, 4:1, 1:8, 8:1 (gemini-3.1-flash-image). Validated by the API.
resolutionNo512 (gemini-3.1-flash-image only), 1K, 2K, 4K
outputDirNoOverride output directory for this request
filenameNoBase name for saved file (e.g. hero-banner). Auto-versioned if duplicate.
subfolderNoSubfolder within output directory (e.g. landing-page)
sessionIdNoContinue a multi-turn editing session from a previous response
seedNoInteger seed for reproducible generation
useSearchGroundingNoEnable Google Search grounding (gemini-3.x image models)
removeBackgroundNoReturn a transparent PNG cutout. { "mode": "auto" } = local AI matte (any subject; default); { "mode": "chroma" } = green screen; { "mode": "threshold" } = white removal (line art). No extra API cost

Example Response

config.json
{
  "imagePath": "/home/user/gemini-images/hero-banner.png",
  "mimeType": "image/png",
  "model": "gemini-2.5-flash-image",
  "sessionId": "session-1711929600000-a1b2c3",
  "sessionTurn": 1,
  "usage": {
    "promptTokens": 5,
    "outputTokens": 1295,
    "imageTokens": 1290,
    "thinkingTokens": 412,
    "totalTokens": 1712,
    "estimatedCost": "$0.0390",
    "pricingVerifiedDate": "2026-06-15"
  },
  "session": {
    "generationsThisSession": 3,
    "totalCostThisSession": "$0.1161",
    "generationsThisHour": 5,
    "limit": {
      "maxPerHour": 20,
      "maxCostPerHour": 5,
      "remainingThisHour": 15
    }
  }
}

Usage Examples

Text-to-image:

"Generate a hero image for a SaaS landing page, modern gradient style, 16:9"

Image editing:

"Take this screenshot and redesign the header with a dark theme" (with image paths)

Iterative editing (multi-turn):

Generate an image, then call again with the returned sessionId and a refinement like "make it more minimal" β€” the prior image stays in context.

Organized output:

"Generate a hero banner" with filename: "hero", subfolder: "landing-page" β†’ saves to ~/gemini-images/landing-page/hero.png

High quality:

"A photorealistic product shot of headphones on marble, 4K" (using gemini-3-pro-image)

Transparent asset (one call):

"A glossy red sneaker, product shot" with removeBackground: { "mode": "auto" } β†’ a ready-to-place transparent PNG. The local AI matte works on any subject β€” no green screen needed.

Tool: process_image

Local image processing via sharp. Free, fast, no API calls.

Parameters

ParameterRequiredDescription
imagePathYesPath to the image file to process
cropNoCrop by pixel dimensions, aspect ratio, or focal point strategy
resizeNoResize to width/height (maintains aspect ratio)
removeBackgroundNoRemove background: { "mode": "auto" } (AI matte, any subject), { "mode": "chroma" } (green screen), or { "mode": "threshold" } (white). Defaults to chroma if color set, else threshold
trimNoAuto-remove whitespace/transparent borders
formatNoConvert to png, jpeg, or webp
qualityNoOutput quality for JPEG/WebP (1-100)
filenameNoBase name for saved file. Auto-versioned if duplicate.
subfolderNoSubfolder within output directory
outputDirNoOverride output directory

Crop Options

json
// Pixel-exact
{"width": 500, "height": 300, "left": 100, "top": 50}

// Aspect ratio (center crop)
{"aspectRatio": "16:9"}

// Focal point β€” shifts crop to the most interesting region
{"aspectRatio": "16:9", "strategy": "attention"}

// Detail-based β€” shifts crop to the most detailed region
{"aspectRatio": "16:9", "strategy": "entropy"}

Background Removal Options

json
// AI semantic matte β€” best quality, works on ANY subject
{"mode": "auto"}

// White/light background (threshold)
{"mode": "threshold", "threshold": 240}

// Green screen (chroma key)
{"mode": "chroma", "color": "#00FF00"}

// Any solid colour
{"mode": "chroma", "color": "#0000FF", "tolerance": 60}

mode: "auto" runs a local BiRefNet matte that isolates the subject semantically β€” so it handles hair, glass, and green/yellow subjects that chroma key can't. The matte engine isn't bundled (keeps the base install ~65 MB). On your first auto call the server auto-installs it (@huggingface/transformers, ~340 MB) plus the fp16 model (~109 MB) β€” a one-time pause of a minute or two, then it runs locally with no extra API cost. Set GEMINI_IMAGE_AUTO_INSTALL=0 to disable auto-install (then auto falls back to returning the image with instructions to install it manually). chroma and threshold need nothing extra.

Chroma key (mode: "chroma") uses HSV keying with smoothstep feathering, spill suppression, and 5-pass edge anti-aliasing (default tolerance 80). Use #00FF00 for AI-generated green screens β€” it works better than matching the exact shade Gemini produces.

Note: Chroma key destroys subjects that share the key colour (green/yellow) and transparent/reflective subjects (glass) β€” the green parrot vanishes. For those, use mode: "auto" (the AI matte preserves them), or the canvas approach: feed a solid-colour background image to generate_image and let Gemini place the subject with correct lighting. The canvas approach is still best for truly transparent objects like glass, which should transmit the final background rather than be cut out.

Common Pipelines

Subject on a specific background (canvas approach):

Code
generate_image β†’ "Place a [subject] on this background" with images: [solid colour canvas]

One API call. Best for yellow, green, or glass subjects where chroma key struggles.

Transparent asset (one call):

Code
generate_image β†’ "A product photo of <subject>" with removeBackground: {mode: "auto"}

One API call β†’ a transparent PNG. The local AI matte works on any subject. (For truly transparent/reflective objects like glass, the canvas approach above is still best.)

Transparent asset from green screen (zero-dependency):

Code
generate_image β†’ "A product photo on a bright green background"
process_image β†’ removeBackground {mode: "chroma"} + trim

Avoids the matte model entirely β€” best for high-contrast subjects on locked-down/offline machines.

Favicon from a generated logo:

Code
process_image β†’ removeBackground {threshold: 230} + trim + resize {width: 192, height: 192}

Social card from a photo:

Code
process_image β†’ crop {aspectRatio: "16:9", strategy: "attention"} + resize {width: 1200}

WebP conversion for web:

Code
process_image β†’ format: "webp" + quality: 85

Models

ModelStrengthsResolutionNotes
gemini-2.5-flash-imageCheapest (~$0.04/image)1KDefault. Shuts down 2026-10-02
gemini-3.1-flash-imageSpeed + quality, Google Search grounding512, 1K, 2K, 4K~$0.07/1K image. ~14 reference images
gemini-3-pro-imageBest quality, text rendering1K, 2K, 4K~$0.13/1K image. ~11 reference images

The -preview IDs (gemini-3-pro-image-preview, gemini-3.1-flash-image-preview) are still accepted during Google's cutover but retire 2026-06-25 β€” use the GA IDs above. The server discovers whichever image models your API key supports at startup and validates each request against that live list, so new models work without an update.

Development

bash
bun install
bun run build     # TypeScript -> dist/
bun run dev       # Run directly with Bun

License

MIT

Related MCP Servers

View all in Developer Tools View all alternatives
  • M
    Midjourney

    MCP server for Midjourney AI image generation and editing

    πŸ’» Developer Tools0 views
    Compare vs Midjourney β†’
  • M
    Mcp Midjourney

    MCP server for Midjourney AI image generation and editing

    πŸ’» Developer Tools0 views
    Compare vs Mcp Midjourney β†’
  • M
    Mcp Nanobanana Pro

    MCP server for NanoBanana AI image generation and editing

    πŸ’» Developer Tools0 views
    Compare vs Mcp Nanobanana Pro β†’
  • Claude Task Master logoClaude Task Master

    AI-powered task management system for AI-driven development. Features PRD parsing, task expansion, multi-provider support (Claude, OpenAI, Gemini, Perplexity, xAI), and selective tool loading for optimized context usage.

    πŸ’» Developer Tools7 views
    Compare vs Claude Task Master β†’

Frequently Asked Questions about Gemini Image

Add the following block to your claude_desktop_config.json under mcpServers: "mcpServers": { "gemini-image": { "command": "npx", "args": ["-y", "gemini-image"] } }

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>

Technical Specs & Signals

CategoryπŸ’»Developer Tools
More technical detailsExpand β–Ύ
TransportSTDIO
RuntimeNode.js
0/5 checks healthy over the last 6h
Views0
Unique ViewsTotal visits recorded for this listing page on AllMCPs.
Installs0
Installs & Copy ActionsTotal times users copied install commands or configuration snippets for this server.
27Quality signal: Emerging Β· 27/100How this signal is calculated β–Ύ
Server availabilityNot measured

Not scored for repo-hosted servers β€” we can't reach the running server, only its GitHub page. Hosted MCP endpoints are health-checked live.

Verified ownership8/20
Documentation & tools11/30
Adoption & activity1/15
Community engagement0/10

A guidance signal from public completeness & health data β€” not a user rating. New listings start lower and rise as they add docs, get verified, and grow adoption. Signals we can't observe for a listing are skipped, not counted against it.

β˜… FeaturedAllMCPs Server logo

AllMCPs Server

The official MCP server for AllMCPs.com - submit and manage tools directly from your AI. The open directory for MCP servers. Connect Claude, Cursor, Windsurf, and AI agents to databases, tools, files, and APIs. Explore 3,181+ servers. AllMCPs is the premier, open directory for discovering, evaluating, and installing Model Context Protocol (MCP) servers to equip AI agents and LLMs with real-world superpowers.

Explore Server β†’

Own this project?

This directory is pre-filled from public sources. Claim via GitHub README, site badge, or DNS TXT to get the verified badge and attach your website.

Free dofollow backlink: after claiming, verify your product site and place a dofollow AllMCPs badge β€” we recheck it stays live.

Claim & get free dofollow

Share & Embed

Add our SVG badge (dark/light directory styles) or embeddable widget to your site.

Explore more

More in πŸ’» Developer Tools β†’Best MCP servers for Developers β†’Alternatives to Gemini Image β†’Install in Claude DesktopInstall in CursorInstall in VS Code