google-flow-mcp
This server lets an AI assistant drive Google Flow through your own Chrome session — generating Veo videos and Nano Banana images, downloading them, and stitching long seamless takes with Scene Builder, all with dry runs and crash-safe resume.
Session & UI:
flow_connectattaches to Chrome and checks login;flow_statusreports connection/project/scene/in-flight jobs;flow_screenshotcaptures the tab;flow_inspectsnapshots/diffs the live UI, searches text, finds media tiles, and watches network requests.Project & media:
flow_project_openopens a Flow project and lists its media ids;flow_media_downloaddownloads any video/image by media id through the authenticated browser session.Video generation:
flow_generate_videocreates clips with Veo 3.1 Lite/Fast/Quality or Omni Flash, 4–10 s, 9:16 or 16:9, with optional keyframe/reference images, dry-run (auto_confirm: false), andresume: trueto recover in-flight jobs.Image generation:
flow_generate_imagecreates Nano Banana Pro / 2 / 2 Lite images, 1–4 at a time, in common aspect ratios, with references and the same dry-run/resume safety.Scene Builder:
flow_scene_addturns a clip into a scene;flow_scene_statusreads its timeline;flow_scene_extendadds 7-second continuous-motion/audio hops (Veo 3.1 Lite) idempotently, and downloaded clips can be concatenated locally with ffmpeg.Safe by design: credit-spending tools prepare without sending unless you confirm, retries return existing outputs instead of double-billing, job files survive crashes, and every result is structured
{ ok, code, message, details };doctorhelps with Chrome/Login/hung-tab troubleshooting.
Provides tools for driving Google Flow, enabling AI agents to generate videos with Veo, generate images with Nano Banana, manage media, and extend clips using Scene Builder.
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., "@google-flow-mcp generate a 9:16 video of a dog running on the beach"
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
English | 한국어
Let your AI assistant make videos in Google Flow (Veo, Nano Banana) — and stitch them into long, seamless takes with Scene Builder — in plain language:
"Generate an 8-second vertical clip from this keyframe: a rooster crowing on a stone wall at dawn."
"Add it to a scene and extend it twice — keep the slow push-in going, then let the camera rise into the sky."
"Make three 9:16 poster images of a copper weathervane with Nano Banana."
"Show me what the Flow page looks like right now." (
flow_inspect/flow_screenshot)
This is a Model Context Protocol (MCP) server that drives Google Flow through your own Chrome session. It works with Claude Code, Claude Desktop, Cursor, VS Code, Gemini CLI — any MCP client — and with plain JSON-RPC scripts.
❌ Without / ✅ With
❌ Without | ✅ With google-flow-mcp |
Flow has no public API; every clip is a manual click session | Your agent calls |
Veo clips are capped at 8 seconds |
|
One wrong click spends credits | Every generating tool has a dry run ( |
A crash mid-render loses track of the job | Job records on disk let |
UI changes break scrapers silently |
|
Related MCP server: google-labs-mcp
🏗️ Architecture
flowchart LR
C["🤖 MCP client<br/>Claude Code · Claude Desktop · Cursor · VS Code · Gemini CLI<br/>or any JSON-RPC script"]
subgraph S["google-flow-mcp — runs on your machine"]
direction TB
T["11 tools<br/>session · generate · media · scene builder"]
F["Flow automation<br/>agent composer · scene timeline · media ids"]
J["Job records<br/>~/.google-flow-mcp/jobs"]
end
subgraph B["Google Chrome (your profile, port 9333)"]
P["one tab owned by this server"]
end
G["☁️ Google Flow<br/>flow.google.com · Veo 3.1 · Omni · Nano Banana"]
C <-->|"MCP over stdio"| T
T --> F
F <-->|"Playwright over CDP"| P
P <-->|"HTTPS, your login"| G
F -.-> JChrome is launched outside Playwright (so Google's sign-in accepts it) with a dedicated profile that keeps your login. The server never sees a password; prompts go to Flow exactly as you wrote them; downloads come back through the browser's own authenticated session.
✨ Features
🎥 Video generation through the Flow agent composer — Veo 3.1 Lite / Fast / Quality and Omni Flash, 4–10 s, 9:16 or 16:9, with a keyframe as first frame
🖼️ Image generation with Nano Banana Pro / 2 / 2 Lite, any Flow aspect ratio, reference images
🧩 Scene Builder: create a scene from a clip, read its timeline, extend the last clip by 7-second hops that continue motion and ambient audio
🧪 Dry runs for every credit-spending tool, and idempotent retries — asking for the same extension twice returns the file, not a second bill
💾 Crash-safe: long renders are tracked in job files;
resume: truefinishes them after a restart or timeout🔍 UI inspection (
flow_inspect): snapshot/diff of the live page, text search, media tile positions, network watch🧾 Structured results:
{ ok, code, message, details }— clients branch on error codes, never on message text🩺
doctorchecks Chrome, the port, your login and finds hung tabs that would block connections🇰🇷 🇺🇸 Korean and English Flow UI labels out of the box (add yours in one file)
🚀 Quick start
Requirements
What | Why |
Node.js 20+ | runs the server ( |
Google Chrome | the automation target; macOS path is the default, others via config |
A Google account with Flow access + credits | generations cost Flow credits exactly like clicking Generate yourself |
1️⃣ Register the server in your client
claude mcp add google-flow -- npx -y @park-sang-gwon/google-flow-mcpclaude_desktop_config.json → mcpServers:
{
"mcpServers": {
"google-flow": { "command": "npx", "args": ["-y", "@park-sang-gwon/google-flow-mcp"] }
}
}~/.cursor/mcp.json (or project .cursor/mcp.json):
{
"mcpServers": {
"google-flow": { "command": "npx", "args": ["-y", "@park-sang-gwon/google-flow-mcp"] }
}
}.vscode/mcp.json:
{
"servers": {
"google-flow": { "type": "stdio", "command": "npx", "args": ["-y", "@park-sang-gwon/google-flow-mcp"] }
}
}~/.gemini/settings.json:
{
"mcpServers": {
"google-flow": { "command": "npx", "args": ["-y", "@park-sang-gwon/google-flow-mcp"] }
}
}git clone https://github.com/ParkSangGwon/google-flow-mcp && cd google-flow-mcp
npm install && npm run build
claude mcp add google-flow -- node "$PWD/dist/cli.js"2️⃣ Sign in once
npx -y @park-sang-gwon/google-flow-mcp doctorThe first run launches a dedicated Chrome (~/.google-flow-chrome). Sign in to Google in that window — once. doctor then reports flow: logged in. From now on the server reuses that profile; there is nothing to configure unless Chrome is somewhere unusual (see Configuration).
3️⃣ Try it
Ask your assistant to open a Flow project and prepare a video without spending credits:
"Call
flow_project_openon https://flow.google.com/project/… thenflow_generate_videowithauto_confirm: falsefor an 8-second 9:16 clip of …"
You get status: "ready_for_confirmation" and a screenshot path. Say "go ahead" and the agent repeats the call with auto_confirm: true.
🎥 How a generation works
sequenceDiagram
autonumber
participant A as 🤖 Agent
participant S as google-flow-mcp
participant B as Chrome tab
participant F as ☁️ Google Flow
A->>S: flow_generate_video {prompt, model, reference_images, auto_confirm}
S->>B: open project · new agent session · settings (ratio, count, model, "confirm: never")
S->>B: attach keyframe → verify thumbnail (else REFERENCE_NOT_ATTACHED, nothing sent)
S->>B: fill instruction
alt auto_confirm = false
S-->>A: status: ready_for_confirmation + screenshot (0 credits)
else auto_confirm = true
S->>S: write job record (baseline tile count)
S->>B: send (Enter) → handle approval card / policy refusal
B->>F: generate
loop every 6 s, up to 30 min
S->>B: more tiles than the baseline?
end
F-->>B: clip ready
S->>B: authenticated GET flow.google.com/asb/<token>
S-->>A: status: completed, files[], media_ids[], job_id
endIf the server dies or times out during the loop, call the same tool again with resume: true — it reloads the job, skips the composer and only waits/downloads.
🧩 Scene Builder: long, seamless takes
Flow's Scene Builder extends a clip by analysing its last frames and generating what happens next, keeping motion and ambient sound. This server automates the whole path:
flowchart LR
K["🖼️ keyframe"] --> V["flow_generate_video<br/>Veo 3.1 Fast · 8 s · 10 credits"]
V --> A["flow_scene_add<br/>tile ⋮ → Add to Scene → Create scene<br/>0 credits"]
A --> E1["flow_scene_extend #0<br/>Veo 3.1 Lite · +7 s · 5 credits"]
E1 --> E2["flow_scene_extend #1<br/>+7 s · 5 credits"]
E2 --> N["…"]
V -.->|"seed.mp4"| X["ffmpeg concat<br/>(local, free)"]
E1 -.->|"hop1.mp4"| X
E2 -.->|"hop2.mp4"| X
X --> O["🎬 22 s take, one continuous motion"]What we measured on the live UI (September 2026, details in docs/scene-builder.md):
Fact | Value |
Extension length | 7.0 s per hop, separate MP4 with audio (720×1280 for a 9:16 seed) |
Seam | first frame of the hop == last frame of the previous clip (NCC 0.995–0.998), no overlap |
Model | fixed to Veo 3.1 - Lite by Flow (5 credits per hop on Ultra) |
Approval card | none |
Retry / crash |
|
Restate the subject, wardrobe, light and camera move in every hop prompt — Flow does not carry the previous prompt over.
Recipe:
seed = flow_generate_video { model: "veo-3.1-fast", duration: 8, reference_images: ["/abs/keyframe.jpg"], ... auto_confirm: true }
scene = flow_scene_add { project_url, media_id: seed.media_ids[0] }
hop1 = flow_scene_extend { scene_url: scene.scene_url, prompt: "…continues…", after_clip_index: 0, output_dir, auto_confirm: true }
hop2 = flow_scene_extend { ..., after_clip_index: 1, ... }
ffmpeg -i seed.mp4 -i hop1.mp4 -i hop2.mp4 -filter_complex "[0:v][0:a][1:v][1:a][2:v][2:a]concat=n=3:v=1:a=1" take.mp4🔧 Tools
Group | Tool | What it does | Credits |
🔌 Session |
| Attach to / launch Chrome, open Flow, report | – |
| Connection, login, current project/scene, running tool, in-flight jobs | – | |
| PNG of the owned tab | – | |
| Snapshot → action → diff of the UI; text search, media tiles, network | – | |
| Open a project, list its media ids | – | |
🎥 Generate |
| Veo 3.1 Lite/Fast/Quality, Omni Flash; keyframe; dry run; resume | ✅ |
| Nano Banana Pro / 2 / 2 Lite; 1–4 images; references; dry run; resume | ✅ | |
💾 Media |
| Download a media uuid through the logged-in session | – |
🧩 Scene Builder |
| Create a scene from a clip → | – |
| Clips, durations, media ids of a scene | – | |
| Extend the last clip by 7 s (Veo 3.1 Lite); idempotent; resume | ✅ |
Full input/output schemas: docs/tools.md (generated from the code, always in sync).
🧾 Results and errors
Every tool answers with one JSON text block:
// success
{ "ok": true, "status": "completed", "files": ["/abs/out/flow_ab12cd34_job.mp4"], "media_ids": ["ab12cd34"], "job_id": "mtk0…" }
// failure (isError: true) — never thrown, always structured
{ "ok": false, "code": "REFERENCE_NOT_ATTACHED", "message": "0/1 reference images attached; nothing was sent", "recoverable": false, "details": {}, "screenshot": "/…/reference-not-attached.png" }Code | Meaning | Retry? |
| Chrome is on the Google sign-in page | sign in first |
| the keyframe did not land in the composer; nothing sent | fix the path |
| Flow refused the prompt | rewrite prompt |
| no output within |
|
| another tool call holds this server's tab | wait, retry |
| a button/menu was not where expected (rows in | see Troubleshooting |
|
| check |
💳 Credits (Google AI Ultra, September 2026 — verify on your plan)
Model | Credits | Notes |
Veo 3.1 - Lite | 5 (4/6/8 s) | the only model Scene Builder Extend uses |
Veo 3.1 - Fast | 10 | |
Veo 3.1 - Quality | 100 | |
Omni Flash | 15 / 20 / 25 / 30 | 4 / 6 / 8 / 10 s; video-to-video edits 40 |
Scene Builder Extend hop | 5 | 7 s, Veo 3.1 - Lite |
⚙️ Configuration
Defaults work on macOS. Override with ~/.config/google-flow-mcp/config.json (npx -y @park-sang-gwon/google-flow-mcp init writes one) or FLOW_MCP_* environment variables:
Key | Env | Default |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The server speaks MCP over stdio; a raw JSON-RPC client is ~40 lines:
import json, subprocess, itertools
proc = subprocess.Popen(["npx", "-y", "@park-sang-gwon/google-flow-mcp"], stdin=subprocess.PIPE, stdout=subprocess.PIPE, text=True, bufsize=1)
ids = itertools.count(1)
def rpc(method, params=None, notify=False):
msg = {"jsonrpc": "2.0", "method": method, "params": params or {}}
if not notify: msg["id"] = next(ids)
proc.stdin.write(json.dumps(msg) + "\n"); proc.stdin.flush()
if notify: return None
for line in proc.stdout:
if line.startswith("{") and json.loads(line).get("id") == msg["id"]:
return json.loads(line)["result"]
rpc("initialize", {"protocolVersion": "2024-11-05", "capabilities": {}, "clientInfo": {"name": "me", "version": "0"}})
rpc("notifications/initialized", notify=True)
res = rpc("tools/call", {"name": "flow_status", "arguments": {}})
print(json.loads(res["content"][0]["text"]))Only JSON-RPC frames are written to stdout; logs go to stderr and ~/.google-flow-mcp/logs.
🩺 Troubleshooting
Symptom | What to do |
| Sign in once in the Chrome window the server opened, then call |
| A tab with a frozen renderer blocks Playwright for everyone. Run |
| Flow changed a label. Compare the rows with |
| The path must be absolute and exist on this machine; large PNGs upload slowly — JPEG is faster |
The agent keeps "announcing" but not generating | The server nudges it twice; if it still stalls the settings' "confirm before generating" was not set to Never — rerun the tool |
Two agents on one machine | Fine: each server owns one tab in the shared Chrome. Just keep their |
Logs: ~/.google-flow-mcp/logs/server-YYYY-MM-DD.log · screenshots of every phase and failure: ~/.google-flow-mcp/screenshots/.
❓ FAQ
Is this an official Google product? No. It is an unofficial automation of the Flow web UI; it uses no private API and does nothing you could not do by hand in the same browser.
Does it store my Google password? Never. You sign in inside Chrome; the session lives in the Chrome profile directory. Treat ~/.google-flow-chrome like a password store.
Can it download the finished scene from Scene Builder? Not in the current Flow build — the export renders but no file reaches an automated tab. Download the clips by media_id and concatenate locally (the seam is frame-exact).
Where is "Jump to"? The current Scene Builder menu only offers "Add clip" and "Extend", so there is nothing to automate yet.
Which Flow UI languages work? Korean and English are matched; other languages need their strings in src/flow/labels.ts — flow_inspect shows you exactly what is on screen.
🗺️ Roadmap
Adding a clip to an existing scene (asset picker)
Scene export once Flow lets an automated tab receive the file
Characters and the Tools gallery
More UI languages
🤝 Contributing
npm install
npm run check # format · lint · typecheck · unit + stdio contract tests · docs freshness
npm run build
npx tsx scripts/call.ts flow_status # run one tool over real stdioSee docs/development.md for the flow_inspect discovery loop and docs/architecture.md for the design. Live tests that touch Flow are gated behind FLOW_E2E=1. Please follow Conventional Commits (CONTRIBUTING.md).
📄 License
MIT. Google Flow, Veo and Nano Banana are trademarks of Google LLC; this project is not endorsed by or affiliated with Google.
Available Tools
11 toolsflow_connectConnect to Google FlowAIdempotent
Attach to the dedicated Chrome (launching it if needed), open a tab owned by this server and load Google Flow. Other tools connect on demand, so this is mainly a warm-up and login check. If logged_in is false, sign in once in the Chrome window.
Inputs: open_url. Returns: ok, tab_url, cdp_port, logged_in, +1 more
flow_generate_imageGenerate an imageADestructive
Generate images through the Flow agent composer (Nano Banana models) and download them. Spends Flow credits when auto_confirm=true; auto_confirm=false prepares and verifies without sending. resume=true only waits for / downloads an in-flight generation.
Inputs: prompt (required), output_dir (required), project_url (required), count, +6 more. Returns: ok, files, model, ratio, +9 more
flow_generate_videoGenerate a videoADestructive
Generate one video through the Flow agent composer and download it. Spends Flow credits when auto_confirm=true. Call with auto_confirm=false first: the prompt, settings and reference image are prepared and verified but nothing is sent. resume=true skips the composer and only waits for / downloads an in-flight generation (after a crash or timeout).
Inputs: prompt (required), output_dir (required), project_url (required), model, +7 more. Returns: ok, files, model, ratio, +9 more
flow_inspectInspect the Flow UIA
Snapshot interactive elements, optionally perform one action (click/hover a button matched by text or aria-label regex, press a key, or navigate), then return the elements that appeared/disappeared. This is how selectors are discovered when Flow changes its UI; paste the rows into a bug report. Never generates anything.
Inputs: at, key, url, find, +8 more. Returns: ok, url, rows, added, +6 more
flow_media_downloadDownload a media itemAIdempotent
Download one Flow media item (video or image) by its media id using the logged-in browser session. Ids come from the generation and scene tools or from flow_project_open.
Inputs: media_id (required), output_dir (required), filename. Returns: ok, path, bytes, content_type
flow_project_openOpen a Flow projectAIdempotent
Navigate the owned tab to a Flow project URL and report how many media items the grid shows. Generation tools call this implicitly.
Inputs: project_url (required). Returns: ok, url, media_ids, project_id, +1 more
flow_scene_addCreate a scene from a clipA
Open a project media item's menu and "Add to Scene → Create scene", then open the new Scene Builder view. Returns the scene URL to pass to flow_scene_extend / flow_scene_status / flow_scene_download. Costs no credits.
Inputs: media_id (required), project_url (required). Returns: ok, clips, scene_id, scene_url, +1 more
flow_scene_extendExtend the last clip of a sceneADestructiveIdempotent
Scene Builder "Extend": generates a 7-second continuation of the clip at after_clip_index (must be the last clip) with Veo 3.1 - Lite and downloads it as a separate media file. Spends credits when auto_confirm=true; auto_confirm=false opens the extend prompt, fills it, takes a screenshot and cancels. Safe to retry: if the extension was already generated (clip present at after_clip_index+1, or resume=true after a crash) it is downloaded instead of generated again.
Inputs: prompt (required), scene_url (required), output_dir (required), after_clip_index (required), +3 more. Returns: ok, file, clips, model, +9 more
flow_scene_statusRead a scene timelineAIdempotent
Open a Scene Builder view and report its clips (index, duration) and total length, plus whether an extension is still rendering. with_media_ids selects each clip to read its media id (slower). Costs no credits.
Inputs: scene_url (required), with_media_ids. Returns: ok, clips, scene_id, generating, +1 more
flow_screenshotScreenshot the Flow tabARead-onlyIdempotent
Save a PNG of the tab this server owns and return its absolute path. Useful to see what the agent or Scene Builder is showing.
Inputs: label, full_page. Returns: ok, path
flow_statusConnection statusARead-onlyIdempotent
Report browser connection, login state, the current Flow project/scene, the running tool and in-flight jobs. Never touches the page.
Inputs: no named parameters. Returns: ok, url, scene_id, connected, +4 more
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 11 tools
Each tool addresses a distinct part of the workflow: connection/status, page observation, project opening, generation, media download, and scene operations. Similar actions like generating a video versus extending a scene are clearly separated by context and dedicated names.
All tools share a useful flow_ prefix and consistent snake_case, but the word order is mixed: flow_generate_video is verb-object while flow_project_open, flow_media_download, and flow_scene_add are object-verb. This is still readable but does not follow a single predictable verb_noun pattern.
Eleven tools is well-scoped for the Google Flow domain, covering browser connection, inspection, project navigation, generation, downloads, and scene extension without redundancy. Each tool earns its place and the count is within the ideal range.
The core end-to-end workflows are covered: connect, open a project, generate video/image with confirmation and resume support, download media, and extend scenes. Minor gaps exist around enumerating projects or arbitrary media IDs without a prior URL or generation result, but these are workable.
Maintenance
Related MCP Connectors
Let AI agents use your real, signed-in Chrome: tabs, clicks, forms, screenshots and video.
Give AI agents a real cloud Chrome: open sessions, navigate, read pages, click, type and screenshot.
Let AI agents work in your own signed-in Chrome, with approvals and verified results.
Let AI agents use any website you're logged in to. Sessions stay encrypted on your machine.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables AI agents to drive Google Flow through a real Chrome profile to generate images, videos, characters, and scenes without sharing credentials.192MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI coding agents to autonomously generate images, music, and cinematic video directly from their coding environment by connecting to Google Labs and Google Flow through the user's Chrome session.3MIT
- AlicenseAqualityBmaintenanceLets an AI agent drive Google Flow (flow.google.com) through a locally logged-in Chrome profile to generate images, videos, characters, and scenes. Uses browser automation via the Chrome DevTools Protocol, so Google credentials are never shared with the agent.21MIT
- AlicenseAqualityBmaintenanceEnables AI assistants to generate and edit images, create Veo and Omni videos, upscale media, and interact with Google Flow's creative agent by driving a Chrome window signed in to the user's own Google account, using their existing plan and credits with no API key and with credit-spend safeguards.18300 npm7MIT