RunwayML + Luma AI MCP server

Integrates with RunwayML and Luma AI to generate, manage, and enhance videos and images with features like text-to-video conversion, image animation, and content upscaling through asynchronous progress tracking.
Back to servers
Setup instructions
Provider
wheattoast11
Release date
Apr 02, 2025
Language
TypeScript
Stats
9 stars

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.

Installation and Setup

Prerequisites

  • Node.js (v18 LTS or later recommended)
  • npm (usually included with Node.js)
  • API Keys:
    • RunwayML API Secret
    • Luma AI API Key
    • OpenRouter API Key (for prompt enhancement)

Installation Steps

  1. Obtain the server code (download or clone)
  2. Navigate to the server's root directory in your terminal
  3. Install dependencies:
npm install

Configuration

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

Starting the Server

Build and start the server:

npm run build
npm start

You should see a message indicating the server is running on stdio.

MCP Client Configuration

Configure your MCP client (like Claude Desktop App or Cline) to connect to this server:

  • Name: Choose a descriptive name (e.g., runway-luma-server)
  • Command: node
  • Arguments: Full path to the compiled server file (e.g., /path/to/your/runwayml-mcp-server/build/server-index.js)
  • Environment Variables: Add your API keys

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": []
    }
  }
}

Available Tools

Video Generation Tools

Text to Video Generation

{
  "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
  }
}

Image to Video Generation

{
  "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
  }
}

Image Generation

{
  "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}]
  }
}

Prompt Enhancement

{
  "tool_name": "enhance_prompt",
  "arguments": {
    "original_prompt": "A cyberpunk city",
    "model": "anthropic/claude-3.5-sonnet",
    "instructions": "Add detailed lighting and atmosphere descriptions"
  }
}

Luma AI Generation Management

{
  "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"
  }
}

Post-Processing Tools

{
  "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"
  }
}

Example Workflows

Creating a Cyberpunk Noir Music Video Clip

  1. Generate a base image:
{
  "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"
  }
}
  1. Animate the image:
{
  "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
  }
}

Product Advertisement Creation

  1. Generate base product image:
{
  "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 }]
  }
}
  1. Animate the product:
{
  "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
  }
}

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 "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.

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": {
        "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": []
        }
    }
}

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": {
        "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

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