Skip to main content
Glama
panda920

PanPan Image Generator MCP Server

by panda920

Features

  • Multi-model support — Gemini Pro Image Preview (1K/2K/4K) and Gemini Flash Image Preview

  • Image editing — Edit existing images with text instructions, supports multi-image reference

  • Batch generation — High-concurrency worker pool for parallel image generation

  • Shared context — Generate series of images with consistent style (great for slides, tutorials, card sets)

  • Resolution control — 1K / 2K / 4K presets or custom WxH, plus aspect ratio selection

  • Format conversion — Convert images to PDF or PowerPoint (PPTX)

  • Smart file handling — Auto-fallback output directory, customizable per-request save paths


Related MCP server: ModelsLab Text2Image MCP Server

Supported Models

Model ID

Alias

Quality

gemini-3-pro-image-preview

nanobananapro

High quality, 1K

gemini-3-pro-image-preview-2k

High quality, 2K

gemini-3-pro-image-preview-4k

High quality, 4K

gemini-3.1-flash-image-preview

nanobanana2, gemini-flash

Fast

All models are accessed through any OpenAI-compatible API endpoint that supports Gemini image generation.


Demo


Quick Start

Install

git clone https://github.com/panda920/panpan-image-generator-mcp.git
cd panpan-image-generator-mcp
npm install

Configure

Copy the example env file and fill in your API key:

cp .env.example .env

Edit .env:

GEMINI_API_KEY=your_api_key_here
GEMINI_API_BASE=https://openrouter.ai/api/v1

Use with Claude Code

Add to ~/.claude.json:

{
  "mcpServers": {
    "panpan-image-generator": {
      "type": "stdio",
      "command": "node",
      "args": ["/path/to/panpan-image-generator-mcp/panpan-image-generator-mcp-server.js"],
      "env": {
        "GEMINI_API_KEY": "your_api_key",
        "GEMINI_API_BASE": "https://openrouter.ai/api/v1"
      }
    }
  }
}

Tools

Image Generation

Tool

Description

generate_image_batch

Generate one or more images with high concurrency. Supports all 4 models, custom resolution and aspect ratio.

generate_image_with_shared_context

Batch generate images with shared style context for visual consistency. Ideal for slides, tutorials, card sets.

Image Editing

Tool

Description

edit_image_nano

Edit images (single or batch). Supports all 4 models, multi-image reference, custom resolution and aspect ratio.

Format Conversion

Tool

Description

images_to_pdf

Convert multiple images to a PDF document (one image per page, full bleed).

images_to_pptx

Convert multiple images to a PowerPoint presentation.


Examples

In Claude Code, just ask naturally:

Generate a cyberpunk cityscape at night in 4K

Edit this image: change the background to blue

Batch generate 5 cat illustrations in different styles

Create a 10-slide presentation with consistent branding, then export to PPTX

Environment Variables

Variable

Default

Description

GEMINI_API_KEY

API key (required)

GEMINI_API_BASE

https://openrouter.ai/api/v1

OpenAI-compatible API base URL

GEMINI_MODEL

gemini-3-pro-image-preview

Default Pro model

GEMINI_FLASH_MODEL

gemini-3.1-flash-image-preview

Default Flash model

OUTPUT_DIR

Current working directory

Default output directory


Requirements

  • Node.js >= 18.0.0


License

MIT License


F
license - not found
-
quality - not tested
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/panda920/panpan-image-generator-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server