Skip to main content
Glama

google-flow-mcp

CI License: MIT

An MCP server that lets AI agents like Claude generate images in Google Flow and download them to disk.

An agent can:

  • choose the model, aspect ratio and number of images

  • submit a prompt and wait for the results

  • download them at 1K (original), 2K or 4K (upscaled)

It works by operating the real Flow web app in a Chrome window that you sign into once. You don't need an API key.

Unofficial. This project is not affiliated with or endorsed by Google. It automates Flow's web UI on your own account, using your own subscription and credits. Review Google's terms before using it heavily, and expect breakage when Flow changes its UI.

Contents

Related MCP server: google-flow-mcp

Requirements

  • Node.js 20 or newer

  • Google Chrome (or Chromium)

  • A Google account with access to Flow (a Google AI plan for paid models and credits)

Install

git clone https://github.com/Dilantha-Wijesinghe/google-flow-mcp.git
cd google-flow-mcp
npm install        # also builds dist/

Claude Code

claude mcp add google-flow -- node /absolute/path/to/google-flow-mcp/dist/index.js

Claude Desktop and other MCP clients

{
  "mcpServers": {
    "google-flow": {
      "command": "node",
      "args": ["/absolute/path/to/google-flow-mcp/dist/index.js"]
    }
  }
}

First run

  1. Ask your agent to call flow_status, or run npm run call -- flow_status.

  2. The server launches Chrome with a dedicated profile (~/.flow-mcp/chrome-profile) and remote debugging on 127.0.0.1:9222.

  3. Sign into Google in that window and open flow.google.com once. The sign-in persists for later sessions.

Why a separate profile? Chrome 136 and later refuse remote debugging on your everyday profile. Google sign-in also blocks browsers launched by automation tools. So the server starts a normal Chrome process on its own profile and attaches to it.

Tools

Tool

Purpose

flow_status

Connect to Chrome, launching it if needed, and report signedIn.

flow_get_options

List the models, aspect ratios and counts Flow currently offers your account, read live from the UI.

flow_generate_images

Generate images. Returns new mediaIds, and downloads them too when download_size is set.

flow_download_images

Download images by media id at 1K, 2K or 4K.

flow_generate_images arguments

Argument

Description

prompt

Required.

aspect_ratio

16:9, 4:3, 1:1, 3:4 or 9:16. Omit to keep the current setting.

model

Full name or a unique fragment, e.g. Nano Banana Pro or 2 lite.

count

1–4.

project

default (a project the server creates and reuses), new, current, or a https://flow.google.com/project/<id> URL.

max_credits

Default 0. The server refuses to submit when Flow says the generation costs more.

dry_run

Apply the settings and return the credit cost without generating.

download_size / output_dir

Download the results in the same call. The default directory is ~/Downloads/flow-mcp.

timeout_sec

Default 240.

Example

"Generate 4 cinematic 16:9 images of a lighthouse at golden hour with Nano Banana Pro and save them to ~/Pictures/lighthouse."

The agent calls:

{
  "prompt": "A lighthouse on a rocky coast at golden hour, cinematic wide shot",
  "model": "Nano Banana Pro",
  "aspect_ratio": "16:9",
  "count": 4,
  "download_size": "1K",
  "output_dir": "/Users/you/Pictures/lighthouse"
}

And it gets back:

{
  "projectUrl": "https://flow.google.com/project/…",
  "mediaIds": ["37be9df5-…", "38d1a484-…", "…"],
  "credits": 0,
  "settings": "Nano Banana Pro · 16:9 · x4",
  "files": [{ "mediaId": "37be9df5-…", "path": "/Users/you/Pictures/lighthouse/Lighthouse_…_1K_37be9df5.jpg", "bytes": 917811 }],
  "failures": []
}

Command-line testing

npm run call                                  # list tools
npm run call -- flow_status
npm run call -- flow_get_options
npm run call -- flow_generate_images '{"prompt":"a red fox in snow","aspect_ratio":"16:9","count":2,"download_size":"1K"}'

Configuration

Set these environment variables in your MCP client config:

Variable

Default

FLOW_MCP_CDP_URL

http://127.0.0.1:9222

FLOW_MCP_AUTO_LAUNCH

1. Set 0 to require a Chrome you started yourself.

FLOW_MCP_CHROME_PATH

Auto-detected for macOS, Windows and Linux.

FLOW_MCP_PROFILE_DIR

~/.flow-mcp/chrome-profile

FLOW_MCP_OUTPUT_DIR

~/Downloads/flow-mcp

How it works

These details were observed on flow.google.com in October 2026.

  • Settings: the prompt bar's settings chip opens a popover containing:

    • Image/Video toggles, aspect ratio and count, all Angular Material role=radio buttons matched by label.

    • A model menu.

  • Prompt: a ProseMirror editor. The server types into it with real keyboard input.

  • Credits: before submitting, the server reads the "Generating will use N credits" line and enforces max_credits.

  • Progress: each pending image shows a .loading-percentage placeholder. Finished images are <img data-media-id> tiles. New images are found by diffing media ids before and after.

  • Download: the tile menu offers Download → 1K, 2K or 4K. Flow builds the file as a blob: URL and clicks an <a download>. The server intercepts only the click it triggered and writes the bytes where you asked, so Chrome's download settings don't matter.

  • One job at a time: jobs are serialized. Flow attaches a single-use reCAPTCHA token to each generation and flags rapid-fire requests.

All selectors live in SEL at the top of src/flow.ts.

Why UI automation and not Flow's private API?

In September 2026 Flow moved from labs.google/fx to flow.google.com, and the old aisandbox-pa.googleapis.com endpoints stopped working. The new backend uses Google's internal batchexecute RPC, and each generation needs a single-use reCAPTCHA Enterprise token minted in the browser. Replaying that traffic over plain HTTP means working around the bot check. It also breaks every time RPC ids rotate. Driving the real UI is slower, around 20 seconds per batch, but it stays within normal use of the site.

Troubleshooting

Symptom

Fix

signedIn: false

Sign into Google in the Chrome window the server opened, then retry.

No Chrome DevTools endpoint

Chrome isn't running with remote debugging. Leave FLOW_MCP_AUTO_LAUNCH=1, or start Chrome with --remote-debugging-port=9222 --user-data-dir=<dir>.

Port 9222 in use

Set FLOW_MCP_CDP_URL=http://127.0.0.1:9333. The server launches Chrome on that port.

Timeouts or "not found" after a Flow update

Flow's UI changed. Update the selectors in SEL and open an issue.

would use N credits … above max_credits

Working as intended. Raise max_credits if you accept the cost.

Known limitations

  • Images only. Flow's video mode is not wired up yet.

  • 2K and 4K downloads trigger Flow's upscaler, which may use credits. max_credits does not cover upscaling.

  • Tested on macOS with Chrome 155. Windows and Linux paths are auto-detected but less tested.

Security

  • ~/.flow-mcp/chrome-profile holds a signed-in Google session. Treat it like a password and never share or commit it.

  • The DevTools port is bound to 127.0.0.1. Anything running locally as your user can drive that browser while it is open, so close the window when you're not using it.

  • To report a vulnerability, use GitHub's private vulnerability reporting.

Contributing

Issues and pull requests are welcome. See CONTRIBUTING.md.

These were reviewed while building this one:

License

MIT

Available Tools

4 tools
flow_download_imagesDownload Flow imagesA

Download images from a Flow project by media id. 1K is the original file; 2K and 4K are upscaled by Flow on request and can take a few minutes.

NameRequiredDescriptionDefault
sizeNo1K
projectNoProject containing the images. Defaults to the project the Flow tab is on.
media_idsYesMedia ids returned by flow_generate_images.
output_dirNoAbsolute directory (default ~/Downloads/flow-mcp).

TDQS

A3.6/5.0
Behavior3/5

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

With no annotations, the description carries the full burden, and it does disclose one valuable trait: 2K/4K are server-side upscales that 'can take a few minutes,' warning the agent about latency. It says nothing about where files are written, overwrite behavior, or failure modes, and notably omits what the call actually returns.

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

Conciseness5/5

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

Two sentences, front-loaded with the operation, then the subordinate detail about size semantics. Nothing is padded and nothing is buried.

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

Completeness3/5

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

Parameters are well covered between schema and description, but this is a file-producing tool with no output schema, and the description never says what comes back (paths? file objects?) or how multiple media_ids are handled. A short return-value sentence would make it complete.

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

Parameters4/5

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

Schema coverage is 75% and the schema already explains project, media_ids, and output_dir, but the description adds genuine meaning for the size enum: 1K is the original file while 2K/4K are Flow-generated upscales. That distinguishes the values in a way the bare enum cannot.

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

Purpose4/5

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

The description states a specific verb and resource ('Download images from a Flow project by media id'), which cleanly separates it from the generate-oriented sibling flow_generate_images. It stops short of naming the siblings explicitly, but the operation is unambiguous.

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

Usage Guidelines3/5

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

Usage is only implied: the description's media-id reference plus the schema note that ids come from flow_generate_images hint at the generate-then-download workflow, but the description itself never says when to call this versus flow_status or flow_get_options, nor any preconditions.

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

flow_generate_imagesGenerate images in FlowA

Set aspect ratio, model and number of images in Google Flow, submit the prompt, and wait until the images finish. Returns the new media ids. Pass download_size to also download them in the same call. Refuses to run when Flow says it would cost more than max_credits.

NameRequiredDescriptionDefault
countNoImages to generate (Flow offers 1-4). Omit to keep the current setting.
modelNoModel name or unique part of it, e.g. "Nano Banana Pro", "Nano Banana 2.1", "2 Lite". Omit to keep the current one.
promptYesImage prompt.
dry_runNoApply the settings and return Flow's credit cost without generating.
projectNoWhich Flow project to use: "default" (a project this server created and reuses), "new", "current" (whatever the Flow tab shows), or a https://flow.google.com/project/<id> URL.
output_dirNoAbsolute directory for downloads (default ~/Downloads/flow-mcp).
max_creditsNoAbort if Flow's displayed credit cost exceeds this. Default 0 = only free generations.
timeout_secNo
aspect_ratioNoe.g. "16:9", "4:3", "1:1", "3:4", "9:16". Omit to keep the current setting.
download_sizeNoIf set, download the results at this size after generating.

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations, the description carries the burden and mostly does: it discloses that the call is long-blocking ('wait until the images finish'), returns media ids, can download as a side effect, and self-aborts on credit cost. It omits prerequisites (Flow tab/session, auth) and what happens on timeout, which matters for a browser-driven mutation.

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?

Three sentences, front-loaded with the action, followed by the return value and the two notable side effects. No filler; only the opening setting list slightly overlaps the later mentions.

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?

For a 10-parameter, long-running generation tool with no output schema, the description covers workflow, return value, download side effect, and the credit guard. Gaps are the failure/timeout behavior and the fact that settings persist to the Flow session, but nothing essential to calling it correctly is missing.

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

Parameters3/5

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

Schema description coverage is 90%, so the schema already explains count, model, aspect_ratio, download_size, max_credits and dry_run. The description repeats the same fields (aspect ratio, model, count, download_size, max_credits) without adding syntax or semantics, and leaves timeout_sec and project entirely to the schema. Baseline 3 is appropriate.

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

Purpose4/5

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

Opens with a specific verb-plus-resource ('Set aspect ratio, model and number of images in Google Flow, submit the prompt, and wait until the images finish') and states the return value ('new media ids'). It is clearly distinct from flow_status and flow_get_options, though it doesn't explain its relationship to flow_download_images despite exposing an inline download option.

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

Usage Guidelines3/5

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

It gives two useful conditional hints: pass download_size to fetch results in the same call, and the tool refuses to run above max_credits. But it never routes the agent to alternatives — e.g. when to prefer dry_run, flow_get_options for previewing settings, or flow_download_images instead of the inline download.

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

flow_get_optionsList Flow image optionsA

Read the image models, aspect ratios and image counts Flow currently offers this account, plus the current selection. Values are read live from the UI; use them verbatim in flow_generate_images.

NameRequiredDescriptionDefault
projectNoWhich Flow project to use: "default" (a project this server created and reuses), "new", "current" (whatever the Flow tab shows), or a https://flow.google.com/project/<id> URL.

TDQS

A4.2/5.0
Behavior4/5

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

With no annotations, the description carries the burden and does disclose key traits: values are read live from the UI, are account-specific, and are volatile enough that they must be passed verbatim. It does not mention auth/session requirements or failure behavior if the Flow tab is unavailable, which is the main remaining gap.

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

Conciseness5/5

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

Two sentences, zero filler, and the payload contents are front-loaded before the usage instruction. Nothing redundant with the title or schema.

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?

There is no output schema, so the description must convey return contents, and it does by listing the four pieces of data returned. It could go one step further on the shape of the selection field, but an agent has enough to call and use it correctly.

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

Parameters3/5

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

Schema coverage is 100% and the single optional project parameter is fully documented in the schema with its enum-like accepted values (default/new/current/URL). The description adds nothing about project selection, so the baseline of 3 applies.

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?

Names a specific verb (read) and enumerates the exact resource contents: image models, aspect ratios, image counts, and the current selection, all account-scoped. The closing reference to flow_generate_images makes clear it is the companion lookup tool rather than a generator or a status check like flow_status.

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?

"use them verbatim in flow_generate_images" tells the agent this is the pre-flight read before generation and that values must not be constructed by hand. It stops short of explicitly stating it should be called before every generation or what happens if omitted, but the context for use is clear.

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

flow_statusFlow statusA

Connect to the Flow Chrome window (launching it on first use) and report whether you are signed in. Call this first; if signedIn is false, ask the user to sign into Google in the Chrome window that opened.

NameRequiredDescriptionDefault

No parameters

TDQS

A4.7/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose the key hidden behavior: it launches a Chrome window as a side effect on first use and depends on a Google sign-in in that window. It does not cover failure modes (Chrome missing, connection timeout) or whether the call blocks while the window opens, which keeps it short of a 5.

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

Conciseness5/5

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

Two sentences with no waste: the side effect (window launch) is front-loaded, then the sequencing and conditional instruction. Every clause earns its place.

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

Completeness5/5

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

For a zero-parameter, no-output-schema status check, the description supplies the essentials an agent needs: the side effect of launching Chrome, the ordering constraint, and the meaning of the signedIn result with the follow-up action. Nothing critical for correct invocation is missing.

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

Parameters4/5

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

The tool takes zero parameters, so the baseline is 4 and there is nothing for the description to add. The mention of the signedIn result field is a small bonus rather than parameter guidance.

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?

States specific verbs and resources: it connects to the Flow Chrome window, launching it on first use, and reports sign-in status. That is clearly distinct from the sibling tools (get options, generate images, download images), so an agent can tell it is the prerequisite/setup check without opening any schema.

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

Usage Guidelines5/5

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

Explicitly says "Call this first", which establishes ordering relative to the siblings, and adds a branching instruction: if signedIn is false, ask the user to sign into Google in the Chrome window that opened. Both when to use it and what to do with the result are spelled out rather than inferred.

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. 4 tool updatesv0.1.0
    • First observedflow_download_images
    • First observedflow_generate_images
    • First observedflow_get_options
    • First observedflow_status

TDQS

A3.9/5.0

Scored across 4 tools

Disambiguation4/5

Each tool maps to a distinct step in a linear pipeline (connect/sign-in, read options, generate, download), so misselection is unlikely. The one soft overlap is that flow_generate_images can also download when given download_size, duplicating part of flow_download_images' purpose.

Naming Consistency4/5

All names share a clear flow_ prefix in snake_case, and three of four follow a verb_noun pattern (get_options, generate_images, download_images). flow_status deviates by omitting the verb, a minor inconsistency against an otherwise predictable scheme.

Tool Count4/5

Four tools is a tight, purposeful set matching a narrow browser-automation workflow, with no filler tools. It sits at the low edge of the comfortable range, but each tool earns its place as a pipeline stage.

Completeness4/5

The happy path (status, options, generate, download) is fully covered with no dead ends for a straightforward generation run. Minor gaps exist around recovery and discovery: no way to list existing projects/media ids or re-check an in-flight generation, so a timed-out generate leaves the agent with no fallback.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers