flow-mcp
MCP server for generating images via Google Flow's API without daily quota limits, supporting text-to-image and image-to-image generation.
README
Google Flow MCP šØ
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)
Requirements
| Dependency | Notes |
|---|---|
| Python 3.11+ (or uv) | |
| Google Chrome or Playwright's Chromium | For authentication & generation |
| Xvfb (Linux headless only) | :99 display |
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 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
Xvfb :99 -screen 0 1280x720x24 & # or let flow-mcp auto-start it
flow-mcp auth login --browser internal
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.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.