Vidu MCP server

Transforms static images into dynamic videos with customizable parameters through the Vidu AI video generation API, handling authentication, file management, and asynchronous task processing.
Back to servers
Setup instructions
Provider
el-el-san
Release date
Mar 21, 2025
Language
TypeScript
Stats
2 stars

This MCP server allows you to leverage Vidu's powerful AI models to generate videos from images. It provides a convenient interface to Vidu's video generation API with customizable settings for different models and output requirements.

Installation Options

Using Smithery (Recommended)

Install the Vidu Video Generation Server for Claude Desktop automatically using Smithery:

npx -y @smithery/cli install @el-el-san/vidu-mcp-server --client claude

Manual Installation

  1. Clone the repository:
git clone https://github.com/el-el-san/vidu-mcp-server.git
cd vidu-mcp-server
  1. Install dependencies:
npm install
  1. Create a .env file based on .env.template and add your Vidu API key:
VIDU_API_KEY=your_api_key_here
  1. Build the TypeScript code:
npm run build

Configuring for Gemini CLI

To use with Gemini CLI, add the server configuration to ~/.gemini/settings.json:

{
  "mcpServers": {
    "vidu": {
      "command": "node",
      "args": [
        "your_path/vidu-mcp-server/build/index.js"
      ],
      "env": {
        "VIDU_API_KEY": "your_api_key_here"
      }
    }
  }
}

Note: Replace your_path with your actual installation directory path and your_api_key_here with your Vidu API key.

Using the Server

Available Tools

1. Image to Video Conversion

Convert static images to videos with customizable parameters:

Required Parameters:

  • image_url: URL of the image to convert to video

Optional Parameters:

  • prompt: Text prompt for video generation (max 1500 characters)
  • duration: Output video duration in seconds (model-specific)
    • viduq1: 5 seconds only
    • vidu1.5/vidu2.0: 4 or 8 seconds (default: 4)
  • model: Generation model name ("viduq1", "vidu1.5", "vidu2.0", default: "vidu2.0")
  • resolution: Output video resolution (model/duration-specific)
    • viduq1 (5s): 1080p only
    • vidu1.5/vidu2.0 (4s): "360p", "720p", "1080p" (default: "360p")
    • vidu1.5/vidu2.0 (8s): "720p" only
  • movement_amplitude: Amplitude of object movement in frames ("auto", "small", "medium", "large", default: "auto")
  • seed: Random seed for reproducibility
  • bgm: Add background music to the video (boolean, default: false, 4-second videos only)
  • callback_url: URL for asynchronous notifications when generation status changes

Example Request:

{
  "image_url": "https://example.com/image.jpg",
  "prompt": "A serene lake with mountains in the background",
  "duration": 8,
  "model": "vidu2.0",
  "resolution": "720p",
  "movement_amplitude": "medium",
  "seed": 12345,
  "bgm": false
}

2. Check Generation Status

Monitor the status of running video generation tasks:

Required Parameters:

  • task_id: Task ID returned by the image-to-video conversion tool

Example Request:

{
  "task_id": "12345abcde"
}

3. Upload Image

Upload images for use with the Vidu API:

Required Parameters:

  • image_path: Local path to the image file
  • image_type: Image file type ("png", "webp", "jpeg", "jpg")

Example Request:

{
  "image_path": "/path/to/your/image.jpg",
  "image_type": "jpg"
}

Troubleshooting

  • API Key Issues: Ensure your Vidu API key is correctly set in the .env file (for manual setup) or in the Gemini CLI configuration
  • File Upload Errors: Verify that image files are valid and within size limits (10MB for upload-image tool, up to 50MB for direct URL images)
  • Connection Problems: Confirm you have internet access and can reach the Vidu API servers
  • Gemini CLI Issues:
    • Make sure the server is built (npm run build) before configuring in Gemini CLI
    • Verify the path in settings.json points to the correct build/index.js file
    • Restart Gemini CLI after making configuration changes
    • Set "disabled": false in your server configuration

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "vidu-mcp-server" '{"command":"npx","args":["-y","@el-el-san/vidu-mcp-server"]}'

See the official Claude Code MCP documentation for more details.

For 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 > Tools & Integrations and click "New MCP Server".

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

{
    "mcpServers": {
        "vidu-mcp-server": {
            "command": "npx",
            "args": [
                "-y",
                "@el-el-san/vidu-mcp-server"
            ]
        }
    }
}

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 explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "vidu-mcp-server": {
            "command": "npx",
            "args": [
                "-y",
                "@el-el-san/vidu-mcp-server"
            ]
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

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