Google Flow Browser MCP
Drives Google Flow (flow.google.com) through a Chrome profile already signed in to Google, enabling an agent to generate images and videos, create reusable characters and scenes, reference them by @name, list live models/ratios/durations, download generated assets, and manage Flow projects — all without the agent ever handling Google credentials.
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 Browser MCP generate an image of a sunset over a mountain lake"
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 Browser MCP
Originally created by Mitanshp5. This repository is a maintained fork — created and maintained by DarthAdry. All original credit for the project's design and implementation belongs to Mitanshp5, who authored the original 45 commits. Released under the MIT License (see LICENSE).
An MCP (Model Context Protocol) server that lets an AI agent drive
Google Flow (flow.google.com)
through your own logged-in Chrome profile — generating images, videos,
characters, and scenes — without ever sharing your Google credentials with
the agent.
This server supports Windows, macOS, and Linux out of the box using unified npm commands that automatically dispatch platform-specific execution.
How it works
Chrome is launched with
--remote-debugging-port(Chrome DevTools Protocol / CDP) using a real Chrome profile that's already signed in to your Google account.The MCP server (
src/index.js) connects to that Chrome instance via Playwright'sconnectOverCDPand drives the Google Flow web app — filling prompts, clicking buttons, reading results.Your AI agent (Claude / OpenCode / any MCP client) talks to the MCP server over stdio and calls tools like
flow_generate_image,flow_generate_video,flow_create_character, etc.
Because the agent never touches your Google password — it only sends commands to a browser that's already logged in — there's no credential sharing involved.
Related MCP server: Google Flow Browser MCP
Prerequisites
Node.js >= 20.11 (see
enginesinpackage.json; LTS recommended)Google Chrome installed normally (Playwright connects to your real Chrome via CDP — it does not need its own bundled browser for this)
A Google account already signed in to a Chrome profile (e.g. "Default" or "Profile 1" — any profile works, you just need to tell the config which one)
(Optional) OpenCode if you want to register this MCP server with it
Setup
1. Clone and install dependencies
git clone https://github.com/DarthAdry/Google-Flow_MCP.git
cd Google-Flow_MCP
npm installnpm install will also download Playwright's browser binaries. This project
doesn't use Playwright's bundled Chromium though — it connects to your real
installed Chrome.
2. Find your Chrome profile
You need a Chrome profile that's already signed in to the Google account you want Flow to use.
Open Chrome and go to
chrome://versionLook at Profile Path — note the User Data directory and Profile folder name (e.g.
Default,Profile 1,Profile 2).
Default locations by platform:
Windows:
Executable:
C:\Program Files\Google\Chrome\Application\chrome.exe(Auto-detected)User Data:
C:\Users\<username>\AppData\Local\Google\Chrome\User Data
macOS:
Executable:
/Applications/Google Chrome.app/Contents/MacOS/Google Chrome(Auto-detected)User Data:
/Users/<username>/Library/Application Support/Google/Chrome
Linux:
Executable:
/opt/google/chrome/chromeor/usr/bin/google-chrome(Auto-detected)User Data:
/home/<username>/.config/google-chrome
If you don't have a profile signed in yet, sign in to your Google account in
any Chrome profile first (Settings → You and Google → Sign in).
⚠️ Close all running Chrome windows for that profile before using this tool — Chrome locks its profile directory while running, so the MCP server's "direct + CDP" launch mode copies the profile into a temporary directory to avoid conflicts. If Chrome is running with that profile while you start the scripts, you may see a "profile already in use" issue.
3. Create your config file
Copy the example config and edit it:
Windows (PowerShell):
copy config\flow.config.example.json config\flow.config.jsonmacOS / Linux:
cp config/flow.config.example.json config/flow.config.jsonOpen config/flow.config.json and set at minimum:
{
"expectedAccount": "your-email@gmail.com",
"chromeProfile": "Default"
}Note: You only need to set chromeUserDataDir and chromeExecutable if Chrome is installed in a custom location, as the server will otherwise auto-detect them for your current platform.
Unified Commands
This project uses a Node.js dispatcher script under the hood, allowing you to run the same npm commands on Windows, macOS, or Linux. The runner will automatically execute the correct scripts (.ps1 for Windows, .sh for Unix).
1. Start Chrome with CDP debugging
npm run start-browserThis launches Chrome with your configured profile and --remote-debugging-port=9222. A Chrome window will open — leave it running.
2. Start the MCP server (optional manual test)
In a separate terminal:
npm run start-mcpThis checks Node is installed, checks Chrome's CDP port is responding, and runs the MCP server. Press Ctrl+C to stop it.
3. Connect to AI Agents
You can automatically configure OpenCode and Gemini CLI in one step:
npm run registerThis will automatically find their configuration files and add the Google-Flow MCP server.
(You can also target specific clients: npm run register -- --opencode or --gemini)
Claude Desktop
Currently, Claude Desktop requires manual configuration:
Add the following to your claude_desktop_config.json (run npm run build first — dist/ is what ships):
{
"mcpServers": {
"Google-Flow": {
"command": "node",
"args": ["/absolute/path/to/Google-Flow_MCP/dist/index.js"]
}
}
}Cursor (Codex) Currently, Cursor requires manual UI configuration:
Open Cursor Settings > Features > MCP.
Click + Add New MCP Server.
Name:
Google-FlowType:
commandCommand:
node /absolute/path/to/Google-Flow_MCP/dist/index.js(runnpm run buildfirst;src/index.jsworks for dev only)
4. Verify everything end-to-end
With Chrome running (step 1), run unit tests plus a live smoke test:
npm test # vitest unit tests (validation, queue, sanitizers)
npm run test:smoke # flow_connect over stdio (needs Chrome running)
npm run build # bundles src/ -> dist/ (required before register)Typical workflow
npm run start-browser— once per session, leave the Chrome window openYour AI agent (with this MCP registered) calls:
flow_connect— attach to the running Chrome (also refreshes the live model catalog)flow_account_check— confirm the right Google account is signed inflow_list_models— list live video/image models, ratios, durations (call once per session before generating)flow_generate_image— prepare (or withauto_confirm:true, generate) images in a Flow projectflow_create_character— create reusable charactersflow_generate_video— prepare (or withconfirm_generate:true, paid-generate) videos, optionally referencing previously generated images/characters viaingredients(@namereferences)flow_list_mention_options— see what images/characters are available to reference by nameflow_create_scene— create a new scene, optionally referencing characters
The MCP server automatically creates a Google Flow project on first use and reuses it for the rest of the session (tracked by project ID), so everything ends up in one place instead of a new project per request.
Available tools
Tool | Purpose |
| Connect to / launch Chrome via CDP, optionally open Flow |
| Close the browser connection |
| Navigate the connected browser to a Flow URL without reconnecting |
| Report current connection/page status |
| Verify the signed-in Google account matches |
| Navigate to a Flow page and dump interactive elements (debugging) |
| Generate image(s) from a prompt in the current project (prepare-only by default; |
| Generate video(s), optionally with |
| List video/image models, ratios, durations from Flow UI (live) or cache |
| Download the most recently generated asset |
| Create a new character (name + description + reference images) |
| Import a character from a saved JSON file |
| Open the Characters page for a project |
| List images/characters available for |
| Create a new scene, optionally referencing characters |
| Open Flow's Tools gallery |
| Open the Grid Architect tool |
| Use an arbitrary tool from the Tools gallery |
| Take a debug screenshot of the current page |
| Check the status of queued generation jobs |
| Forcefully reset the job queue if a job is stuck in "running" state |
Configuration reference
All settings live in config/flow.config.json (copy from flow.config.example.json). Key fields:
Field | Description | Default |
| Google account email | (required) |
| Full path to | auto-detected |
| Path to Chrome's "User Data" folder | auto-detected per-OS |
| Profile folder name (e.g. |
|
| Chrome DevTools Protocol port |
|
| Base Google Flow URL |
|
| Run Chrome headless (not recommended — Flow needs visible browser) |
|
| Watchdog: max time a job may stay |
|
| Bounded queue history kept in |
|
| Delay between automated UI steps |
|
| Agent dialog window / generation wait |
|
| Wait for download to complete |
|
| Display name → internal model ID maps (merged with live discovery) | see example config |
| Allowed generation parameters | see example config |
Env overrides win over the file: FLOW_URL, FLOW_EXPECTED_ACCOUNT, FLOW_CHROME_PROFILE, FLOW_CDP_PORT, FLOW_HEADLESS, FLOW_JOB_TIMEOUT_MS, FLOW_CHROME_EXECUTABLE, FLOW_CHROME_USER_DATA_DIR, FLOW_HOME.
Troubleshooting
"Chrome not found"
Make sure Chrome is installed normally. If it is in a custom path, set chromeExecutable in config/flow.config.json.
"Chrome profile not found"
Double-check chromeUserDataDir + chromeProfile against chrome://version in your browser.
"CDP port 9222 not responding"
Run npm run start-browser first and leave that Chrome window open.
Google sign-in gets blocked ("This browser may not be secure")
This is why the server connects to your existing signed-in Chrome profile. Ensure chromeUserDataDir / chromeProfile points to the profile you logged in with.
The agent creates a new Flow project every time
The server tracks one project per session by ID and reuses it. If this happens, check the logs for Session project no longer reachable and start a fresh session.
Project layout
config/
flow.config.example.json # template — copy to flow.config.json (gitignored)
flow.models.json # live model catalog cache (gitignored, regenerated)
selectors.map.json # self-healing selector cache from flow_discover_ui (gitignored)
scripts/
run.js # OS-independent dispatcher (prefers pwsh on Windows)
start-browser.ps1 / .sh # launch Chrome with CDP debugging
start-mcp.ps1 / .sh / .bat # run the MCP server (manual check)
register.ps1 / .sh # register this server (prefers dist/, falls back to src/)
test-flow-image.ps1 / .sh # quick flow_connect smoke test (npm run test:smoke)
src/
index.js # MCP server entry point (validated with zod, fail-closed errors)
browser/ # Chrome/CDP connection (non-destructive reuse, liveness)
navigation/ # project registry, @ mention references, live model discovery
queue/ # single-job queue with watchdog + bounded history
tools/ # one file per MCP tool
utils/ # config, logger (stderr-only), screenshots, sanitize, validate,
# prompt QC, dynamic model universe, selector registry
tests/ # vitest unit tests: sanitize, validate, job-queue,
# file-manager, video-quality, dynamic-catalog, prompt-barSafety notes
This server only automates a browser you already control and are signed into — it does not store, transmit, or need your Google credentials.
Separate from credentials: the server deliberately minimizes automation fingerprints — it launches Chrome with
--disable-blink-features=AutomationControlled(sonavigator.webdriverreads false) and runs your signed-in profile from a temp copy. That is bot-detection evasion against Google's own sign-in/abuse checks (the "this browser may not be secure" block), distinct from the credential story above. By using this tool you accept that tradeoff relative to Google's Terms of Service.Image and video generation consume Google Flow credits. All mutating tools default to safe "prepare only" behavior (
auto_confirm: false; video live-generate additionally requiresconfirm_generate: true).flow_create_characteralso defaults tofalse.flow_disconnectnever kills your personal Chrome tabs — it detaches unless the server launched Chrome itself.flow_account_checkis fail-closed: without positive evidence it returnsverified:false, needsManualCheck:true(neverassumed:true).config/flow.config.jsonis gitignored — do not commit it. Runtime caches (flow.models.json,selectors.map.json,flow.projects.json) are gitignored too.
Recent changes (v1.0.1)
Probe reliability —
flow_discover_uinow waits for panel content, not just the container element, so it no longer returns an empty element list while the panel is still rendering.Import hygiene — added a test that fails if
src/imports fromdist/, keeping the bundle boundary clean.Lint gate — ESLint config (
no-unused-vars,no-undef) added, clearing 19 findings; run withnpm run lint.Debug-trail retention —
flow_connectkeeps recent debug context on failure so it's available inflow_statusafter an error, instead of being swept immediately.CI — GitHub Actions workflow runs
npm ci,npm test, andnpm run buildon push and pull requests.
Test suite: 127 tests across 21 files (npm test).
Contributing
Fork the repo and create a branch:
git checkout -b my-changeMake your change, then verify:
npm run lint && npm test && npm run buildCommit and open a pull request
CI runs the same three commands, so a green local run means a green PR.
Please don't commit config/flow.config.json or anything containing real Google account details — both are gitignored by design.
License
This project is licensed under the MIT License.
Available Tools
21 toolsflow_account_checkA
Verify the logged-in Google account matches the configured expected email (Default).
Inputs: no named parameters.
flow_connectA
Launch Chrome with the configured Google profile, connect CDP, navigate to Google Flow, and verify account.
Inputs: headless, open_flow.
flow_create_characterA
Create a new character in Google Flow Characters with name and description. By default (auto_confirm=false): fills the description and returns "ready_for_confirmation" without submitting (no credits). When auto_confirm=true: fills and clicks submit, then renames "Untitled Character" to the given name.
Inputs: name (required), description (required), campaign, auto_confirm, +2 more.
flow_create_sceneB
Create a new scene in Google Flow Scenes with characters and prompt. By default (auto_confirm=false) prepares only; set auto_confirm=true to actually create.
Inputs: prompt (required), campaign, characters, auto_confirm, +2 more.
flow_disconnectA
Close the browser and clean up the MCP connection to Google Flow.
Inputs: no named parameters.
flow_discover_uiB
Navigate to a Google Flow page and discover all interactive elements (buttons, inputs, links, headings). Updates the internal selectors map for robust automation.
Inputs: url, page, campaign, project_name.
flow_download_latestB
Download the most recently generated file from Google Flow.
Inputs: no named parameters.
flow_generate_imageA
⚠️ THESE IMAGES CONSUME CREDITS. By default (auto_confirm=false): fills the prompt, selects model/ratio, takes a screenshot and returns "ready_for_confirmation". Does NOT click Generate. When auto_confirm=true: first verifies the UI is in IMAGE mode (not Video), that the model is an image model, takes a verification screenshot, THEN clicks Generate and waits for the images. NANO/BANANA image models only.
Inputs: prompt (required), model, ratio, campaign, +6 more.
flow_generate_videoB
Prepare a Veo video (prepare-only, no spend). Fast tests, Quality finals; ingredients need 8s.
Inputs: prompt (required), model, ratio, shots, +18 more.
flow_import_characterA
Import a character from a saved JSON file into Google Flow.
Inputs: file_path (required), campaign, project_name.
flow_list_mention_optionsA
List the images and characters in the current project that can be referenced via "@name" in an image/video prompt (opens Flow's "@" reference popup and reads its options).
Inputs: campaign, project_name.
flow_list_modelsA
List video/image models, ratios, durations from Flow UI (live) or cache. Call once per session before generating.
Inputs: refresh.
flow_openA
Navigate the already-connected browser to a Google Flow URL without reconnecting. Only https://flow.google.com/... URLs are allowed (other hosts rejected).
Inputs: url, waitFor.
flow_open_charactersB
Open the Characters page for the current/target project and list existing characters.
Inputs: campaign, project_name.
flow_open_tools_galleryA
Open the Google Flow Tools Gallery and list available tools.
Inputs: no named parameters.
flow_queue_resetA
Forcefully reset the job queue. Use this if a job is permanently stuck in "running" state and blocking other generations.
Inputs: no named parameters.
flow_queue_statusA
Check the job queue: active job, pending queue, completed and failed job history.
Inputs: history_limit.
flow_screenshotB
Take a screenshot of the current Google Flow page.
Inputs: name.
flow_statusB
Check current connection status: browser connected, Flow page loaded, account verified, job queue state.
Inputs: full.
flow_use_grid_architectB
Open Grid Architect in Google Flow, fill theme prompt, shot prompts, engine, ratio, and visual logic settings. Supports batch shot generation for brand campaigns. Prepare-only by default (auto_confirm=false).
Inputs: theme_prompt (required), ratio, engine, campaign, +5 more.
flow_use_toolB
Open any tool by name in Google Flow and optionally fill its configuration parameters. Prepare-only by default (auto_confirm=false).
Inputs: tool_name (required), params, campaign, auto_confirm, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 21 tools
Most tools have a clearly distinct resource or action (status, connect, generate_image, create_character, etc.), so an agent can usually tell them apart. However, flow_use_tool overlaps with specific wrappers like flow_use_grid_architect, and flow_status partially duplicates flow_queue_status and flow_account_check.
All tool names use a consistent flow_ prefix plus snake_case verb/noun structure. The convention is predictable throughout the set.
21 tools is heavy for a single browser-automation server and lands in the borderline range per the rubric. While many operations are justified, some could be consolidated or deferred, especially generic flow_use_tool versus specific tool wrappers.
Core lifecycle operations are present: connect/disconnect, navigate, discover UI, generate image, create characters/scenes, and queue status/reset. But there are notable gaps: flow_generate_video is prepare-only with no execute path, and there are no update/delete operations for characters/scenes or listing generated assets beyond the latest download.
Maintenance
Related MCP Connectors
Google Flow's agent: chat that plans and makes images and videos, approvals, your own media
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.
Connect AI agents to your own Chrome with scoped access, approvals, and verified task results.
Related MCP Servers
- AlicenseAqualityDmaintenanceControls Google Flow for image and video generation from an AI agent. Enables generating images with models like Imagen 4, creating videos, managing characters and scenes via browser automation.17115 npm126MIT
- AlicenseAqualityDmaintenanceEnables AI agents to drive Google Flow through a real Chrome profile to generate images, videos, characters, and scenes without sharing credentials.41916 npm2MIT
- AlicenseAqualityBmaintenanceEnables AI agents to programmatically generate images and videos through the authenticated Google Flow web interface via a direct Chrome DevTools Protocol connection, exposing tools for media generation, project management, status checks, and asset downloads without requiring official API keys.276MIT
- AlicenseAqualityBmaintenanceEnables AI agents to generate Google Flow videos and images and automate Scene Builder clip extensions through a user's own Chrome session.11213 npm9MIT