Google Flow Browser MCP
Allows AI agents to control Google Flow for image and video generation via browser automation using your own Google account.
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 using Imagen 4"
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
Control Google Flow β image & video generation β directly from your AI agent via MCP.
β¨ Features β’ π Quick Start β’ π§ Tools β’ βοΈ Configuration β’ π‘οΈ Safety
π«π· Ce serveur MCP permet Γ votre agent AI (OpenCode) d'utiliser Google Flow pour gΓ©nΓ©rer des images et des vidΓ©os, via votre propre compte Google et sans partager vos identifiants.
πΈ What It Does
This MCP server connects your AI agent to Google Flow β Google's creative suite for image and video generation. Your agent can:
π¨ Generate images with Nano Banana Pro, Nano Banana 2, or Imagen 4
π¬ Create videos and scenes with characters
π§ Manage characters and scenes in your Flow workspace
πΌοΈ Use Grid Architect for batch shot generation
π Discover and control any Flow tool programmatically
All through your own Google account β no API keys, no third-party tokens.
Related MCP server: google-flow-mcp
β¨ Features
π― For AI Agents
π For Humans
15+ MCP tools ready to use
Smart job queue β no parallel conflicts
Auto-discover UI β adapts to Flow changes
Structured logging for debugging
Safe actions β resilient click/fill logic
Your account, your data β no token sharing
No password asked β ever
Clean safety rules β stops on captcha/verification
Config backup before any modification
Single-job queue β no runaway generation
π Quick Start
Prerequisites
What | Why |
Node.js β₯ 18 | Runtime for the MCP server |
Google Chrome | Required for browser automation |
OpenCode | AI agent that connects to MCP servers |
A Google account | To use Google Flow (yours, not shared) |
1οΈβ£ Install
git clone https://github.com/TMSSS05/google-flow-browser-mcp.git
cd google-flow-browser-mcp
npm install2οΈβ£ Configure your Google profile
cp config/flow.config.example.json config/flow.config.jsonEdit config/flow.config.json:
{
"expectedAccount": "your.email@gmail.com",
"chromeProfile": "Profile 3",
"chromeUserDataDir": "/home/you/.config/google-chrome"
}π‘ Finding your Chrome profile:
Open Chrome and go tochrome://version/. Look for "Profile Path" β the last folder name is your profile (e.g.,Profile 3), and the path before it is yourchromeUserDataDir.
3οΈβ£ Make scripts executable
chmod +x scripts/*.sh4οΈβ£ Start Chrome with CDP
./scripts/start-browser.shThis launches Chrome with remote debugging enabled on port 9222 using your configured profile.
5οΈβ£ Start the MCP server
# In a separate terminal:
./scripts/start-mcp.sh6οΈβ£ Register with OpenCode
./scripts/register-opencode.shπ Restart OpenCode after registration for the changes to take effect.
β Verify it works
./scripts/test-flow-image.shποΈ Architecture
google-flow-browser-mcp/
β
βββ π config/
β βββ flow.config.example.json # Configuration template
β βββ selectors.map.json # UI selectors (auto-populated)
β
βββ π scripts/
β βββ start-browser.sh # Launch Chrome + CDP
β βββ start-mcp.sh # Start the MCP server
β βββ test-flow-image.sh # Quick integration test
β βββ register-opencode.sh # Register in OpenCode config
β
βββ π src/
β βββ index.js # MCP server entry point
β β
β βββ π browser/ # Chrome & CDP management
β β βββ connect.js # CDP connection manager
β β βββ launch-profile.js # Chrome profile launcher
β β βββ account-check.js # Verify Google account
β β βββ safe-actions.js # Safe click, fill, detection
β β
β βββ π tools/ # All MCP tool implementations
β β βββ flow-open.js # Navigate to Flow
β β βββ flow-status.js # Connection status
β β βββ generate-image.js # Image generation
β β βββ generate-video.js # Video generation (setup only)
β β βββ download-latest.js # Download generated files
β β βββ create-character.js # Create a character
β β βββ import-character.js # Import character JSON
β β βββ open-characters.js # List characters
β β βββ create-scene.js # Create a scene
β β βββ open-tools-gallery.js # Open tools gallery
β β βββ grid-architect.js # Batch shot generation
β β βββ discover-ui.js # UI discovery & mapping
β β βββ use-flow-tool.js # Generic tool opener
β β
β βββ π queue/ # Job management
β β βββ job-queue.js # Single-job queue
β β
β βββ π utils/ # Helpers
β βββ config.js # Config loader
β βββ logger.js # Structured logging
β βββ errors.js # Error codes & types
β βββ file-manager.js # File download/save
β βββ screenshots.js # Screenshot capture
β
βββ π output/ # Generated files land hereπ§ Tools
All tools are organized by function for easy discovery.
π Connection & Status
Tool | Description |
| Launch Chrome, connect CDP, navigate to Google Flow |
| Close browser and clean up all connections |
| Full status: connection, Flow loaded, account, queue state |
| Verify logged-in account matches configured email |
| Capture a screenshot of the current Flow page |
π¨ Image Generation
Tool | Description |
| Generate image with Nano Banana Pro, Nano Banana 2, or Imagen 4. Supports aspect ratios, reference images, and brand-based model selection. |
| Download the most recently generated file |
π¬ Video Generation
Tool | Description |
| Set up video generation (Omni Flash, Veo models, custom duration/ratio). β οΈ Stops at "ready to generate" β no credit consumed. |
| Create a video scene with characters and a text prompt |
π€ Characters
Tool | Description |
| Create a new character with name, description, and optional reference images |
| Import a character from a saved JSON file |
| Open the characters page and list all existing characters |
π οΈ Tools & Discovery
Tool | Description |
| Open the tools gallery and browse available tools |
| Open any Flow tool by name with optional parameters |
| Configure Grid Architect for batch shot generation with theme prompts, visual logic, and reference images |
| Discover and map all interactive elements (buttons, inputs, headings) on any Flow page |
π Queue & Monitoring
Tool | Description |
| Check job queue: active job, pending queue, completed and failed history |
βοΈ Configuration
Edit config/flow.config.json (copy from config/flow.config.example.json):
π Essential
Key | Type | Default | Description |
|
| β | Your Google account email β REQUIRED |
|
|
| Chrome profile directory name |
|
| β | Full path to Chrome user data directory β REQUIRED |
|
| Flow labs URL | Google Flow URL (supports |
π§ Advanced
Key | Type | Default | Description |
|
|
| Chrome DevTools Protocol port |
|
|
|
|
|
|
| Run Chrome in headless mode |
|
|
| UI locale ( |
β±οΈ Timing
Key | Default | Description |
|
| Max job execution time |
|
| Delay between UI actions (anti-detection) |
|
| How often to poll for generation completion |
|
| Max polling attempts before timeout |
|
| Wait time for file download |
π¨ Models & Ratios
Key | Description |
| Available models: |
| Available models: |
| Supported aspect ratios: |
π‘οΈ Safety & Ethics
This project is built with safety-first design:
β Principle | How it's enforced |
Your account only | Uses your own Google profile β never asks for or stores passwords |
No credential theft | Never exports cookies, tokens, or session data |
No bypass | Stops cleanly on captcha, login walls, or verification challenges |
No parallel abuse | Single-job queue prevents concurrent generation |
Credit-safe video | Video generation sets up parameters but stops before the final "Generate" click (no credit consumed) |
Config backup | Backs up OpenCode config before any modification |
β οΈ This is a browser automation tool. Use it responsibly and in accordance with Google's Terms of Service.
β FAQ
Getting Started
Open Chrome and go to chrome://version/. The Profile Path shows both your user data directory and profile name. For example:
/home/you/.config/google-chrome/Profile 3βchromeUserDataDir: "/home/you/.config/google-chrome",chromeProfile: "Profile 3"
You need a profile where you're already logged into your Google account.
Yes! Any MCP-compatible client (Claude Desktop, Continue.dev, etc.) can connect to this server. Just point your MCP config to node /path/to/src/index.js.
Troubleshooting
Make sure Chrome is installed at the expected path. On Linux, the default is /opt/google/chrome/chrome. Edit scripts/start-browser.sh to set the correct CHROME path for your system.
The script checks for existing Chrome instances on port 9222. If something else is using that port, you can change cdpPort in config/flow.config.json (and update the script's CDP_PORT variable).
Verify that expectedAccount in config/flow.config.json matches the email logged into your Chrome profile. Use flow_account_check to verify.
Run flow_discover_ui to re-map selectors. The selectors.map.json will auto-update with new UI element positions.
Usage
Your AI agent calls flow_generate_image with a text prompt. Optionally specify model (Nano Banana 2 is default), aspect ratio, and reference images. The server waits for completion and makes the file available for download.
flow_generate_video sets up the video parameters (model, ratio, duration) but stops before clicking Generate. This lets you review the setup before consuming credits. The actual generation requires a paid Google Flow subscription.
π€ Contributing
Contributions are welcome! Please follow these guidelines:
Fork the repository
Create a feature branch (
git checkout -b feature/my-feature)Commit your changes (
git commit -m 'Add my feature')Push to the branch (
git push origin feature/my-feature)Open a Pull Request
π License
MIT Β© TMSSS05
Available Tools
17 toolsflow_account_checkA
Verify the logged-in Google account matches the configured expected email (Profile 3).
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_characterC
Create a new character in Google Flow Characters with name and description.
Inputs: name (required), description (required), reference_images, project_name, +1 more.
flow_create_sceneB
Create a new scene in Google Flow Scenes with characters and prompt.
Inputs: prompt (required), characters, project_name, campaign.
flow_disconnectA
Close the browser and clean up the MCP connection to Google Flow.
Inputs: no named parameters.
flow_discover_uiA
Navigate to a Google Flow page and discover all interactive elements (buttons, inputs, links, headings). Updates the internal selectors map for robust automation.
Inputs: page (required).
flow_download_latestB
Download the most recently generated file from Google Flow.
Inputs: no named parameters.
flow_generate_imageA
β οΈ CES IMAGES CONSOMMENT DES CRΓDITS. Par dΓ©faut (auto_confirm=false): remplit le prompt, sΓ©lectionne le modΓ¨le/ratio, prend un screenshot et retourne "ready_for_confirmation". NE clique PAS sur Generate. Quand auto_confirm=true: vΓ©rifie d'abord que l'interface est bien en mode IMAGE (pas VidΓ©o), que le modΓ¨le est un modΓ¨le image, prend un screenshot de vΓ©rification, PUIS clique Generate, attend les images et les tΓ©lΓ©charge. NAN/BANANA modΓ¨les image seulement.
Inputs: prompt (required), model, auto_confirm, ratio, +4 more.
flow_generate_videoA
Set up a video generation in Google Flow. Fills prompt, selects Omni Flash or Veo model, configures settings. NOTE: Does NOT click final Generate (paid feature β stops at ready-to-generate).
Inputs: prompt (required), model, ratio, duration, +3 more.
flow_import_characterB
Import a character from a saved JSON file into Google Flow.
Inputs: file_path (required).
flow_open_charactersA
Open the Google Flow Characters page and list existing characters.
Inputs: no named parameters.
flow_open_tools_galleryA
Open the Google Flow Tools Gallery and list available tools.
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_architectA
Open Grid Architect in Google Flow, fill theme prompt, shot prompts, engine, ratio, and visual logic settings. Supports batch shot generation for brand campaigns.
Inputs: theme_prompt (required), shot_prompts, engine, ratio, +4 more.
flow_use_toolA
Open any tool by name in Google Flow and optionally fill its configuration parameters.
Inputs: tool_name (required), params, project_name, campaign.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 17 tools
Most tools have distinct purposes (connection, character/scene management, generation, UI), but flow_generate_image and flow_generate_video could be confused if descriptions are skimmed. flow_use_tool is generic but still differentiated.
All tools follow a strict 'flow_verb_noun' pattern with snake_case, e.g., flow_create_character, flow_generate_image. Naming is highly consistent and predictable.
17 tools is appropriate for the scope of browser automation over Google Flow, covering connection, state management, content creation, and generation. Slightly on the higher side but well-justified.
Core CRUD for characters (create, import, list) but missing update/delete. No tools for scene management beyond creation. Video generation stops before final action, leaving a gap. UI discovery and queue status are nice extras.
Maintenance
Related MCP Connectors
Google Flow's agent: chat that plans and makes images and videos, approvals, your own media
Build and run visual creative-production workflows from your AI agent.
Control a real browser from AI agents: navigate, click, type, screenshot, read the page.
Generate images, video, and audio with Glif's media-generation agent
Related MCP Servers
- 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.11264 npm10MIT
- AlicenseNot gradedqualityCmaintenanceEnables generating images and videos on Google Flow through browser automation using your Google AI Pro subscription, with image generation free and video consuming Flow credits.117 npm1MIT
- 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.2110 npmMIT