Skip to main content
Glama

Google Flow Editorial Poster Scraper & MCP Server

A powerful Playwright-based automation pipeline and FastMCP server for generating, editing, and converting aspect ratios of sports/editorial graphic posters using Google Flow (labs.google/fx/tools/flow).


⚑ Server Status & Compatibility Notice

IMPORTANT

🟒 Local Server (Stable & Recommended)
Running the server locali (STDIO / Local HTTP) is fully tested, stable, and works properly. Local execution provides fast response times and seamless browser session control.

🟑 Remote Server / VPS Deployment (Beta - In Development)
Remote deployment via VPS / Ngrok streamable HTTP is currently in Beta. While operational, remote operation may experience occasional session/tunnel instability depending on network connectivity and persistent browser locks. Use with caution for production workloads.


Related MCP server: playwright-fixer-mcp

πŸ“ Project Directory Structure

flow-project/
β”œβ”€β”€ .env                       # Environment variables (PUBLIC_BASE_URL, ports, etc.)
β”œβ”€β”€ .gitignore                 # Git ignore file
β”œβ”€β”€ README.md                  # Project documentation & guide
β”œβ”€β”€ VPS_DEPLOYMENT_GUIDE.md    # Detailed VPS systemd & Ngrok deployment guide
β”œβ”€β”€ pyproject.toml             # UV / Python project dependencies configuration
β”œβ”€β”€ requirements.txt           # Standard pip requirements
β”œβ”€β”€ main.py                    # Direct Playwright automation execution script
β”œβ”€β”€ chrome_profile/            # Persistent Chrome browser profile (Logged into Google)
β”œβ”€β”€ db/                        # Local JSON database storage
β”‚   └── projects.json          # Project session state & edit page URLs mapping
β”œβ”€β”€ downloads/                 # Downloaded high-resolution output posters
β”œβ”€β”€ input_images/              # Input/reference images folder (organized per session)
β”œβ”€β”€ screenshots/               # Debug screenshots captured during automation steps
└── app/                       # Core application codebase
    β”œβ”€β”€ __init__.py
    β”œβ”€β”€ config.py              # Configuration, selectors, ports, and environment setup
    β”œβ”€β”€ prompts.py             # Default Google Flow prompt templates
    β”œβ”€β”€ automation/            # Low-level Playwright UI automation flow
    β”‚   └── flow.py
    β”œβ”€β”€ boss_functions/        # High-level orchestration functions (create, generate, edit, ratio)
    β”‚   β”œβ”€β”€ project_creator.py
    β”‚   β”œβ”€β”€ poster_generator.py
    β”‚   β”œβ”€β”€ poster_editor.py
    β”‚   └── poster_ratio_editor.py
    β”œβ”€β”€ mcp/                   # FastMCP Server definition & HTTP/STDIO endpoints
    β”‚   └── server.py
    └── services/              # Helper utilities (browser, clipboard, db, downloads, pasting)
        β”œβ”€β”€ browser_handler.py
        β”œβ”€β”€ clipboard_handler.py
        β”œβ”€β”€ db_handler.py
        β”œβ”€β”€ image_download.py
        β”œβ”€β”€ image_pasting.py
        └── prompt_submission.py

πŸ› οΈ Prerequisites

  • Python: 3.10 or higher

  • Package Manager: uv (Recommended) or standard pip

  • Browser: Google Chrome installed on host machine

  • Google Account: Google account logged in on Chrome (for access to labs.google/fx/tools/flow)


πŸš€ Local Setup & Installation Guide

Follow these step-by-step instructions to set up and run the project locally.

Step 1: Clone the Repository

git clone https://github.com/rafin0906/google-flow-mcp-server.git
cd google-flow-mcp-server

Step 2: Install Dependencies & Playwright

Using uv (Recommended):

# Create virtual environment and install dependencies
uv sync

# Install Playwright Chromium browser binaries
uv run python -m playwright install chromium

Or using standard pip:

python -m venv .venv
# On Windows PowerShell:
.venv\Scripts\Activate.ps1
# On Linux/macOS:
source .venv/bin/activate

pip install -r requirements.txt
python -m playwright install chromium

Step 3: Create Required Folders

Ensure all essential directories exist in the project root:

# Windows PowerShell:
New-Item -ItemType Directory -Force -Path "input_images", "downloads", "screenshots", "db", "chrome_profile"

# Linux / macOS:
mkdir -p input_images downloads screenshots db chrome_profile

Step 4: Environment Configuration (.env)

Create a .env file in the project root directory:

PUBLIC_BASE_URL=http://localhost:8000
SERVER_HOST=0.0.0.0
SERVER_PORT=8000
MCP_PORT=8001
MCP_TRANSPORT=stdio

Step 5: Initialize Chrome Authentication Profile

To enable Google Flow automation without repeating Google logins:

  1. Launch Chrome using the persistent user data directory (chrome_profile/).

  2. Navigate to Google Flow and log into your Google Account.

  3. Once logged in, close the browser. The session cookies will be saved in chrome_profile/.


πŸ–₯️ Running Locally (3 Execution Modes)

Mode A: Direct Script Execution (main.py)

Run the standard Playwright poster generation pipeline directly without MCP:

# Place your reference images inside input_images/ (or subfolder)
uv run python main.py

Mode B: FastMCP Server (STDIO Mode for Claude Desktop / Cursor)

Start the MCP server locally over STDIO:

uv run python -m app.mcp.server

or via FastMCP CLI:

uv run fastmcp run app/mcp/server.py

Connecting to Claude Desktop (Local STDIO)

Add the following snippet to your %APPDATA%\Claude\claude_desktop_config.json:

{
  "mcpServers": {
    "google-flow": {
      "command": "uv",
      "args": [
        "run",
        "--directory",
        "C:\\MCP Servers\\flow-project",
        "python",
        "-m",
        "app.mcp.server"
      ]
    }
  }
}

Mode C: Interactive MCP Inspector

Test and debug MCP tools via a local web GUI:

uv run fastmcp dev inspector app/mcp/server.py

🌐 Remote Deployment Guide (VPS & Ngrok) [BETA]

WARNING

Remote server mode is currently inBeta. You may experience occasional session locks or browser disconnects depending on network conditions.

Step 1: Start MCP Server in HTTP Mode

On your VPS or remote machine:

uv run python -m app.mcp.server http

(Server listens on port 8001 with endpoint /mcp)

Step 2: Expose via Ngrok Tunnel

In a separate terminal window, launch Ngrok on port 8001:

npx ngrok http 8001

Ngrok will generate a secure HTTPS forwarding URL, e.g., https://xxxx-xxxx.ngrok-free.app.

Step 3: Connect Remote Client

In Claude Desktop / MCP Client:

  • Remote Server URL: https://xxxx-xxxx.ngrok-free.app/mcp

Step 4: Web Image Uploader UI (Token-Free Uploads)

For remote users, uploading large image files as Base64 strings can consume substantial LLM context tokens. To solve this, the server provides a built-in Web Uploader UI:

  • Open https://<your-ngrok-url>/upload?session_id=<your_session_id> in any browser.

  • Drag & drop your input images.

  • Images are saved directly to input_images/<session_id>/ on the server and are automatically picked up by tool_generate_poster.

For detailed 24/7 background systemd service setup on Ubuntu VPS, refer to VPS_DEPLOYMENT_GUIDE.md.


🧰 Available MCP Tools Reference

MCP Tool Name

Description

Key Parameters

tool_create_project

Creates a new Google Flow canvas project and selects aspect ratio.

ratio ('16:9', '4:3', '1:1', '3:4', '9:16'), session_id, headless

tool_get_upload_link

Generates a Web Uploader URL for token-free image uploading.

session_id

tool_input_images

Saves base64 reference images directly into server's session folder.

images_b64, session_id

tool_generate_poster

Generates a poster by pasting reference images and prompt into Google Flow canvas.

project_url, prompt, session_id, headless

tool_edit_poster

Refines/edits an existing poster image with an edit prompt.

image_edit_page_url, edit_prompt, headless

tool_poster_ratio_editor

Changes aspect ratio of an existing generated poster image.

edit_url, ratio, prompt, headless


βš™οΈ Key Configuration Settings (app/config.py)

  • HEADLESS (default: False): Set to True for headless execution (required on headless VPS), or False to see browser UI steps during local execution.

  • PUBLIC_BASE_URL: Used to generate public image download links when operating in remote HTTP mode.

  • USER_DATA_DIR: Path to persistent Chrome user profile directory (chrome_profile/).


πŸ“„ License

This project is licensed under the MIT License.

Available Tools

4 tools
tool_create_projectA

Boss Function 1: Creates a new Google Flow project page, saves the project URL to DB (db/projects.json), and selects the desired aspect ratio.

ParametersJSON Schema
NameRequiredDescriptionDefault
ratioNoAspect ratio for the project (options: '16:9', '4:3', '1:1', '3:4', '9:16'). Default: '4:3'.4:3
headlessNoWhether to run Chrome browser in headless mode. Default: False.

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the transparency burden. It discloses the mutation side effect of saving to db/projects.json and notes aspect ratio selection, but it omits details about idempotency, error/failure behavior, or how headless mode affects execution.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence that efficiently covers the main actions and side effects. The 'Boss Function 1:' prefix is unnecessary but does not significantly harm clarity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple (2 parameters, no nested objects) and includes an output schema, so the description does not need to explain return values. It adequately covers creation, DB persistence, and ratio selection, but lacks usage guidance and headless behavior details.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already fully documents both parameters. The description adds minimal extra meaning by referencing 'selects the desired aspect ratio,' but it does not clarify the headless parameter beyond its schema default.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb+resource ('Creates a new Google Flow project page') and adds a unique side effect ('saves the project URL to DB'), clearly distinguishing this creation tool from sibling poster-related tools. It also mentions the aspect ratio selection, aligning with the input schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit when-to-use guidance, exclusions, or alternatives are provided. The description only states what the tool does, leaving the agent to infer that it should be used for creating a project rather than editing or generating posters.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

tool_edit_posterB

Boss Function 3: Edits/refines an existing poster image using the image_edit_page_url stored in DB, submits the editing prompt, captures the updated image edit URL, and downloads the new variation.

ParametersJSON Schema
NameRequiredDescriptionDefault
headlessNoWhether to run Chrome browser in headless mode. Default: False.
edit_promptNoOptional custom edit prompt. If not provided, uses default FLOW_EDIT_PROMPT.
image_edit_page_urlNoOptional image edit URL. If not provided, uses the latest image_edit_page_url from DB.

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

B3.3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description must disclose safety and side-effect details, but it only lists procedural steps (submit prompt, capture URL, download). It does not mention whether the operation is destructive, whether the DB is updated, or required permissionsβ€”critical gaps for a mutation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single run-on sentence that starts with the redundant 'Boss Function 3:' label. While the rest is packed with process steps, the unnecessary prefix and lack of sentence breaks reduce clarity.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool appears to be a multi-step browser automation with headless support, but the description doesn't explain prerequisites (e.g., having an existing poster in DB) or what happens if image_edit_page_url is missing. The output schema exists so return values are handled, but the workflow could use more context on state changes.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema already provides descriptions for all three parameters (headless, edit_prompt, image_edit_page_url) at 100% coverage. The description references edit_prompt and image_edit_page_url but adds no syntax or format details beyond the schema, earning the baseline 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description explicitly states the tool 'Edits/refines an existing poster image' and details the workflow, clearly distinguishing it from sibling tools like generate_poster which creates new posters. The verb 'Edits/refines' precisely identifies the operation on an existing resource.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies the tool is for refining existing posters, with 'using the image_edit_page_url stored in DB' indicating a prerequisite, but it does not explicitly state when to use this tool vs. alternatives like generate_poster or ratio_editor. It provides context but no explicit exclusions or alternative suggestions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

tool_generate_posterA

Boss Function 2: Generates a poster in Google Flow: pastes input images and prompt onto the canvas, clicks Send, opens the generated image edit page, records the image_edit_page_url in DB, and downloads 1K output.

ParametersJSON Schema
NameRequiredDescriptionDefault
promptNoOptional custom prompt text. If not provided, uses default FLOW_PROMPT.
headlessNoWhether to run Chrome browser in headless mode. Default: False.
image_pathsNoOptional list of image file paths to paste. If not provided, uses images from input_images/.
project_urlNoOptional target project URL. If not provided, automatically uses the latest project from DB.

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.7/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of disclosure. It transparently describes side effects ('records the image_edit_page_url in DB', 'downloads 1K output') and specific UI interactions ('pastes input images and prompt onto the canvas', 'clicks Send'), going well beyond a simple 'generates a poster' phrase.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence but is slightly cluttered by the 'Boss Function 2:' prefix, which is superfluous. The core information is front-loaded and each step contributes to understanding the tool's behavior, though the dense chain of actions could be broken down for readability.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return value details are not required. The description covers the full workflow, side effects, and key parameters (via schema). It doesn't mention prerequisites like needing an existing project or setting up Google Flow, but given the optional parameters and self-contained description, it is reasonably complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the schema already documents each parameter (prompt, headless, image_paths, project_url). The description only loosely references 'input images and prompt', which adds no additional meaning beyond the schema. Baseline 3 applies because the schema does the heavy lifting.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it 'Generates a poster in Google Flow' and enumerates a concrete sequence of actions (paste images and prompt, click Send, open edit page, record URL, download output). This specific workflow distinguishes it from sibling tools like tool_edit_poster and tool_poster_ratio_editor, which focus on different poster-related operations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no explicit guidance on when to use this tool versus the sibling tools. It does not mention alternatives, exclusions, or conditions under which another tool would be more appropriate. The workflow implies poster generation, but no comparative context is given.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

tool_poster_ratio_editorA

Boss Function 4: Opens the latest image edit page from DB (db/projects.json), selects the target model aspect ratio, submits the ratio change prompt, captures the updated edit URL, and downloads the output image.

ParametersJSON Schema
NameRequiredDescriptionDefault
ratioNoTarget aspect ratio (options: '16:9', '4:3', '1:1', '3:4', '9:16'). Default: '4:3'.4:3
promptNoOptional ratio change prompt. If not provided, uses default FLOW_RATIO_CHANGE_PROMPT.
edit_urlNoOptional image edit URL. If not provided, uses the latest image_edit_page_url from DB.
headlessNoWhether to run Chrome browser in headless mode. Default: False.

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.9/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It reveals the multi-step process, including reliance on db/projects.json, the prompt submission, URL capture, and image download. However, it does not disclose potential side effects (e.g., whether it modifies the DB) or any environmental requirements, leaving minor gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, dense sentence that efficiently captures the entire process. The 'Boss Function 4:' prefix is unnecessary noise, but the rest of the sentence is information-dense without redundancy. It is reasonably concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the 100% schema coverage, presence of an output schema, and a thorough step-by-step description, the tool is well-contextualized. The only missing element is explicit when-to-use guidance, but overall the description is sufficient for an agent to understand the tool's operation and invoke it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already provides 100% coverage with detailed descriptions for all four parameters, so the baseline is 3. The description references the ratio and prompt in the workflow, but adds no additional semantic detail beyond what the schema already states. No compensation needed.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific workflow: opening the latest edit page from DB, selecting the target aspect ratio, submitting the prompt, capturing the updated URL, and downloading the image. This distinguishes it from sibling tools like tool_edit_poster, which likely handle general edits, by focusing solely on ratio editing.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies the tool is used for changing image aspect ratio and downloading the result, but it does not explicitly state when to use this tool versus alternatives, nor does it mention any exclusions or when-not-to-use conditions. It lacks direct comparison with sibling tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 4 tool updatesv0.1.0
    • First observedtool_create_project
    • First observedtool_edit_poster
    • First observedtool_generate_poster
    • First observedtool_poster_ratio_editor

TDQS

A3.7/5.0
Disambiguation4/5

Each tool targets a distinct step in the poster workflow: create_project sets up a project, generate_poster creates from scratch, edit_poster refines an existing image, and poster_ratio_editor specifically adjusts aspect ratio. There is minor overlap between edit_poster and ratio_editor, but descriptions clarify the difference.

Naming Consistency4/5

Three tools follow a verb_noun pattern (create_project, generate_poster, edit_poster), while poster_ratio_editor uses a noun_noun pattern with 'editor' at the end. The tool_ prefix is consistent, but the deviation in the last tool's pattern makes it slightly inconsistent.

Tool Count5/5

With only 4 tools, the server is well-scoped for a specific poster generation and editing workflow. Each tool serves a distinct purpose in the pipeline, and the count feels appropriate without being excessive or thin.

Completeness4/5

The tool set covers the core lifecycle of creating a project, generating a poster, editing it, and adjusting its ratio. Minor gaps exist (e.g., no delete or listing tool), but the primary workflow is fully supported and agents can complete the intended tasks.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • F
    license
    A
    quality
    D
    maintenance
    Automated Playwright E2E test repair powered by a self-improving, governed MCP server that runs failing tests, collects failure artifacts, reasons about root causes, validates and applies fixes, and re-runs to verify.
    12
    -
  • A
    license
    A
    quality
    C
    maintenance
    An MCP server that assembles CapCut International projects by reading and writing local project files, adding captions, subtitles, overlays, and more so editors start with a mostly-done timeline. It includes tools for inspecting projects, restyling captions, importing subtitles, and rendering alpha-channel overlays via Remotion.
    8
    1
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/rafin0906/google-flow-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server