Skip to main content
Glama
README.md
# flow-mcp

Unofficial MCP server for [Google Flow](https://flow.google.com). It lets Claude Code, Claude Desktop, Cursor, Codex, Gemini CLI or any other MCP client generate Veo / Omni video and Nano Banana images in Flow, check progress, and download the results, using the Flow credits on your own Google account. No API key.

![Start frame of the sample clip](examples/paper-robot-director-start-frame.jpg)

*Sample: [examples/paper-robot-director.mp4](examples/paper-robot-director.mp4). A free Nano Banana still, animated from that frame with Veo 3.1 Lite for 10 credits, downloaded at 1080p. Made entirely through this server from a Claude Code session.*

It works by operating Flow's web page in a Chrome window that you sign in to yourself. It does not call Flow's private API, read your cookies, or hide automation, and it does not get around bot checks. If Google shows a verification, you solve it in the window.

**Not affiliated with Google.** Automating Flow may be against Google's terms of service, and a UI change on Google's side can break it at any time. Use it with an account you are willing to put at that risk.

## What it does

- **Text to video and text to image** with any model your account offers.
- **Image to video**: `start_frame`, and optionally `end_frame`, from a local file or media already in the project.
- **Ingredients**: reference images for a subject, product or style.
- **Live options, no guessing**: models, aspect ratios, resolutions, clip length range and prices are read from Flow each time. An option Flow does not offer is an error; nothing is substituted.
- **Credit guard**: every generation reads Flow's own quote first. `dry_run` returns the price without spending, `max_credits` refuses anything above it (default cap: 100), and a local ledger records what was spent.
- **Jobs**: each generation gets a `job_id` that survives timeouts and restarts, so an agent polls instead of paying twice.
- **Downloads**: original, 1080p upscaled, 4K (if your plan has it) or GIF, through Flow's own Download menu.
- **Uploads, trash, credit balance, screenshots** for diagnosis.
- **A Claude skill** (`skills/google-flow`) that teaches the agent the cheap workflow: iterate on free stills, then animate the approved frame.

## Setup

Needs Node 20+ and Google Chrome.

```bash
npx -y flow-mcp login
```

That opens a Chrome window with its own profile (`~/.flow-mcp/chrome-profile`). Sign in to Google there once. The sign-in is remembered. Then check the setup:

```bash
npx -y flow-mcp doctor
```

### Claude Code

```bash
claude mcp add flow -- npx -y flow-mcp
```

Install the skill so Claude knows how to direct shots and handle credits:

```bash
npx -y flow-mcp install-skill
```

### Claude Desktop, Cursor, and other clients

```json
{
  "mcpServers": {
    "flow": { "command": "npx", "args": ["-y", "flow-mcp"] }
  }
}
```

### Codex

```toml
[mcp_servers.flow]
command = "npx"
args = ["-y", "flow-mcp"]
tool_timeout_sec = 900
```

### From a clone

```bash
npm install
```

```bash
node bin/flow-mcp.js doctor
```

Point your client at `node /absolute/path/to/bin/flow-mcp.js`.

## Tools

| Tool | Spends credits | What it does |
| --- | --- | --- |
| `flow_status` | no | Whether the window is signed in, which project is open, current settings |
| `flow_login` | no | Brings the Chrome window forward so you can sign in |
| `flow_credits` | no | Credit balance, reset date, and what this connector has spent |
| `flow_open_project` | no | Open a project by URL, create one, or open the most recent |
| `flow_list_models` | no | Image and video models with ratios, resolutions, clip lengths and the current price |
| `flow_generate` | **yes** (images are usually 0) | Text, frames or ingredients to video or images. `dry_run` quotes, `max_credits` caps, `download` saves the result |
| `flow_job` | no | Status of a generation by `job_id`, with optional waiting |
| `flow_list_media` | no | Media in the open project, newest first, and recent jobs |
| `flow_download` | no | Save an item by job, title or index: `original`, `1080p`, `4k`, `gif` |
| `flow_upload` | no | Upload local images to use as frames or ingredients |
| `flow_trash` | no | Move an item to Flow's Trash (restorable in Flow) |
| `flow_screenshot` | no | What the Flow tab is showing right now |

There is also an MCP prompt, `flow_shot`, that walks an idea from still to finished clip.

## Example

> Make an 8 second 16:9 clip of a papercraft robot typing at a tiny desk while a film strip spirals out of its laptop. Show me a still first.

The agent calls `flow_list_models`, generates two stills with `mode: "image"` (0 credits), shows them, then:

```json
{
  "prompt": "The robot types, head bobbing. The film strip flows out of the laptop and the paper city slowly rotates. Slow push-in. Audio: a soft music-box melody.",
  "mode": "video",
  "model": "Veo 3.1 - Lite",
  "start_frame": "Paper robot typing laptop",
  "max_credits": 30,
  "download": true,
  "download_variant": "1080p",
  "output_dir": "/Users/me/Videos"
}
```

## Settings

| Variable | Default | |
| --- | --- | --- |
| `FLOW_MCP_MAX_CREDITS` | `100` | Refuse any single generation quoted above this. `none` removes the cap |
| `FLOW_MCP_HOME` | `~/.flow-mcp` | Chrome profile, jobs, ledger, diagnostics |
| `FLOW_MCP_DOWNLOADS` | `~/.flow-mcp/downloads` | Default download folder |
| `FLOW_MCP_PORT` | `9333` | Local DevTools port of the connector's Chrome |
| `FLOW_MCP_CHROME` | auto-detected | Path to the Chrome or Chromium binary |

## Limits

- Flow's interface must be in English; controls are found by their English labels.
- One Chrome tab, so calls run one at a time.
- Options differ per model (for example, only some models have a clip length slider). Asking for an unavailable option returns an error listing what is on screen.
- Not wired up: Scenes, Extend, editing an existing clip, Characters, Voices, and the Flow Agent.
- Developed and tested on macOS. Windows and Linux paths are in place but not yet tested.
- Tested against the live site: text to image, ingredients to image, start frame to video, dry-run quotes, clip length, uploads, trash, original and 1080p downloads. Not yet run end to end: `end_frame`, 4K and GIF downloads, and a generation that Flow fails (detected by wording on the tile).

## When it breaks

Every page selector is in `src/flow.js`. `flow-mcp inspect` prints the controls on the current Flow page so you can see what changed. A failed tool call saves a screenshot under `~/.flow-mcp/diagnostics` and returns its path.

```bash
npm test
```

runs the offline checks. `npm run smoke` runs the tools end to end over MCP against your signed-in window; it generates one image, refuses unless Flow quotes 0 credits for it, and spends no video credits.

## License

MIT. Google Flow, Veo, Nano Banana and Omni are products of Google; this project is independent of them.

TDQS

A4/5.0

Scored across 12 tools

Disambiguation4/5

Each tool has a clearly distinct role: generation, job polling, media listing, download, upload, project management, credits, models, trash, and diagnostics. The only mild overlaps are flow_status vs flow_screenshot (both diagnostics) and flow_job vs flow_list_media (both report generation/media state), but the descriptions clearly delineate live settings/visual state and single-job vs whole-project views.

Naming Consistency4/5

All names share a consistent flow_ prefix and snake_case, with most following verb_noun (flow_generate, flow_list_media, flow_open_project). A few deviate to noun-only (flow_job, flow_status, flow_credits, flow_screenshot) or verb-only (flow_trash), but the convention remains predictable and readable.

Tool Count5/5

Twelve tools is well within the ideal range and each maps to a distinct capability of automating Google Flow: generate, poll, list, download, upload, project management, credits, models, trash, and diagnostics. Nothing appears redundant or filler.

Completeness4/5

The lifecycle is well covered: generate, poll job, list media, upload ingredients, download, trash, plus account/project/model/credit introspection. Minor gaps exist — no rename/edit of media, no cancel of an in-flight job, and no explicit project listing (only open-by-URL or most recent) — but agents can work around these.