Google AI Edge Gallery Video MCP Server
Enables on-device video generation and management on Android, including running natively via Termux, bridging from a host PC via ADB, monitoring battery/temperature/thermal throttling, and exporting videos to Android's DCIM/Gallery through MediaStore.
Integrates with the Google AI Edge Gallery ecosystem to generate on-device videos using supported models such as Gemma 2, Gemma 3n, MobileDiffusion, and MediaPipe tasks.
Automatically synchronizes and indexes generated videos into Google Photos via Android MediaStore scan intents, making them appear in the user's photo gallery.
Click on "Deploy 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 AI Edge Gallery Video MCP Server Generate a 15s storyboard video of a robot dancing in neon city and save to Google Photos"
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 AI Edge Gallery Video MCP Server ๐ฌ๐ฑ
A high-performance Model Context Protocol (MCP) server enabling AI agents (Claude Desktop, Cursor, Antigravity, LLM frontends) to direct, generate, and compile on-device videos using the Google AI Edge Gallery ecosystem (google-ai-edge/gallery).
Built from the ground up to run natively on Android devices (via Termux), through an ADB Bridge (USB or Wi-Fi), or as a Standalone Desktop Engine, with automatic synchronization to Android's DCIM / Google Photos Gallery and hardware-aware battery & thermal throttling protection.
๐ Key Highlights
On-Device Edge Video Generation: Turn raw prompts and narrative ideas into complete, multi-scene video stories with cinematic keyframes, camera motions, color grades, and audio score.
Native Android & Termux Support: Zero native C++ compilation hassles. One-line installer on Termux with automatic storage permissions and Android MediaStore scanning.
ADB Host-to-Device Bridge: Run the MCP server on your PC/Mac while seamlessly streaming and indexing generated videos directly onto a connected Android smartphone.
Hardware-Aware Telemetry: Monitors Android battery charge, device temperature, and thermal throttling states to automatically adapt video resolution (720p vs 1080p) and frame rates.
Google AI Edge Gallery Integration: Built to interface with models supported by Google AI Edge Gallery (Gemma 2, Gemma 3n, MobileDiffusion, MediaPipe tasks).
Instant MediaStore Registration: Broadcasts
ACTION_MEDIA_SCANNER_SCAN_FILEintents so exported videos immediately appear in the phone's native Gallery and Google Photos.
Related MCP server: CapCut & Google Flow MCP
๐๏ธ Architecture Overview
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ MCP Client โ
โ (Claude Desktop / Cursor / Antigravity) โ
โโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโ
โ JSON-RPC (stdio / SSE)
โผ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Google AI Edge Gallery Video MCP Server โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Core Engine โ Android Subsystem โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ Storyboard Director โ โ โ Native Termux โ โ ADB Bridge โ โ
โ โ (Gemma Scene Planning & Timing) โ โ โ (On-Device Host) โ โ (Remote Device Push) โ โ
โ โโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโ โ โโโโโโโโโโฌโโโโโโโโโโ โโโโโโโโโโโโโฌโโโโโโโโโโโโ โ
โ โผ โ โ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โผ โผ โ
โ โ Keyframe Generator & Styler โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ (Diffusion / Edge SVG Engine) โ โ โ Unified Device Manager โ โ
โ โโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโ โ โ - Battery Level & Temp Monitoring โ โ
โ โผ โ โ - Thermal Throttling Mitigation โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โโโโโโโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ MediaPipe FX & Filter Pipeline โ โ โ โ
โ โ (Ken Burns Pan/Zoom, Grade LUTs) โ โ โผ โ
โ โโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โผ โ โ Gallery Sync Manager โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ - Destination: /sdcard/DCIM/GoogleEdgeAI โ โ
โ โ Hardware-Aware Video Compiler โโโผโโบ โ - MediaStore Intent Broadcast โ โ
โ โ (FFmpeg H.264 + Ambient Audio) โ โ โ - Google Photos / Gallery Auto-Indexing โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ๐ Quick Start Guide
Option 1: Native on Android (Termux)
Run this one-line command inside Termux:
pkg install -y curl && curl -sSL https://raw.githubusercontent.com/hayhihey/google-ai-edge-gallery-video-mcp/main/scripts/termux-install.sh | bashOnce installed, simply start the server:
edge-video-mcpAll created videos will automatically appear in your phone's Gallery under GoogleEdgeAI (/sdcard/DCIM/GoogleEdgeAI)!
Option 2: Host PC with Android Phone Connected (ADB Bridge)
Enable Developer Options and USB Debugging (or Wireless Debugging) on your Android phone.
Connect your phone to your computer via USB or Wi-Fi (
adb connect <phone_ip>:5555).Clone and build the project:
git clone https://github.com/google-ai-edge/google-ai-edge-gallery-video-mcp.git cd google-ai-edge-gallery-video-mcp npm install npm run buildVerify Android device connectivity:
bash scripts/adb-setup.sh
Option 3: Desktop Standalone (No phone required)
The server automatically detects when no Android device is attached and runs the edge simulation pipeline locally on Windows, macOS, or Linux.
Prerequisite: Ensure ffmpeg is installed:
macOS:
brew install ffmpegUbuntu/Debian:
sudo apt install -y ffmpegWindows:
winget install Gyan.FFmpegorchoco install ffmpeg
git clone https://github.com/google-ai-edge/google-ai-edge-gallery-video-mcp.git
cd google-ai-edge-gallery-video-mcp
npm install
npm run build
npm start๐ Connecting to MCP Clients
Claude Desktop Configuration
Add the following to your claude_desktop_config.json:
{
"mcpServers": {
"google-ai-edge-video": {
"command": "node",
"args": [
"/path/to/google-ai-edge-gallery-video-mcp/dist/index.js"
],
"env": {
"EDGE_MCP_OUTPUT_DIR": "/path/to/custom/output"
}
}
}
}On Windows, use escaped backslashes: C:\\Users\\<Username>\\...\\dist\\index.js
๐ ๏ธ MCP Tools Reference
Tool Name | Parameters | Description |
|
| Full end-to-end video synthesis pipeline. Directs scenes, synthesizes keyframes, applies camera motions & color grading, encodes MP4, and indexes in Android Gallery. |
|
| Directs multi-shot scene breakdowns, camera motions ( |
|
| Generates high-fidelity keyframe image assets for each scene. |
|
| Generates hardware-optimized filtergraphs for Ken Burns motions, vignette, and cinematic color palettes. |
|
| Low-level assembler for stitching shot clips, transitions, and audio beds into an H.264 MP4. |
| (None) | Inspects real-time battery charge, temperature, thermal throttling state, and acceleration delegates. |
|
| Moves any video into |
|
| Catalogs models compatible with Google AI Edge Gallery (Gemma 2, Gemma 3n, MobileDiffusion, MediaPipe). |
๐ฆ MCP Resources & Prompts
Resources
edge://device/telemetry: Real-time hardware telemetry (battery, temperature, storage, encoder support).edge://gallery/videos: Catalog of generated video files with sizes and timestamps.edge://models/inventory: List of edge models available on device.
Prompts
ai_video_director: Creative director persona to brainstorm screenplays tailored to edge constraints.social_shorts_creator: High-engagement 9:16 vertical short template designed for TikTok, Reels, and Shorts.
๐งช Testing & Verification
Run the comprehensive unit test suite:
npm testTest coverage includes:
Storyboard director planning across aspect ratios (9:16, 16:9, 1:1).
Mobile-constrained thermal throttling logic.
Procedural SVG keyframe rendering and XML escaping.
Ken Burns motion expressions and color grading filtergraphs.
Unified device detection (Termux / ADB / Local).
๐ณ Docker Deployment
A lightweight multi-stage Docker image with built-in FFmpeg and Android tools:
# Build and run with docker compose
docker compose up -d
# Or run directly with docker
docker build -t edge-video-mcp .
docker run --rm -v $(pwd)/output:/app/output edge-video-mcp๐ข Deploying to GitHub
To publish this repository to your GitHub account:
# 1. Initialize git repository
git init -b main
# 2. Add files and make initial commit
git add .
git commit -m "feat: initial release of Google AI Edge Gallery Video MCP Server"
# 3. Create a new repository on GitHub (e.g. google-ai-edge-gallery-video-mcp)
# 4. Link remote and push:
git remote add origin https://github.com/<your-username>/google-ai-edge-gallery-video-mcp.git
git push -u origin mainThe pre-configured GitHub Actions CI/CD workflows (.github/workflows/ci.yml and release.yml) will automatically:
Run automated tests across Ubuntu and Windows on Node.js 18, 20, and 22.
Package releases upon pushing tags (e.g.
git tag v1.0.0 && git push origin v1.0.0).
๐ License
Licensed under the Apache License, Version 2.0.
Available Tools
8 toolsandroid_device_statusA
Checks Android device battery percentage, thermal throttling status, available storage, and acceleration mode (Termux, ADB bridge, or Host).
Inputs: no named parameters.
android_gallery_exportA
Exports any video file to Android DCIM folder and triggers Android MediaStore scanner so it instantly shows up in Google Photos / Gallery.
Inputs: videoFilePath (required), customTitle.
edge_apply_video_fxC
Generates hardware-optimized filtergraphs for Ken Burns camera motion, color balance, and cinematic vignette.
Inputs: fps, motion, colorGrade, aspectRatio, +1 more.
edge_compile_videoC
Compiles an existing storyboard, keyframes, transitions, and audio into final MP4 video file.
Inputs: storyboard (required), applyMotionFx, outputFileName, addBackgroundScore, +1 more.
edge_generate_keyframesC
Generates visual keyframe cards and assets for each shot in a storyboard.
Inputs: storyboard (required).
edge_models_managerC
Inspects and manages Google AI Edge Gallery models (Gemma 2, Gemma 3n, MobileDiffusion, MediaPipe tasks).
Inputs: task, action.
edge_storyboard_planB
Plans a director-level screenplay and storyboard breakdown from a raw prompt, specifying scene shots, camera dynamics, transitions, and timing.
Inputs: prompt (required), title, shotsCount, aspectRatio, +1 more.
edge_video_createB
End-to-end prompt-to-video pipeline powered by Google AI Edge Gallery standards. Plans storyboard scenes, renders keyframes, applies Ken Burns motion and color grading, compiles into MP4, and syncs directly to Android DCIM Gallery / Google Photos.
Inputs: prompt (required), style, title, aspectRatio, +4 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogโฆ
TDQS
Scored across 8 tools
edge_video_create is an end-to-end pipeline that subsumes the individual step tools (edge_storyboard_plan, edge_generate_keyframes, edge_apply_video_fx, edge_compile_video), and its gallery-sync step overlaps with android_gallery_export. The modular vs. monolithic paths are explicitly described, so an agent can reason about it, but boundaries remain blurry.
Names are readable snake_case with thematic prefixes (edge_/android_), but the verb/noun ordering is mixed: edge_video_create and edge_storyboard_plan are noun_verb while edge_generate_keyframes, edge_apply_video_fx, and edge_compile_video are verb_noun. The two-domain prefix scheme is a reasonable choice but not fully predictable.
Eight tools is a well-scoped set for a video-generation pipeline, covering planning, keyframes, FX, compile, orchestration, export, device status, and model management without obvious padding.
The surface covers the full prompt-to-MP4 lifecycle plus device/export/model management. Minor gaps exist: edge_compile_video references audio but there is no audio-generation tool, and there is no cleanup/delete for produced assets.
Maintenance
Related MCP Connectors
AI video editor your agent can drive: plan scenes, edit a multi-track timeline, and render MP4s.
Agentic AI video editor: edit a real timeline, generate clips, music and voice, then render.
AI video agent: edit timelines, captions, voice, music, images and ads, then render MP4s.
Video, image and audio generation on top AI models for agents, with an AI director built in.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to directly control Android devices via Termux, providing 120+ tools for screen manipulation, file management, app control, and system operations with layered loading and security gating.4MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI coding agents to generate cinematic video and image assets and perform autonomous timeline assembly, multi-track audio editing, chroma-key compositing, and local draft manipulation from conversational prompts.3MIT
- AlicenseNot gradedqualityAmaintenanceGives AI agents vision and control over Android devices using ADB and scrcpy, enabling screenshots, input gestures, app management, UI automation, shell commands, file transfer, and audio/video streaming.392 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables AI agents to see and control Android devices through ADB and scrcpy, supporting screenshots, input, app management, UI automation, shell/file access, and audio/video streaming.392 npmMIT