google-flow-mcp-server
This server automates the creation, generation, editing, and aspect ratio modification of sports editorial graphic posters using Google Flow.
Create Projects: Initialize a new Google Flow project with a specified aspect ratio (e.g., 16:9, 4:3, 1:1, 3:4, 9:16) and save the project URL.
Generate Posters: Upload reference images (optionally pre-uploaded to a session-isolated folder) and a custom prompt; the tool pastes them, submits, captures the image edit page URL, and downloads the 1K output poster.
Edit Posters: Refine an existing poster by providing an edit prompt; it captures the updated edit URL and downloads the new variation.
Change Aspect Ratio: Adjust the aspect ratio of a poster (e.g., from 4:3 to 16:9), submits a ratio change prompt, and downloads the resized output.
Session Isolation: Each user gets isolated project states, image uploads, and database entries for safe concurrent use.
Queueing: Concurrent image generation requests are safely queued to prevent conflicts.
Headless Mode: All operations support optional headless browser execution.
Flexible Prompting: Custom prompts are supported for generation, editing, and ratio changes with sensible defaults.
Provides automation for generating sports editorial graphic posters using Google Flow, including scraping and poster generation workflows.
Click on "Install 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-mcp-servergenerate a poster for tonight's Lakers vs Celtics game"
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 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
π’ 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 standardpipBrowser: 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-serverStep 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 chromiumOr 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 chromiumStep 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_profileStep 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=stdioStep 5: Initialize Chrome Authentication Profile
To enable Google Flow automation without repeating Google logins:
Launch Chrome using the persistent user data directory (
chrome_profile/).Navigate to Google Flow and log into your Google Account.
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.pyMode B: FastMCP Server (STDIO Mode for Claude Desktop / Cursor)
Start the MCP server locally over STDIO:
uv run python -m app.mcp.serveror via FastMCP CLI:
uv run fastmcp run app/mcp/server.pyConnecting 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]
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 8001Ngrok 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 bytool_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 |
| Creates a new Google Flow canvas project and selects aspect ratio. |
|
| Generates a Web Uploader URL for token-free image uploading. |
|
| Saves base64 reference images directly into server's session folder. |
|
| Generates a poster by pasting reference images and prompt into Google Flow canvas. |
|
| Refines/edits an existing poster image with an edit prompt. |
|
| Changes aspect ratio of an existing generated poster image. |
|
βοΈ Key Configuration Settings (app/config.py)
HEADLESS(default:False): Set toTruefor headless execution (required on headless VPS), orFalseto 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 toolstool_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.
| Name | Required | Description | Default |
|---|---|---|---|
| ratio | No | Aspect ratio for the project (options: '16:9', '4:3', '1:1', '3:4', '9:16'). Default: '4:3'. | 4:3 |
| headless | No | Whether to run Chrome browser in headless mode. Default: False. |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| headless | No | Whether to run Chrome browser in headless mode. Default: False. | |
| edit_prompt | No | Optional custom edit prompt. If not provided, uses default FLOW_EDIT_PROMPT. | |
| image_edit_page_url | No | Optional image edit URL. If not provided, uses the latest image_edit_page_url from DB. |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | No | Optional custom prompt text. If not provided, uses default FLOW_PROMPT. | |
| headless | No | Whether to run Chrome browser in headless mode. Default: False. | |
| image_paths | No | Optional list of image file paths to paste. If not provided, uses images from input_images/. | |
| project_url | No | Optional target project URL. If not provided, automatically uses the latest project from DB. |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
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.
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.
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.
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.
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.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| ratio | No | Target aspect ratio (options: '16:9', '4:3', '1:1', '3:4', '9:16'). Default: '4:3'. | 4:3 |
| prompt | No | Optional ratio change prompt. If not provided, uses default FLOW_RATIO_CHANGE_PROMPT. | |
| edit_url | No | Optional image edit URL. If not provided, uses the latest image_edit_page_url from DB. | |
| headless | No | Whether to run Chrome browser in headless mode. Default: False. |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
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.
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.
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.
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.
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.
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.
4 tool updates
v0.1.0- First observed
tool_create_project - First observed
tool_edit_poster - First observed
tool_generate_poster - First observed
tool_poster_ratio_editor
TDQS
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.
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.
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.
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
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
Brand-safe MCP for AI agents to create editable, on-brand graphics and automate variants.
Automate Google Ad Manager: campaigns, line items, creatives, inventory, reporting β 51 tools.
Creative-intelligence MCP for campaign strategy, ad builds, QA, and reporting.
Meta Ads MCP: bulk-create Facebook & Instagram ads across accounts from Drive folders, guardrailed.
Related MCP Servers
- AlicenseAqualityAmaintenanceMCP server for Chrome Web Store β upload, publish, status, metadata & Playwright-based UI automation8633MIT
- FlicenseAqualityDmaintenanceAutomated 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-
- FlicenseNot gradedqualityCmaintenanceMCP server for robust browser automation of legacy web portals, featuring exactly-once execution via an SQLite-backed idempotency lock and resilient Playwright locators.-
- AlicenseAqualityCmaintenanceAn 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.81MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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