This MCP server provides a powerful interface to use RunwayML and Luma AI APIs for generating videos and images through text prompts and image inputs. The server supports various features including video generation, image generation, prompt enhancement, and generation management.
npm install
Create a .env
file in the server's root directory with your API keys:
RUNWAYML_API_SECRET=your_runwayml_api_secret_here
LUMAAI_API_KEY=your_luma_api_key_here
OPENROUTER_API_KEY=your_openrouter_api_key_here
Build and start the server:
npm run build
npm start
You should see a message indicating the server is running on stdio.
Configure your MCP client (like Claude Desktop App or Cline) to connect to this server:
runway-luma-server
)node
/path/to/your/runwayml-mcp-server/build/server-index.js
)Example configuration structure:
{
"mcpServers": {
"runway-luma-server": {
"command": "node",
"args": ["/full/path/to/runwayml-mcp-server/build/server-index.js"],
"env": {
"RUNWAYML_API_SECRET": "your_runwayml_api_secret_here",
"LUMAAI_API_KEY": "your_luma_api_key_here",
"OPENROUTER_API_KEY": "your_openrouter_api_key_here"
},
"disabled": false,
"autoApprove": []
}
}
}
{
"tool_name": "generate_text_to_video",
"arguments": {
"provider": "runwayml", // or "lumaai"
"promptText": "Your descriptive prompt text",
"duration": 5,
// Optional parameters for RunwayML
"runway_model": "gen-2",
"runway_resolution": "1280:768",
"runway_watermark": false,
// Optional parameters for Luma AI
"luma_model": "ray-2",
"luma_aspect_ratio": "16:9",
"luma_loop": false,
"seed": 12345
}
}
{
"tool_name": "generate_image_to_video",
"arguments": {
"provider": "runwayml", // or "lumaai"
"promptImage": "https://example.com/image.jpg",
"promptText": "Optional text prompt",
// RunwayML specific parameters
"runway_model": "gen3a_turbo",
"runway_duration": "5",
"runway_ratio": "1280:768",
"runway_watermark": false,
// Luma AI specific parameters
"luma_model": "ray-2",
"luma_aspect_ratio": "16:9",
"luma_loop": false,
"seed": 12345
}
}
{
"tool_name": "luma_generate_image",
"arguments": {
"prompt": "Your image description",
"aspect_ratio": "16:9",
"model": "photon-1",
"image_ref": [{"url": "https://example.com/reference.jpg", "weight": 0.7}],
"style_ref": [{"url": "https://example.com/style.jpg", "weight": 0.5}]
}
}
{
"tool_name": "enhance_prompt",
"arguments": {
"original_prompt": "A cyberpunk city",
"model": "anthropic/claude-3.5-sonnet",
"instructions": "Add detailed lighting and atmosphere descriptions"
}
}
{
"tool_name": "luma_list_generations",
"arguments": {
"limit": 10,
"offset": 0
}
}
{
"tool_name": "luma_get_generation",
"arguments": {
"generation_id": "your-generation-uuid"
}
}
{
"tool_name": "luma_delete_generation",
"arguments": {
"generation_id": "your-generation-uuid"
}
}
{
"tool_name": "luma_add_audio",
"arguments": {
"generation_id": "your-generation-uuid",
"prompt": "Ambient cyberpunk soundtrack with synth",
"negative_prompt": "vocals, talking, speech"
}
}
{
"tool_name": "luma_upscale",
"arguments": {
"generation_id": "your-generation-uuid",
"resolution": "1080p" // or "4k"
}
}
{
"tool_name": "luma_generate_image",
"arguments": {
"prompt": "Overhead shot of a dark, rainy cyberpunk city street at night. Bright neon signs reflect on wet pavement, resembling rivers of light flowing between towering chrome skyscrapers. Film noir aesthetic, photorealistic.",
"aspect_ratio": "16:9"
}
}
{
"tool_name": "generate_image_to_video",
"arguments": {
"provider": "lumaai",
"promptImage": "{IMAGE_URL_FROM_STEP_1}",
"promptText": "Slow pan left across the rainy cyberpunk cityscape, neon lights flickering subtly.",
"luma_aspect_ratio": "16:9",
"duration": 5
}
}
{
"tool_name": "luma_generate_image",
"arguments": {
"prompt": "A single, sleek futuristic wireless earbud floats weightlessly in the center of a bright, minimalist white room with soft, diffused ambient light. Zero gravity effect.",
"aspect_ratio": "1:1",
"image_ref": [{ "url": "{PRODUCT_IMAGE_URL}", "weight": 0.8 }]
}
}
{
"tool_name": "generate_image_to_video",
"arguments": {
"provider": "lumaai",
"promptImage": "{IMAGE_URL_FROM_STEP_1}",
"promptText": "The earbud slowly rotates and drifts gently in zero gravity.",
"luma_aspect_ratio": "1:1",
"duration": 5
}
}
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "runway-luma-server" '{"command":"node","args":["/full/path/to/runwayml-mcp-server/build/server-index.js"],"env":{"RUNWAYML_API_SECRET":"your_runwayml_api_secret_here","LUMAAI_API_KEY":"your_luma_api_key_here","OPENROUTER_API_KEY":"your_openrouter_api_key_here"},"disabled":false,"autoApprove":[]}'
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": {
"runway-luma-server": {
"command": "node",
"args": [
"/full/path/to/runwayml-mcp-server/build/server-index.js"
],
"env": {
"RUNWAYML_API_SECRET": "your_runwayml_api_secret_here",
"LUMAAI_API_KEY": "your_luma_api_key_here",
"OPENROUTER_API_KEY": "your_openrouter_api_key_here"
},
"disabled": false,
"autoApprove": []
}
}
}
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": {
"runway-luma-server": {
"command": "node",
"args": [
"/full/path/to/runwayml-mcp-server/build/server-index.js"
],
"env": {
"RUNWAYML_API_SECRET": "your_runwayml_api_secret_here",
"LUMAAI_API_KEY": "your_luma_api_key_here",
"OPENROUTER_API_KEY": "your_openrouter_api_key_here"
},
"disabled": false,
"autoApprove": []
}
}
}
3. Restart Claude Desktop for the changes to take effect