logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

mcp-ai-media-creator

Harness advanced AI engines (RunwayML, Luma AI) to synthesize novel video clips and static imagery from textual descriptions or image inputs. Features include integrated audio track injection, output resolution enhancement, and prompt textual refinement via external LLMs. All operational workflows are managed through direct API calls managed by this server.

Author

mcp-ai-media-creator logo

wheattoast11

No License

Quick Info

GitHub GitHub Stars 11
NPM Weekly Downloads 0
Tools 1
Last Updated 2026-02-19

Tags

aivideosapigenerate videosai generatedvideos images

MseeP.ai Security Assessment Badge

Unified Media Synthesis Engine (RunwayML & Luma AI Backends)

This intermediary server facilitates programmatic access to cutting-edge generative multimedia APIs provided by RunwayML and Luma AI.

Core Capabilities

  • Text-to-Motion Synthesis (Video generation via RunwayML or Luma AI).
  • Image-to-Motion Synthesis (Video generation from static input images using either provider).
  • Static Visual Generation (Image creation via Luma AI).
  • Luma AI Job Lifecycle Management (Enumeration, retrieval, and purging of prior outputs).
  • Audio track association for Luma AI generated sequences.
  • Resolution boosting/refinement for Luma AI assets.
  • Pre-processing input directives using OpenRouter-hosted Large Language Models for improved creative targeting.

Operational Requirements

  • Runtime Environment: Node.js (Version 18 LTS or higher advised).
  • Package Manager: npm (typically bundled with Node.js).
  • Authentication Tokens Required:
    • Secret for RunwayML Access
    • Key for Luma AI Services
    • Key for OpenRouter integration (exclusively for prompt augmentation).

Setup Procedure

  1. Acquire Source: Download or clone the repository code base.
  2. Directory Context: Open a shell interface positioned within the server's primary directory (runwayml-mcp-server).
  3. Dependency Installation: Execute the following command: bash npm install

Configuration Mandates

  1. Environment File Creation: At the root of the server structure, fabricate a configuration file named .env.
  2. Token Injection: Populate the .env file with your requisite credentials: dotenv RUNWAYML_API_SECRET=your_runwayml_api_secret_here LUMAAI_API_KEY=your_luma_api_key_here OPENROUTER_API_KEY=your_openrouter_api_key_here

    Substitute the placeholder strings with your genuine access credentials.

Server Execution

  1. Compilation Phase (If applicable): Transpile the source code (e.g., TypeScript): bash npm run build

  2. Activation Command: Initiate the server process: bash npm start

    Verification: The console output (stderr stream) should confirm successful initialization, typically logging a phrase like RunwayML MCP server running on stdio.

Client Connection Protocol (For MCP Hosts like Cline/Desktop Apps)

Configure your controlling MCP client application to interface with this local service endpoint. Standard configuration generally necessitates:

  • Designation: A unique identifier (e.g., ai-media-hub).
  • Execution Command: node
  • Parameters: The absolute file path pointing to the compiled entry script (e.g., /path/to/your/runwayml-mcp-server/build/server-index.js)
  • **Runtime Environment Variables (Must match .env):
    • RUNWAYML_API_SECRET
    • LUMAAI_API_KEY
    • OPENROUTER_API_KEY

Conceptual Client Configuration Snippet:

{ "mcpServers": { "ai-media-hub": { "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": [] } } }

(Ensure the path specified in args is absolute for your deployment environment)

Available Interface Functions (Tools)

  • generate_text_to_video: Synthesizes sequential imagery from textual input.
    • provider: (String, Optional) Selection: runwayml (Default) or lumaai.
    • promptText: (String, Required) The descriptive directive for the video content.
    • runway_model: (String, Optional) Specific Runway model ID (e.g., "gen-2").
    • runway_resolution: (String, Optional) Aspect ratio string (e.g., "1280:768" or "768:1280").
    • runway_watermark: (Boolean, Optional) Flag to include/exclude system watermark; defaults to false.
    • luma_model: (String, Optional) Luma model identifier (ray-flash-2, ray-2 (Default), ray-1-6).
    • luma_aspect_ratio: (String, Optional) Luma output ratio (e.g., 16:9 (Default), 1:1).
    • luma_loop: (Boolean, Optional) Indicates if output should be looped.
    • duration: (Number, Optional) Desired length in seconds.
    • seed: (Number, Optional) Controls generation determinism.
  • generate_image_to_video: Transforms a provided image into a dynamic sequence.
    • provider: (String, Optional) runwayml (Default) or lumaai.
    • promptImage: (String|Array, Required) Image source URL, or for Runway, an array structure [{uri: "url", position: "first" | "last"}].
    • promptText: (String, Optional) Textual context guiding the motion.
    • runway_model: (String, Optional) Runway model designation (gen3a_turbo (Default)).
    • runway_duration: (String, Optional) Runway time constraint (5 (Default) or 10).
    • runway_ratio: (String, Optional) Output dimensions (1280:768 or 768:1280).
    • runway_watermark: (Boolean, Optional) Watermark flag; default false.
    • luma_model: (String, Optional) Luma model (ray-flash-2, ray-2 (Default), ray-1-6).
    • luma_aspect_ratio: (String, Optional) Luma ratio (e.g., 16:9 (Default)).
    • luma_loop: (Boolean, Optional) Looping enforcement.
    • seed: (Number, Optional) Deterministic parameter.
  • enhance_prompt: Applies complex linguistic enrichment to user inputs via OpenRouter.
    • original_prompt: (String, Required) The input text requiring refinement.
    • model: (String, Optional) LLM identifier (e.g., anthropic/claude-3.5-sonnet as fallback).
    • instructions: (String, Optional) Specific guidance for the LLM's refinement process.
  • luma_generate_image: Creates still visuals using Luma AI's dedicated models.
    • prompt: (String, Required) The core text description.
    • aspect_ratio: (String, Optional) Luma dimension setting (16:9 (Default)).
    • model: (String, Optional) Luma visual model (photon-1 (Default), photon-flash-1).
    • image_ref: (Array, Optional) Image guidance inputs ({url: string, weight?: number}). Maximum of 4 entries.
    • style_ref: (Array, Optional) Style guidance inputs ({url: string, weight?: number}). Maximum of 1 entry.
    • character_ref: (Object, Optional) Identity preservation structure ({ identity0: { images: [url1, ...] } }).
    • modify_image_ref: (Object, Optional) Image modification structure ({url: string, weight?: number}).
  • luma_list_generations: Retrieves a manifest of prior Luma tasks.
    • limit: (Number, Optional) Result count ceiling (Default 10).
    • offset: (Number, Optional) Starting index for retrieval (Default 0).
  • luma_get_generation: Fetches detailed status for a single Luma output.
    • generation_id: (String, Required) The generation's unique identifier (UUID).
  • luma_delete_generation: Permanently removes a specified Luma asset record.
    • generation_id: (String, Required) The target UUID.
  • luma_get_camera_motions: Lists the motion archetypes supported by Luma AI prompting. (Zero parameters).
  • luma_add_audio: Synthesizes and embeds sound into a Luma video output.
    • generation_id: (String, Required) The target video's UUID.
    • prompt: (String, Required) Textual instruction for the generated soundscape.
    • negative_prompt: (String, Optional) Exclusions for the audio generation.
  • luma_upscale: Triggers a higher-resolution rendering process on a completed Luma clip.
    • generation_id: (String, Required) The source UUID.
    • resolution: (String, Optional) Target quality (1080p (Default) or 4k).

(Note: Task initiation for generation tools (generate_*, luma_upscale) results in an immediate return from the server; final asset delivery and status updates are relayed asynchronously via the MCP notification channel.)

Workflow Illustrations

These examples demonstrate sequenced operations using the integrated toolkit:

1. Cinematic Scene Production (Cyberpunk Theme)

Objective: Produce a brief 5-second video sequence depicting "Neon rivers flowing through a city of chrome."

Phase Sequence:

  1. Visual Blueprint Creation (Luma):

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

    (Await completion to obtain the resultant image URI)

  2. Motion Application (Luma):

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

    (Await final video processing)

2. Commercial Asset Generation (Floating Earbud)

Goal: Render a 5-second clip showing a high-tech earbud suspended in a clean, sterile environment.

Phase Sequence:

  1. Scene Composition with Product Injection (Luma):

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

    (Wait for initial visual creation and capture the URI)

  2. Dynamic Rendering (Luma):

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

    (Wait for video finalization)

3. High-Fidelity Image Motion (RunwayML Gen3a Utilization)

Goal: Apply motion dynamics to an existing static image using RunwayML's latest architecture.

Phase Sequence:

  1. (Optional Prerequisite): Employ luma_generate_image if a source visual is unavailable.
  2. Sequence Generation (RunwayML):

    { "tool_name": "generate_image_to_video", "arguments": { "provider": "runwayml", "promptImage": "{YOUR_IMAGE_URL}", "promptText": "Subtle zoom in, cinematic lighting.", "runway_model": "gen3a_turbo", "runway_duration": "5", "runway_ratio": "1280:768" // Or "768:1280" } }

    (Wait for video artifact completion)

WIKIPEDIA: XMLHttpRequest (XHR) is an API in the form of a JavaScript object whose methods transmit HTTP requests from a web browser to a web server. The methods allow a browser-based application to send requests to the server after page loading is complete, and receive information back. XMLHttpRequest is a component of Ajax programming. Prior to Ajax, hyperlinks and form submissions were the primary mechanisms for interacting with the server, often replacing the current page with another one.

== History == The concept behind XMLHttpRequest was conceived in 2000 by the developers of Microsoft Outlook. The concept was then implemented within the Internet Explorer 5 browser (1999). However, the original syntax did not use the XMLHttpRequest identifier. Instead, the developers used the identifiers ActiveXObject("Msxml2.XMLHTTP") and ActiveXObject("Microsoft.XMLHTTP"). As of Internet Explorer 7 (2006), all browsers support the XMLHttpRequest identifier. The XMLHttpRequest identifier is now the de facto standard in all the major browsers, including Mozilla's Gecko layout engine (2002), Safari 1.2 (2004) and Opera 8.0 (2005).

=== Standards === The World Wide Web Consortium (W3C) published a Working Draft specification for the XMLHttpRequest object on April 5, 2006. On February 25, 2008, the W3C published the Working Draft Level 2 specification. Level 2 added methods to monitor event progress, allow cross-site requests, and handle byte streams. At the end of 2011, the Level 2 specification was absorbed into the original specification. At the end of 2012, the WHATWG took over development and maintains a living document using Web IDL.

== Usage == Generally, sending a request with XMLHttpRequest has several programming steps.

Create an XMLHttpRequest object by calling a constructor: Call the "open" method to specify the request type, identify the relevant resource, and select synchronous or asynchronous operation: For an asynchronous request, set a listener that will be notified when the request's state changes: Initiate the request by calling the "send" method: Respond to state changes in the event listener. If the server sends response data, by default it is captured in the "responseText" property. When the object stops processing the response, it changes to state 4, the "done" state. Aside from these general steps, XMLHttpRequest has many options to control how the request is sent and how the response is processed. Custom header fields can be added to the request to indicate how the server should fulfill it, and data can be uploaded to the server by providing it in the "send" call. The response can be parsed from the JSON format into a readily usable JavaScript object, or processed gradually as it arrives rather than waiting for the entire text. The request can be aborted prematurely or set to fail if not completed in a specified amount of time.

== Cross-domain requests ==

In the early development of the World Wide Web, it was found possible to brea

See Also

`