flow-mcp
This MCP server exposes a single generate_image tool for creating and upscaling images via Google Flow using saved authentication, bypassing the normal chat quota.
Generate text-to-image from a required
prompt.Generate multiple images with
countfor the same prompt (README notes 1β4).Use image-to-image by passing a local
reference_imagepath.Choose models:
nano2,nano-pro,narwhal, orgem_pix_2.Choose aspect ratios:
9:16,16:9,1:1,4:3, or3:4.Set resolution/upscale to
1k,2k, or4k;4krequires Ultra per the tool description.Return a string result via the toolβs output schema.
Provides tools for generating images using Google Flow's image generation API, supporting text-to-image and image-to-image capabilities with no daily quota limits.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@flow-mcpgenerate an image of a futuristic cityscape at sunset"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Google Flow MCP π¨
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
batchexecutetransport, not the chatPersistent 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 |
Installation
Prerequisites
Python 3.11+
Google Chrome (for authentication)
Playwright browsers (for generation)
Install from PyPI (recommended)
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 loginOr 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 loginUsage 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 |
| string | optional* | Text description of the image |
| string[] | optional* | 1β4 different prompts β one image each, in a single batched call. Overrides |
| enum |
|
|
| integer |
| Number of images (1β4) for the same prompt |
| enum |
|
|
| integer[] | optional | One RNG seed per image (per prompt). Same prompt + model + seed β reproducible |
| 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:9Batch (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.jpgCLI 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 helpEnvironment variables
Variable | Default | Description |
| auto-detected | Profile name |
| platform default | gflow-cli data directory |
| temp directory | Where to save generated images |
Troubleshooting
Auth expired
flow-mcp auth loginContent 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 internalThe 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 profileProject 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.mdLicense
MIT β see LICENSE.
Available Tools
1 toolgenerate_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).
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | ||
| model | No | nano-pro | |
| aspect | No | 9:16 | |
| prompt | Yes | ||
| resolution | No | 1k | |
| reference_image | No |
Output Schema
| Name | Required | Description |
|---|---|---|
| result | Yes |
TDQS
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.
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.
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.
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.
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.
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 tool update
v0.2.0- First observed
generate_image
TDQS
Scored across 1 tool
With only one tool, there is no possibility for confusion or overlap between tools. The single tool has a clear, distinct purpose.
The sole tool uses a consistent verb_noun pattern (generate_image). With only one tool, naming consistency is inherently maintained.
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.
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
Related MCP Connectors
MCP server for Flux AI image generation
MCP server for Qwen Image 3 AI image generation
MCP server for Midjourney AI image generation and editing
MCP server for Google Veo AI video generation
Related MCP Servers
- AlicenseBqualityDmaintenanceMCP server for generating images and audio using Google's Gemini AI models.272 PyPI2MIT
- AlicenseAqualityDmaintenanceMCP server for AI image generation and editing using Google Gemini image models.71,595 npmMIT
- AlicenseAqualityDmaintenanceMCP server for generating and editing images using Google Gemini API. Supports text-to-image generation, image editing, and image description.39 npmMIT
- AlicenseBqualityDmaintenanceSelf-hosted MCP server for Google Flow that enables image and video generation, upscaling, and character consistency through your own Google account.22MIT