Skip to main content
Glama

Images MCP

An MCP server for generating and editing images using Google Gemini. Works with Claude Desktop, Claude Code, and any MCP client.

What it does

  • Generate images from text prompts

  • Edit images with instructions (style transfer, background removal, modifications)

  • Save to local disk or Google Drive

  • Multiple aspect ratios, resolutions, and models

Related MCP server: MCP Google Suite

Setup

1. Create Google Cloud OAuth credentials (one-time, ~5 minutes)

  1. Go to Google Cloud Console

  2. Create a new project (or use an existing one)

  3. Enable the Generative Language API:

    • Go to APIs & Services → Library

    • Search for "Generative Language API"

    • Click Enable

  4. Enable the Google Drive API (optional, for saving images to Drive):

    • Search for "Google Drive API" in the library

    • Click Enable

  5. Configure the OAuth consent screen:

    • Go to APIs & Services → OAuth consent screen

    • Choose External user type

    • Fill in the app name (e.g., "Images MCP") and your email

    • Add scopes: generative-language and drive.file

    • Add your email as a test user

    • Save

  6. Create OAuth credentials:

    • Go to APIs & Services → Credentials

    • Click Create Credentials → OAuth client ID

    • Choose Desktop app as the application type

    • Give it a name (e.g., "Images MCP")

    • Click Create

    • Copy the Client ID and Client Secret

2. Install

git clone https://github.com/itayshmool/images-mcp.git
cd images-mcp
npm install
npm run build

3. Sign in with Google

GOOGLE_CLIENT_ID="your-client-id" \
GOOGLE_CLIENT_SECRET="your-client-secret" \
npm run auth

Your browser will open for Google sign-in. After signing in, tokens are saved locally at ~/.config/images-mcp/tokens.json.

4. Add to your MCP client

Claude Code

Add to ~/.claude/settings.json:

{
  "mcpServers": {
    "images-mcp": {
      "command": "node",
      "args": ["/path/to/images-mcp/dist/index.js"],
      "env": {
        "GOOGLE_CLIENT_ID": "your-client-id",
        "GOOGLE_CLIENT_SECRET": "your-client-secret"
      }
    }
  }
}

Claude Desktop

Add to your Claude Desktop config:

{
  "mcpServers": {
    "images-mcp": {
      "command": "node",
      "args": ["/path/to/images-mcp/dist/index.js"],
      "env": {
        "GOOGLE_CLIENT_ID": "your-client-id",
        "GOOGLE_CLIENT_SECRET": "your-client-secret"
      }
    }
  }
}

Tools

generateImage

Generate an image from a text prompt.

Parameter

Required

Default

Description

prompt

Yes

Text description of the image

model

No

nano-banana-2

nano-banana-2 (fast) or nano-banana-pro (high fidelity)

aspectRatio

No

1:1

1:1, 16:9, 9:16, 4:3, 3:4, etc.

resolution

No

1K

512, 1K, 2K, or 4K

saveTo

No

local

local or drive

localPath

No

system temp

Directory to save to

fileName

No

auto

Output file name

editImage

Edit an existing image with a text instruction.

Parameter

Required

Default

Description

prompt

Yes

Edit instruction

sourceImagePath

No

Local path to source image

sourceDriveFileId

No

Google Drive file ID of source image

model

No

nano-banana-2

nano-banana-2 or nano-banana-pro

saveTo

No

local

local or drive

Provide either sourceImagePath or sourceDriveFileId.

Environment variables

Variable

Required

Description

GOOGLE_CLIENT_ID

Yes

OAuth client ID from Google Cloud Console

GOOGLE_CLIENT_SECRET

Yes

OAuth client secret from Google Cloud Console

IMAGES_MCP_TOKEN_PATH

No

Custom path for saved tokens (default: ~/.config/images-mcp/tokens.json)

License

MIT

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    A Model Context Protocol server that integrates with Google Drive and Google Sheets, enabling users to create, read, update, and manage spreadsheets through natural language commands.
    22,051 PyPI
    998
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    A Model Context Protocol server that provides seamless integration with Google Workspace, allowing operations with Google Drive, Docs, and Sheets through secure OAuth2 authentication.
    8
    87 PyPI
    3
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    A Model Context Protocol server that enables natural language interaction with Google Calendar, allowing users to view, create, update, and delete calendar events through context-aware operations.
    65 npm
    1
    MIT