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
Provider
wheattoast11
Release date
Apr 02, 2025
Language
TypeScript
Stats
6 stars

The RunwayML + Luma AI MCP server provides tools to interact with RunwayML and Luma AI APIs for generating videos and images through text prompts or image inputs. This server follows the Model Context Protocol (MCP) to enable AI assistants to create visual content via these services.

Installation Requirements

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 (needed for prompt enhancement)

Installation Steps

  1. Obtain the server code
  2. Open a terminal in the server's root directory
  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 with these commands:

npm run build
npm start

You should see RunwayML MCP server running on stdio in your terminal's error output.

MCP Client Configuration

Configure your MCP client (like Claude Desktop App or Cline) with these settings:

  • Name: 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:
    • RUNWAYML_API_SECRET: Your RunwayML API Secret
    • LUMAAI_API_KEY: Your Luma AI API Key
    • OPENROUTER_API_KEY: Your OpenRouter API Key

Example configuration for an MCP client:

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

Text to Video

{
  "tool_name": "generate_text_to_video",
  "arguments": {
    "provider": "runwayml",
    "promptText": "A serene mountain landscape at sunset",
    "runway_model": "gen-2",
    "runway_resolution": "1280:768",
    "runway_watermark": false
  }
}

Key parameters:

  • provider: runwayml (default) or lumaai
  • promptText: Your text description
  • Provider-specific options for resolution, model, and more

Image to Video

{
  "tool_name": "generate_image_to_video",
  "arguments": {
    "provider": "lumaai",
    "promptImage": "https://example.com/your-image.jpg",
    "promptText": "Subtle camera pan right",
    "luma_model": "ray-2",
    "luma_aspect_ratio": "16:9",
    "duration": 5
  }
}

Key parameters:

  • provider: runwayml (default) or lumaai
  • promptImage: URL to your image
  • promptText: Optional text guidance
  • Provider-specific options for model and formatting

Image Generation

{
  "tool_name": "luma_generate_image",
  "arguments": {
    "prompt": "A futuristic cityscape at night",
    "aspect_ratio": "16:9",
    "model": "photon-1"
  }
}

Prompt Enhancement

{
  "tool_name": "enhance_prompt",
  "arguments": {
    "original_prompt": "A cat in space",
    "instructions": "Make this more detailed and cinematic"
  }
}

Luma AI Management

  • List generations: luma_list_generations
  • Get generation details: luma_get_generation
  • Delete generation: luma_delete_generation
  • Add audio to video: luma_add_audio
  • Upscale video: luma_upscale

Example Workflows

Creating a 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.",
    "aspect_ratio": "16:9"
  }
}
  1. Animate the image:
{
  "tool_name": "generate_image_to_video",
  "arguments": {
    "provider": "lumaai",
    "promptImage": "[URL from step 1]",
    "promptText": "Slow pan left across the rainy cyberpunk cityscape",
    "luma_aspect_ratio": "16:9",
    "duration": 5
  }
}

Product Animation

  1. Create a product image with reference:
{
  "tool_name": "luma_generate_image",
  "arguments": {
    "prompt": "A sleek futuristic wireless earbud floats in a bright, minimalist white room",
    "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": "[URL from step 1]",
    "promptText": "The earbud slowly rotates in zero gravity",
    "luma_aspect_ratio": "1:1",
    "duration": 5
  }
}

How to add this MCP server to 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 > 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"
            ]
        }
    }
}

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

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