npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@raihan0824/mcp-veo2

v1.2.1

Published

MCP server for generating videos with Google Veo2

Readme

MCP Video Generation with Veo2

smithery badge

This project implements a Model Context Protocol (MCP) server that exposes Google's Veo2 video generation capabilities. It allows clients to generate videos from text prompts or images, and access the generated videos through MCP resources.

Features

  • Generate videos from text prompts
  • Generate videos from images
  • Access generated videos through MCP resources
  • Example video generation templates
  • Support for both stdio and SSE transports

Example Images

1dec9c71-07dc-4a6e-9e17-8da355d72ba1

Example Image to Video

Image to Video - from Grok generated puppy

Image to Video - from real cat

Prerequisites

  • Node.js 18 or higher
  • Google API key with access to Gemini API and Veo2 model (= You need to set up a credit card with your API key! -> Go to aistudio.google.com )

Installation

Quick Start with npx (Recommended)

The easiest way to use this package is with npx:

# Set your Google API key
export GOOGLE_GENAI_API_KEY="your-api-key-here"

# Run with stdio transport (for MCP clients)
npx @raihan0824/mcp-veo2

# Run with SSE transport (for web interfaces)
npx @raihan0824/mcp-veo2 sse

# Get help
npx @raihan0824/mcp-veo2 --help

Installing in FLUJO

  1. Click Add Server
  2. Copy & Paste Github URL into FLUJO
  3. Click Parse, Clone, Install, Build and Save.

Installing via Smithery

To install mcp-video-generation-veo2 for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @mario-andreschak/mcp-veo2 --client claude

Manual Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/mcp-video-generation-veo2.git
    cd mcp-video-generation-veo2
  2. Install dependencies:

    npm install
  3. Create a .env file with your Google API key:

    cp .env.example .env
    # Edit .env and add your Google API key

    The .env file supports the following variables:

    • GOOGLE_API_KEY: Your Google API key (required)
    • PORT: Server port (default: 3000)
    • STORAGE_DIR: Directory for storing generated videos (default: ./generated-videos)
    • LOG_LEVEL: Logging level (default: fatal)
      • Available levels: verbose, debug, info, warn, error, fatal, none
      • For development, set to debug or info for more detailed logs
      • For production, keep as fatal to minimize console output

    S3 Cloud Storage (Optional):

    • USE_S3: Enable S3 storage (default: false)
    • S3_ENDPOINT: S3 endpoint URL (e.g., https://s3.amazonaws.com or custom endpoint)
    • S3_REGION: S3 region
    • S3_BUCKET: S3 bucket name
    • S3_ACCESS_KEY: S3 access key
    • S3_SECRET_KEY: S3 secret key

    When S3 is enabled (USE_S3=true), generated videos will be uploaded to your S3 bucket and served via public URLs. This is recommended for production deployments as it provides better scalability and reduces local storage requirements.

  4. Build the project:

    npm run build

Usage

Starting the Server

With npx (Recommended)

# Set your API key
export GOOGLE_GENAI_API_KEY="your-api-key-here"

# stdio Transport (Default) - for MCP clients
npx @raihan0824/mcp-veo2

# SSE Transport - for web interfaces  
npx @raihan0824/mcp-veo2 sse

After Manual Installation

You can start the server with either stdio or SSE transport:

stdio Transport (Default)
npm start
# or
npm start stdio
SSE Transport
npm start sse

This will start the server on port 3000 (or the port specified in your .env file).

Storage Configuration

This MCP server supports two storage modes for generated videos:

Local Storage (Default)

By default, videos are stored locally in the STORAGE_DIR directory. This is suitable for development and small-scale deployments.

# Local storage configuration
USE_S3=false
STORAGE_DIR=./storage

S3 Cloud Storage

For production deployments, you can configure S3-compatible storage to store videos and images in the cloud. This provides better scalability, reliability, and reduces local storage requirements.

# S3 storage configuration
USE_S3=true
S3_ENDPOINT=https://parahu.box.cloudeka.id
S3_REGION=parahu
S3_BUCKET=ai-cloudeka
S3_ACCESS_KEY=your_s3_access_key
S3_SECRET_KEY=your_s3_secret_key

Benefits of S3 Storage:

  • Scalability: No local disk space limitations
  • Reliability: Built-in redundancy and backup
  • Performance: CDN-like distribution
  • Cost-effective: Pay only for what you use
  • Accessibility: Generated content accessible via public URLs

Supported S3 Providers:

  • Amazon S3
  • DigitalOcean Spaces
  • Cloudeka Object Storage
  • MinIO
  • Any S3-compatible storage service

MCP Tools

The server exposes the following MCP tools:

generateVideoFromText

Generates a video from a text prompt.

Parameters:

  • prompt (string): The text prompt for video generation
  • config (object, optional): Configuration options
    • aspectRatio (string, optional): "16:9" or "9:16"
    • personGeneration (string, optional): "dont_allow" or "allow_adult"
    • numberOfVideos (number, optional): 1 or 2
    • durationSeconds (number, optional): Between 5 and 8
    • enhancePrompt (boolean, optional): Whether to enhance the prompt
    • negativePrompt (string, optional): Text describing what not to generate

Example:

{
  "prompt": "Panning wide shot of a serene forest with sunlight filtering through the trees, cinematic quality",
  "config": {
    "aspectRatio": "16:9",
    "personGeneration": "dont_allow",
    "durationSeconds": 8
  }
}

generateVideoFromImage

Generates a video from an image.

Parameters:

  • image (string): Base64-encoded image data
  • prompt (string, optional): Text prompt to guide the video generation
  • config (object, optional): Configuration options (same as above, but personGeneration only supports "dont_allow")

generateImage

Generates an image from a text prompt using Google Imagen.

Parameters:

  • prompt (string): The text prompt for image generation
  • numberOfImages (number, optional): Number of images to generate (default: 1)
  • includeFullData (boolean, optional): Whether to include the full image data in response (default: true)

Example:

{
  "prompt": "A beautiful sunset over mountains with clouds, photorealistic style",
  "numberOfImages": 1,
  "includeFullData": true
}

listGeneratedVideos

Lists all generated videos.

listGeneratedImages

Lists all generated images.

MCP Resources

The server exposes the following MCP resources:

videos://{id}

Access a generated video by its ID.

videos://templates

Access example video generation templates.

images://{id}

Access a generated image by its ID.

images://templates

Access example image generation templates.

Development

Project Structure

  • src/: Source code
    • index.ts: Main entry point
    • server.ts: MCP server configuration
    • config.ts: Configuration handling
    • tools/: MCP tool implementations
    • resources/: MCP resource implementations
    • services/: External service integrations
    • utils/: Utility functions

Building

npm run build

Development Mode

npm run dev

License

MIT