Logo Google Flow Browser MCP

Google Flow Browser MCP

Cộng đồng
TMSSS05

MCP server for controlling Google Flow via browser automation (Playwright + CDP)

Nhà phát hànhTMSSS05
Kho mãgoogle-flow-browser-mcp
Ngôn ngữJavaScript
Bản fork
25
Sao
115
Công cụ có sẵn
0
Phương thức truyền tảistdio
Danh mục
Liên kết
  • Kết nối công cụ với quy trình làm việc AI

    Google Flow Browser MCP cung cấp các khả năng MCP mà ứng dụng khách và tác nhân AI tương thích có thể sử dụng.

  • 0 công cụ có sẵn

    Xem các thao tác có thể gọi bên dưới, kèm tên và mô tả nếu máy chủ cung cấp.

  • Cấu hình sẵn để sao chép

    Dùng các đoạn cấu hình cài đặt mẫu để thiết lập máy chủ này trong ứng dụng khách MCP bạn muốn dùng.

  • Chỉ số quan tâm đến mã nguồn mở

    115 sao và 25 bản fork từ kho mã được liên kết.

🧠 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.


✨ 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

WhatWhy
Node.js ≥ 18Runtime for the MCP server
Google ChromeRequired for browser automation
OpenCodeAI agent that connects to MCP servers
A Google accountTo use Google Flow (yours, not shared)

1️⃣ Install

bash
git clone https://github.com/TMSSS05/google-flow-browser-mcp.git
cd google-flow-browser-mcp
npm install

2️⃣ Configure your Google profile

bash
cp config/flow.config.example.json config/flow.config.json

Edit config/flow.config.json:

json
{
  "expectedAccount": "your.email@gmail.com",
  "chromeProfile": "Profile 3",
  "chromeUserDataDir": "/home/you/.config/google-chrome"
}

💡 Finding your Chrome profile:
Open Chrome and go to chrome://version/. Look for "Profile Path" — the last folder name is your profile (e.g., Profile 3), and the path before it is your chromeUserDataDir.

3️⃣ Make scripts executable

bash
chmod +x scripts/*.sh

4️⃣ Start Chrome with CDP

bash
./scripts/start-browser.sh

This launches Chrome with remote debugging enabled on port 9222 using your configured profile.

5️⃣ Start the MCP server

bash
# In a separate terminal:
./scripts/start-mcp.sh

6️⃣ Register with OpenCode

bash
./scripts/register-opencode.sh

🔄 Restart OpenCode after registration for the changes to take effect.

✅ Verify it works

bash
./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

ToolDescription
flow_connectLaunch Chrome, connect CDP, navigate to Google Flow
flow_disconnectClose browser and clean up all connections
flow_statusFull status: connection, Flow loaded, account, queue state
flow_account_checkVerify logged-in account matches configured email
flow_screenshotCapture a screenshot of the current Flow page

🎨 Image Generation

ToolDescription
flow_generate_imageGenerate image with Nano Banana Pro, Nano Banana 2, or Imagen 4. Supports aspect ratios, reference images, and brand-based model selection.
flow_download_latestDownload the most recently generated file

🎬 Video Generation

ToolDescription
flow_generate_videoSet up video generation (Omni Flash, Veo models, custom duration/ratio). ⚠️ Stops at "ready to generate" — no credit consumed.
flow_create_sceneCreate a video scene with characters and a text prompt

👤 Characters

ToolDescription
flow_create_characterCreate a new character with name, description, and optional reference images
flow_import_characterImport a character from a saved JSON file
flow_open_charactersOpen the characters page and list all existing characters

🛠️ Tools & Discovery

ToolDescription
flow_open_tools_galleryOpen the tools gallery and browse available tools
flow_use_toolOpen any Flow tool by name with optional parameters
flow_use_grid_architectConfigure Grid Architect for batch shot generation with theme prompts, visual logic, and reference images
flow_discover_uiDiscover and map all interactive elements (buttons, inputs, headings) on any Flow page

📊 Queue & Monitoring

ToolDescription
flow_queue_statusCheck job queue: active job, pending queue, completed and failed history

⚙️ Configuration

Edit config/flow.config.json (copy from config/flow.config.example.json):

🔑 Essential

KeyTypeDefaultDescription
expectedAccountstring—Your Google account email ✅ REQUIRED
chromeProfilestring"Profile 3"Chrome profile directory name
chromeUserDataDirstring—Full path to Chrome user data directory ✅ REQUIRED
flowUrlstringFlow labs URLGoogle Flow URL (supports fr, en locales)

🔧 Advanced

KeyTypeDefaultDescription
cdpPortnumber9222Chrome DevTools Protocol port
browserModestring"direct-cdp""direct-cdp" (recommended) or "playwright"
headlessbooleantrueRun Chrome in headless mode
localestring"fr"UI locale ("fr", "en", etc.)

⏱️ Timing

KeyDefaultDescription
jobTimeoutMs300000 (5 min)Max job execution time
actionDelayMs800Delay between UI actions (anti-detection)
generationPollIntervalMs5000 (5s)How often to poll for generation completion
maxPollAttempts120Max polling attempts before timeout
downloadWaitMs30000 (30s)Wait time for file download

🎨 Models & Ratios

KeyDescription
imageModelsAvailable models: Nano Banana Pro, Nano Banana 2, Imagen 4
videoModelsAvailable models: Omni Flash, Veo 3.1 - Lite/Fast/Quality
ratiosSupported aspect ratios: 16:9, 4:3, 1:1, 3:4, 9:16

🛡️ Safety & Ethics

This project is built with safety-first design:

✅ PrincipleHow it's enforced
Your account onlyUses your own Google profile — never asks for or stores passwords
No credential theftNever exports cookies, tokens, or session data
No bypassStops cleanly on captcha, login walls, or verification challenges
No parallel abuseSingle-job queue prevents concurrent generation
Credit-safe videoVideo generation sets up parameters but stops before the final "Generate" click (no credit consumed)
Config backupBacks 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:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/my-feature)
  3. Commit your changes (git commit -m 'Add my feature')
  4. Push to the branch (git push origin feature/my-feature)
  5. Open a Pull Request

📄 License

MIT © TMSSS05


Cài đặt

TypingMind
{
  "mcpServers": {
    "google-flow-browser-mcp": {
      "command": "./scripts/start-mcp.sh",
      "args": []
    }
  }
}

Dùng MCP Google Flow Browser MCP với nhiều mô hình AI

TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên sau khi kết nối Google Flow Browser MCP, bạn có thể dùng với nhiều mô hình AI khác nhau trong TypingMind thay vì phải thiết lập riêng cho từng mô hình. MCP này chạy cục bộ thông qua trình kết nối MCP của TypingMind trên thiết bị của bạn.

Hướng dẫn thiết lập để dùng trình kết nối cục bộ

Dùng cách này khi máy chủ MCP cần truy cập các tệp, ứng dụng hoặc tài nguyên riêng tư trên máy tính của bạn.

1

Mở cài đặt MCP

Trong TypingMind, vào Cài đặt, Cài đặt nâng cao, rồi đến Giao thức ngữ cảnh mô hình và chọn Cài trình kết nối.

  1. Mở TypingMind trong trình duyệt của bạn.
  2. Nhấp vào biểu tượng Cài đặt.
  3. Vào Cài đặt nâng cao.
  4. Mở mục Giao thức ngữ cảnh mô hình.
  5. Nhấp vào Cài trình kết nối rồi chọn Thiết bị này.
Màn hình thiết lập trình kết nối MCP của TypingMind với tùy chọn Thiết bị này được chọn
2

Chạy lệnh trình kết nối

Chọn Thiết bị này, sao chép lệnh từ TypingMind và chạy trong Terminal. Giữ tiến trình chạy trong khi bạn dùng MCP.

  1. Sao chép lệnh thiết lập hiển thị trong TypingMind.
  2. Mở Terminal trên macOS hoặc Windows Terminal trên Windows.
  3. Dán và chạy lệnh.
  4. Xác nhận cài đặt gói nếu Terminal hỏi bạn có muốn tiếp tục không.
  5. Giữ tiến trình trong cửa sổ Terminal chạy trong khi dùng các công cụ MCP.
3

Thêm Google Flow Browser MCP làm máy chủ

Khi trạng thái trình kết nối là Sẵn sàng, nhấp vào Sửa máy chủ và dán cấu hình máy chủ MCP.

  1. Đợi đến khi trạng thái trình kết nối hiển thị Sẵn sàng.
  2. Nhấp vào Sửa máy chủ.
  3. Dán cấu hình máy chủ MCP của Google Flow Browser MCP.
  4. Lưu danh sách máy chủ.
  5. Làm mới nếu bạn muốn xác nhận trình kết nối vẫn sẵn sàng.
Cài đặt MCP của TypingMind hiển thị máy chủ đang hoạt động và nút Sửa máy chủ
{
  "mcpServers": {
    "google-flow-browser-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "google-flow-browser-mcp"
      ]
    }
  }
}
4

Dùng kết nối với nhiều mô hình

Lưu danh sách máy chủ, mở Plugin, bật các công cụ MCP của Google Flow Browser MCP, sau đó chọn bất kỳ mô hình AI nào được hỗ trợ trong TypingMind và dùng các công cụ trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.

  1. Mở trang Plugin trong TypingMind.
  2. Bật các công cụ MCP của Google Flow Browser MCP.
  3. Bắt đầu cuộc trò chuyện và chọn mô hình AI bạn muốn dùng.
  4. Dùng các công cụ MCP trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.
  5. Chuyển sang mô hình AI khác bất cứ khi nào cần mà không phải kết nối lại MCP.
Cuộc trò chuyện TypingMind dùng các công cụ MCP đã bật với một mô hình AI được chọn
Bạn có thể dùng Google Flow Browser MCP giúp tôi làm việc này không?
Google Flow Browser MCP
Được. Tôi đã đọc.
Đây là kết quả tôi tìm được bằng Google Flow Browser MCP.

Câu hỏi thường gặp

Máy chủ MCP Google Flow Browser MCP dùng để làm gì?

Google Flow Browser MCP là máy chủ MCP cho phép các ứng dụng AI tương thích kết nối với công cụ và ngữ cảnh bên ngoài. Trong TypingMind, bạn chỉ cần thêm máy chủ MCP này một lần để các công cụ của nó có sẵn trong không gian làm việc AI của bạn.

Bạn có thể dùng MCP Google Flow Browser MCP với nhiều mô hình AI trong TypingMind không?

Có. TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên bạn có thể dùng Google Flow Browser MCP với nhiều mô hình AI như Claude, ChatGPT, Gemini hoặc các mô hình khác đã cấu hình trong TypingMind mà không cần thiết lập máy chủ MCP riêng cho từng mô hình.

Vì sao nên dùng MCP Google Flow Browser MCP với TypingMind?

TypingMind là một trong những giao diện trò chuyện với LLM tốt nhất vì tập hợp nhiều mô hình AI, prompt, plugin, tác nhân AI, khóa API và công cụ MCP vào một không gian làm việc. Khi kết nối Google Flow Browser MCP, bạn có thể dùng các công cụ MCP của dịch vụ này với những mô hình ưa thích, đồng thời giữ quy trình trò chuyện gọn gàng trong TypingMind.

Làm cách nào để kết nối MCP Google Flow Browser MCP với TypingMind?

Google Flow Browser MCP hoạt động thông qua trình kết nối MCP cục bộ của TypingMind. Đây là lựa chọn phù hợp nhất khi máy chủ MCP cần truy cập tệp cục bộ, ứng dụng máy tính, công cụ dòng lệnh hoặc tài nguyên riêng trên máy tính của bạn.

MCP Google Flow Browser MCP cung cấp những công cụ nào trong TypingMind?

Google Flow Browser MCP cung cấp các chức năng MCP mà bạn có thể bật từ trang Plugin của TypingMind để dùng trong trò chuyện hoặc gán cho tác nhân AI.

Bạn có cần chia sẻ khóa API với TypingMind để dùng MCP Google Flow Browser MCP không?

Không. TypingMind ưu tiên xử lý cục bộ và cho phép bạn kiểm soát nhà cung cấp mô hình, khóa API, prompt và cấu hình MCP. Nếu Google Flow Browser MCP yêu cầu xác thực, hãy thêm các header, cài đặt OAuth hoặc cấu hình cục bộ cần thiết cho máy chủ MCP đó khi tạo kết nối.

Máy chủ MCP liên quan

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇