Skip to main content
Glama

Google Flow MCP 🎨

Python 3.11+ MCP License: MIT

MCP server for generating images via Google Flow β€” no daily quota limits.

Claude Code (or any MCP client) can generate images with Google Flow through its batchexecute transport, driven from a Playwright browser context with your saved authentication, bypassing the Flow Agent chat quota (~10 images/day).

Features

  • Text-to-Image β€” generate images from text prompts

  • Image-to-Image β€” use a reference image (pass reference_image)

  • No quota limits β€” drives Flow's batchexecute transport, not the chat

  • Persistent browser pool β€” reuses Chrome across generations (faster)

  • Auto-retry β€” re-mints a single-use reCAPTCHA per attempt

  • Progress reporting β€” shows generation progress in Claude Code

  • No external CLI dependencies β€” includes its own auth/login

  • Cross-platform β€” Windows, macOS, Linux (incl. headless)

Related MCP server: Nano Banana MCP

Requirements

Dependency

Notes

Python 3.11+ (or uv)

Google Chrome or Playwright's Chromium

For authentication & generation

Xvfb (Linux headless only)

For auth login only (MCP server runs headless)

Installation

Prerequisites

  • Python 3.11+

  • Google Chrome (for authentication)

  • Playwright browsers (for generation)

pip install flow-mcp

# Or with uv:
# uv pip install flow-mcp

# Install Playwright browsers
playwright install chromium

# Authenticate with Google Flow
flow-mcp auth login

Or install from GitHub

git clone https://github.com/alarconcesar/flow-mcp.git
cd flow-mcp
uv pip install -e .
playwright install chromium
flow-mcp auth login

Usage with Claude Code

Add to your .claude/settings.json:

{
  "mcpServers": {
    "flow-image-server": {
      "command": "uv",
      "args": ["run", "flow-mcp"]
    }
  }
}

Restart Claude Code. The generate_image tool will be available.

Parameters

Parameter

Type

Default

Description

prompt

string

optional*

Text description of the image

prompts

string[]

optional*

1–4 different prompts β†’ one image each, in a single batched call. Overrides prompt/count

model

enum

nano-pro

nano2, nano-pro, narwhal, gem_pix_2

count

integer

1

Number of images (1–4) for the same prompt

aspect

enum

9:16

9:16, 16:9, 1:1, 4:3, 3:4

seeds

integer[]

optional

One RNG seed per image (per prompt). Same prompt + model + seed β†’ reproducible

reference_image

string

optional

Path to a local image for I2I

* One of prompt or prompts is required. Max 4 images per call either way.

Examples

Text-to-Image:

Generate an image of a cyberpunk city at night, neon lights, 16:9

Batch (4 different images, one round):

prompts: [
  "logo mark, orange cat head, flat vector",
  "logo mark, robot head, flat vector",
  "logo mark, leaf, flat vector",
  "logo mark, lightning bolt, flat vector"
]

One batchexecute call β†’ ~20 s for all four, instead of ~25 s each.

Batch of more than 4 (generate_batch):

generate_batch(prompts: [12 icon ideas], aspect: "1:1", resolution: "2k")

Splits the list into rounds of 4 (Flow's per-request limit), runs them sequentially on the same browser session and retries once whatever Flow skipped. Returns JSON: requested, generated, rounds, images[] (index, prompt, path, kb), plus missing[]/errors[] only when something did not come out. \nImage-to-Image:

Take this photo and make it cyberpunk style,
reference_image: /Users/me/photo.jpg

CLI commands

flow-mcp                    # Start MCP server (stdio mode)
flow-mcp auth login         # Authenticate with Google Flow
flow-mcp auth list          # List saved profiles
flow-mcp help               # Show help

Environment variables

Variable

Default

Description

GFLOW_PROFILE

auto-detected

Profile name

GFLOW_CLI_HOME

platform default

gflow-cli data directory

GFLOW_OUTPUT_DIR

temp directory

Where to save generated images

Troubleshooting

Auth expired

flow-mcp auth login

Content filter

Google Flow silently blocks certain prompts (returns None). Try rephrasing β€” avoid violence, NSFW, or trademarked content.

Linux headless

# Only needed for authentication (the MCP server itself runs headless)
Xvfb :99 -screen 0 1280x720x24 &
DISPLAY=:99 flow-mcp auth login --browser internal

The MCP server (flow-mcp) now runs completely headless β€” no Xvfb needed for generation.

Profile not found

flow-mcp auth list         # list profiles
flow-mcp auth login        # create a new profile

Project structure

flow-mcp/
β”œβ”€β”€ src/
β”‚   └── flow_mcp/
β”‚       β”œβ”€β”€ __init__.py      # Package metadata & logging config
β”‚       β”œβ”€β”€ __main__.py      # CLI entry point (auth, server)
β”‚       β”œβ”€β”€ server.py        # FastMCP tool definition
β”‚       β”œβ”€β”€ generator.py     # Core generation logic
β”‚       β”œβ”€β”€ browser.py       # Playwright context & token capture
β”‚       β”œβ”€β”€ browser_pool.py  # Persistent browser context pool
β”‚       β”œβ”€β”€ auth.py          # Login, profile list commands
β”‚       β”œβ”€β”€ profile.py       # Profile resolution
β”‚       β”œβ”€β”€ recaptcha.py     # reCAPTCHA token minting
β”‚       β”œβ”€β”€ chrome_helpers.py # Chrome detection
β”‚       └── constants.py     # Shared constants
β”œβ”€β”€ pyproject.toml
β”œβ”€β”€ LICENSE (MIT)
└── README.md

License

MIT β€” see LICENSE.

Available Tools

1 tool
generate_imageA

Generate images via Google Flow's batchGenerateImages API. Bypasses the Flow Agent chat quota (~10/day) by calling the API directly from a browser context with your saved authentication. Supports text-to-image and image-to-image (pass a reference_image path). Supports upscale to 2K/4K (pass resolution parameter). Models: nano-pro (default), nano2 (fast), narwhal, gem_pix_2. Aspects: 9:16 (default portrait), 16:9 (landscape), 1:1 (square), 4:3, 3:4. Resolutions: 1k (default, original), 2k, 4k (requires Ultra).

Inputs: prompt (required), count, model, aspect, +2 more. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.4/5.0

    Scored across 1 tool

    Disambiguation5/5

    With only one tool, there is no possibility for confusion or overlap between tools. The single tool has a clear, distinct purpose.

    Naming Consistency5/5

    The sole tool uses a consistent verb_noun pattern (generate_image). With only one tool, naming consistency is inherently maintained.

    Tool Count3/5

    The server has only one tool, which is on the low end of reasonable scope. While the tool itself is feature-rich, a single tool may feel insufficient for a full image generation service.

    Completeness4/5

    The tool covers a wide range of image generation capabilities (text-to-image, image-to-image, upscaling, multiple models and resolutions). Minor gaps like model listing or configuration retrieval are absent but not critical for core functionality.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers