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 using Google Flow's batchGenerateImages API directly through 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 — calls the API directly, not through the chat

  • Persistent browser pool — reuses Chrome across generations (faster)

  • Auto-retry — refreshes auth token if it expires

  • 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

required

Text description of the image

model

enum

nano-pro

nano2, nano-pro, narwhal, gem_pix_2

count

integer

1

Number of images (1–4)

aspect

enum

9:16

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

reference_image

string

optional

Path to a local image for I2I

Examples

Text-to-Image:

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

Image-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).

ParametersJSON Schema
NameRequiredDescriptionDefault
countNo
modelNonano-pro
aspectNo9:16
promptYes
resolutionNo1k
reference_imageNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.4/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It discloses that it uses saved authentication, bypasses chat quotas, and supports upscale. It notes the 'Ultra' requirement for 4K. However, it omits rate limits, costs, and error behavior, preventing a higher score.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single dense paragraph, but it is well-structured and front-loaded with the core purpose. It packs significant detail without extraneous words. Could be slightly improved by using bullet points for readability, but it remains concise and informative.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 6 parameters (1 required), 2 enums, and an output schema (true), the description covers the essential functionality, parameter options, and quirks like the Ultra requirement. It lacks details on return values, but the output schema likely covers that. Minor gaps in error handling or batch limitations prevent a perfect score.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It adds substantial meaning: explains `count` as number of images, lists model options with defaults, interprets `aspect` ratios, clarifies `resolution` defaults and options (1k, 2k, 4k), and describes `reference_image` for image-to-image. This fully compensates for the lack of schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description explicitly states it generates images via Google Flow's batchGenerateImages API, lists supported modes (text-to-image and image-to-image), and details models, aspects, and resolutions. It clearly distinguishes itself from the Flow Agent chat quota by noting it bypasses that limitation, making the purpose unmistakable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear usage guidance, such as bypassing the chat quota and requiring 'Ultra' for 4K. It details options without ambiguity. However, it does not explicitly state when not to use this tool or mention alternatives, though no sibling tools exist. Slight room for improvement.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

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

  1. 1 tool updatev0.2.0
    • First observedgenerate_image

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

ActivitySlowing
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers