Veo2 Video Generation MCP server

Enables video generation from text prompts or images with configurable options like aspect ratio and duration, storing results locally for easy access through MCP resources.
Back to servers
Provider
Mario Andreschak
Release date
Apr 20, 2025
Language
TypeScript
Stats
18 stars

This MCP server implements Google's Veo2 video generation capabilities through the Model Context Protocol. It allows you to generate videos from text prompts or images and access those videos as MCP resources.

Prerequisites

  • Node.js 18 or higher
  • Google API key with access to Gemini API and Veo2 model
    • Note: You need to set up a credit card with your API key (visit aistudio.google.com)

Installation Options

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

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
    
  4. Environment 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
  5. Build the project:

    npm run build
    

Usage

Starting the Server

stdio Transport (Default)

npm start
# or
npm start stdio

SSE Transport

npm start sse

MCP Tools

generateVideoFromText

This tool generates a video from a text prompt.

Parameters:

  • prompt (string): 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

This tool 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")

listGeneratedVideos

Lists all generated videos.

MCP Resources

The server exposes these MCP resources:

  • videos://{id} - Access a generated video by its ID
  • videos://templates - Access example video generation templates

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later