Skip to main content
Glama

🎬 Google Flow MCP Template

Universal, High-Performance Background MCP Server & Browser Bridge
Seamless, silent browser automation for Google Flow (flow.google.com) (Veo 3.1 & Imagen) and modern web applications.
Runs 100% headlessly in the background without popups or manual port wrangling. Ready to use as a GitHub Template.

Use this template MCP License: MIT Tests: Passing


πŸ”’ Privacy, Security & 100% Local Isolation

This template is designed from the ground up for complete individual privacy and security:

  • πŸ‘€ Your Own Google Account: You authenticate exclusively with your own Google account into your own personal Google Flow creative workspace. No accounts, projects, or generations are ever shared.

  • πŸ’» Your Own Local Browser: The MCP server launches the Chromium browser installed directly on your machine (Google Chrome, Brave, Arc, Edge, or Chromium).

  • 🏠 100% Local Execution (Stdio): The server runs strictly as a local subprocess on your machine using standard input/output (stdio). It does NOT expose any external network ports or web servers to the internet.

  • πŸ›‘οΈ Isolated Session Storage: Your login cookies and auth tokens are saved only on your local filesystem (~/.google-flow-mcp/profile). Session directories are strictly ignored by .gitignore and can never be committed or uploaded.

  • 🚫 Zero Telemetry: No analytics, no third-party APIs, and no telemetry. All web communication occurs directly between your local browser and Google's official servers (flow.google.com).


Related MCP server: Cloudflare Playwright MCP

⚑ Why This Template Exists

Google Flow and other AI creative studios provide cutting-edge video and image models, but lack official REST APIs. Standard automation tools usually:

  1. Pop up disruptive browser windows across your screen.

  2. Require tedious manual Chrome terminal flags (--remote-debugging-port=9222) before every launch.

  3. Are hardcoded to one operating system or one browser.

Google Flow MCP Template is a universal, ready-to-fork solution:

  • πŸ₯· Silent Background Execution: Runs modern Chromium in headless mode (--headless=new). Zero windows popping up on your screen.

  • 🌐 Cross-Platform & Multi-Browser: Automatically detects Google Chrome, Chromium, Arc, Brave, and Edge on macOS, Linux, and Windows, with optional BROWSER_PATH override.

  • πŸ”„ Seamless Auto-Connection: Automatically discovers running debugging sessions or self-heals by spawning a quiet headless instance. No manual port setup needed.

  • πŸ” Persistent Authentication: Saves your Google login cookies & tokens to your local home directory. Authenticate once, and subsequent generations run automatically in the background.

  • πŸ§ͺ Built-in Universal Test Suite: Verify browser discovery, headless lifecycle, DOM inspection, and screenshot capture in 5 seconds with npm test.

  • 🎯 Custom Target URL: Defaults to Google Flow, but can bridge any web application simply by setting FLOW_URL or TARGET_URL.


πŸ› οΈ MCP Tools

Tool

Description

flow_status

Checks local background browser connection, current page, and login status.

flow_launch_browser

Switches execution modes (headed: true for 1-time login, or headed: false for background headless).

flow_open_tab

Navigates or focuses https://flow.google.com (or your custom target URL).

flow_inspect_canvas

Returns structured, lightweight JSON of prompt inputs, action buttons, and canvas nodes.

flow_execute_prompt

Injects prompts into Google Flow's generation bar and submits them seamlessly.

flow_click

Precision click handler using CSS selectors, text matches, or aria-labels.

flow_screenshot

Captures background high-res screenshots and saves to your local disk.

flow_eval_js

Runs custom JavaScript in the active page context on your local browser.


πŸš€ Quickstart for Anyone

1. Create Your Own Repo from this Template

Click the green Use this template button on GitHub, then clone your repository:

git clone https://github.com/<your-username>/<your-repo-name>.git
cd <your-repo-name>
npm install

2. Log in to YOUR Google Flow Account (One-Time Setup)

Run the guided local authentication wizard:

npm run setup
  • This opens a browser window on your computer.

  • Sign in to your personal Google Account on flow.google.com.

  • The wizard automatically detects when you are logged in, saves your session locally to ~/.google-flow-mcp/profile, and closes the window.

3. Test Your Local Browser Connection

Run the universal test suite to verify your local browser discovery and background connectivity:

npm test

Outputs:

πŸ§ͺ Starting Google Flow MCP Universal Connection Test

  [1] Testing: Browser Executable Discovery... βœ” PASSED
  [2] Testing: Headless Background Lifecycle... βœ” PASSED
  [3] Testing: Target Page Navigation & Auth State... βœ” PASSED
  [4] Testing: Workspace Inspection & Node Parsing... βœ” PASSED
  [5] Testing: Page Context JavaScript Evaluation... βœ” PASSED
  [6] Testing: Silent Background Screenshot Capture... βœ” PASSED
  [7] Testing: Graceful Teardown & Resource Cleanup... βœ” PASSED

πŸŽ‰ ALL TESTS PASSED (7/7)

4. Verify Background Status Anytime

npm run status

βš™οΈ MCP Host Configuration

Add this server to your local Antigravity, Claude Desktop, Cursor, or Windsurf MCP configuration:

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

πŸ”§ Environment Variables

Copy .env.example to configure custom behavior:

Variable

Description

Default

BROWSER_PATH

Explicit path to a browser binary

Auto-detected

FLOW_DEBUG_PORT

Remote debugging port

9222

FLOW_URL

Target web application URL

https://flow.google.com

FLOW_PROFILE_DIR

Session and cookie persistence directory

~/.google-flow-mcp/profile


πŸ“‚ Project Architecture

google-flow-mcp/
β”œβ”€β”€ index.js             # Root executable entry point
β”œβ”€β”€ package.json         # Scripts ("start", "setup", "status", "test"), deps
β”œβ”€β”€ README.md            # Universal template documentation
β”œβ”€β”€ LICENSE              # MIT License
β”œβ”€β”€ .gitignore           # Ignores profiles, screenshots, logs, node_modules
β”œβ”€β”€ .env.example         # Example configuration options
β”œβ”€β”€ test/
β”‚   └── test-connection.js # Automated 7-step connection test suite
└── src/
    β”œβ”€β”€ browser.js       # Cross-platform browser discovery & headless lifecycle
    β”œβ”€β”€ flow.js          # Google Flow semantic DOM actions & prompt injection
    └── index.js         # Model Context Protocol stdio server & tool dispatchers

πŸ“„ License

MIT Β© csmc387-cloud

Available Tools

8 tools
flow_clickB

Clicks an element in the page by CSS selector, text, or aria-label.

Inputs: text, selector, ariaLabel.

flow_eval_jsC

Runs custom JavaScript in the active page context on your local browser.

Inputs: script (required).

flow_execute_promptC

Injects a creative prompt into Google Flow and triggers generation in your personal workspace.

Inputs: prompt (required), submit, selector.

flow_inspect_canvasB

Inspects active Google Flow workspace: returns prompt inputs, action buttons, and canvas nodes.

Inputs: no named parameters.

flow_launch_browserC

Controls local browser execution mode (headless background vs headed window for 1-time login).

Inputs: port, headed, targetUrl.

flow_open_tabB

Navigates to or focuses Google Flow in your local browser.

Inputs: url.

flow_screenshotA

Captures a screenshot of the active Google Flow workspace in your local background browser.

Inputs: filename.

flow_statusB

Checks local browser connection, background status, and local Google Flow login state.

Inputs: port.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.4/5.0

    Scored across 8 tools

    Disambiguation4/5

    Most tools have clearly distinct purposes: status, browser launch mode, tab navigation, canvas inspection, prompt execution, clicking, screenshot, and JS eval. The only mild overlap is flow_launch_browser vs flow_open_tab and the low-level flow_click vs flow_eval_js, but the descriptions distinguish them adequately.

    Naming Consistency4/5

    All tools use a consistent flow_ prefix with snake_case, and most follow a verb_noun shape (launch_browser, open_tab, inspect_canvas, execute_prompt). flow_status is a minor noun-only deviation, but overall the convention is predictable.

    Tool Count5/5

    Eight tools is well-scoped for a browser-automation server, covering setup, navigation, inspection, action, and debugging without redundancy. Each tool earns its place.

    Completeness4/5

    The surface covers the full browser-automation lifecycle: connection/status, launch mode, navigation, inspection, prompt execution, clicking, screenshots, and arbitrary JS. Minor gaps exist (no explicit text/typing, scroll, or wait tools), but flow_eval_js and flow_click let agents work around them.

    Maintenance

    ActivitySlowing
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers