This MCP server allows you to generate videos from text prompts or images using AI image generation models like Luma Ray2 Flash and Kling v1.6 Pro. It provides a straightforward way to control video parameters and create AI-generated video content.
npm install
.env
file and set your FAL.AI API key:
FAL_KEY=your_fal_key_here
You can obtain an API key from FAL.AIBuild the server:
npm run build
Run the server:
npm start
To use this server with Claude Desktop, add the following to your claude_desktop_config.json
file:
{
"mcpServers": {
"video-generator": {
"command": "node",
"args": ["your_install_path/fal-mcp-server/build/index.js"],
"env": {
"FAL_KEY": "your_fal_key_here"
}
}
}
}
Generates videos from text prompts and/or images using AI models.
Parameters:
prompt
(required): Text description of the video content you want to generateimage_url
(optional): Starting image URL for the video (URL or base64 data URI)end_image_url
(optional): Ending image URL for the video (URL or base64 data URI)aspect_ratio
(default "16:9"): Video aspect ratio ("16:9", "9:16", "4:3", "3:4", "21:9", "9:21")resolution
(default "540p"): Video resolution ("540p", "720p", "1080p")duration
(default "5s"): Video length ("5s", "9s")loop
(default false): Whether to loop the videomodel
(default "luma"): AI model to use ("luma"=Ray2, "kling"=Kling v1.6 Pro)Checks the status of a video generation request.
Parameters:
request_id
(required): Request ID to checkmodel
(default "luma"): AI model used for the request ("luma"=Ray2, "kling"=Kling v1.6 Pro)You can use prompts like this in Claude:
Generate a video of a cat playing with a ball of yarn. Please use portrait mode and the Kling model.
Claude will call the generate-video
tool with appropriate parameters and provide the resulting video URL.
The optimal model may vary depending on your prompt and desired outcome.
Ensure your FAL_KEY environment variable is correctly set. You can also set it directly in the Claude Desktop configuration file.
If errors occur during video generation, detailed error messages will be logged. Common issues include:
If errors persist, wait and try again, or try modifying your prompt.
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "video-generator" '{"command":"node","args":["your_install_path/fal-mcp-server/build/index.js"],"env":{"FAL_KEY":"your_fal_key_here"}}'
See the official Claude Code MCP documentation for more details.
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 > 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": {
"video-generator": {
"command": "node",
"args": [
"your_install_path/fal-mcp-server/build/index.js"
],
"env": {
"FAL_KEY": "your_fal_key_here"
}
}
}
}
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 explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"video-generator": {
"command": "node",
"args": [
"your_install_path/fal-mcp-server/build/index.js"
],
"env": {
"FAL_KEY": "your_fal_key_here"
}
}
}
}
3. Restart Claude Desktop for the changes to take effect