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.
npx -y @smithery/cli install @mario-andreschak/mcp-veo2 --client claude
Clone the repository:
git clone https://github.com/yourusername/mcp-video-generation-veo2.git
cd mcp-video-generation-veo2
Install dependencies:
npm install
Create a .env
file with your Google API key:
cp .env.example .env
# Edit .env and add your Google API key
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)
Build the project:
npm run build
npm start
# or
npm start stdio
npm start sse
This tool generates a video from a text prompt.
prompt
(string): Text prompt for video generationconfig
(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 2durationSeconds
(number, optional): Between 5 and 8enhancePrompt
(boolean, optional): Whether to enhance the promptnegativePrompt
(string, optional): Text describing what not to generate{
"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
}
}
This tool generates a video from an image.
image
(string): Base64-encoded image dataprompt
(string, optional): Text prompt to guide the video generationconfig
(object, optional): Configuration options (same as above, but personGeneration only supports "dont_allow")Lists all generated videos.
The server exposes these MCP resources:
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.
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"
]
}
}
}
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.
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.