hailuo-mcp
A focused MCP server for generating videos using Hailuo AI models via the RunAPI platform. It provides four core capabilities:
Create text-to-video tasks (
text_to_video): Generate a video from a text prompt using Hailuo text-to-video models (hailuo-02-text-to-video-pro,hailuo-02-text-to-video-standard), with configurable duration and optional polling until completion.Create image-to-video tasks (
image_to_video): Submit an image and generate a video using Hailuo image-to-video models (e.g.,hailuo-02-image-to-video-pro/standard,hailuo-2.3-image-to-video-pro/standard), with options for duration (6 or 10 seconds), output resolution (512p, 768p, 1080p), and first/last frame image URLs.Monitor task status (
get_task): Retrieve the current status and results (including output URLs) for any previously submitted task using its task ID.Check pricing (
check_pricing): Look up current pricing for any Hailuo model and endpoint without requiring an API key, covering all model variants across both text-to-video and image-to-video endpoints.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@hailuo-mcpgenerate a video of a sunset over mountains"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Why This Package?
@runapi.ai/hailuo-mcp is a focused Model Context Protocol server for the Hailuo model line on RunAPI.
It gives MCP-compatible assistants direct access to 2 endpoints and 6 model variants without loading the full RunAPI catalog.
Use this per-model server when an agent should stay scoped to Hailuo. Use @runapi.ai/mcp when one assistant should discover every RunAPI model line.
Related MCP server: @runapi.ai/gemini-omni-mcp
Install
Add it to Claude Code:
claude mcp add hailuo -s user -- npx -y @runapi.ai/hailuo-mcpUse project scope when the server should be shared with a repository:
claude mcp add hailuo -s project -- npx -y @runapi.ai/hailuo-mcpCodex, Cursor, Windsurf, VS Code, Roo Code, and other MCP hosts can use the same stdio command:
{
"mcpServers": {
"hailuo": {
"command": "npx",
"args": ["-y", "@runapi.ai/hailuo-mcp"]
}
}
}check_pricing works before sign-in. For task creation and status polling, ask your assistant to call the login tool. It opens a browser login and saves credentials to ~/.config/runapi/config.json, the same file used by runapi login.
Headless and CI hosts can still set RUNAPI_API_KEY before starting the MCP host.
Ready-made examples are in examples/ for Claude, Cursor, Windsurf, VS Code, and Roo Code.
Tools
Tool | Auth | Purpose |
| Yes | Create a Hailuo image to video task and optionally wait for a terminal status. Returns the task id, status, and output URLs. |
| Yes | Create a Hailuo text to video task and optionally wait for a terminal status. Returns the task id, status, and output URLs. |
| Yes | Fetch the current status and latest payload for an existing task. |
| No | Look up current pricing for a Hailuo model and endpoint. |
Models
Hailuo covers 6 model variants across 2 endpoints. Each tool accepts the models listed for it:
Tool | Models |
|
|
|
|
Model availability can change between releases. Use check_pricing or the Hailuo model page for the current catalog view.
Agent Prompts
Ask your assistant in natural language; it can inspect pricing, create the task, and return the task id plus output URLs.
Create a task
Run a Hailuo image to video task with RunAPI.The assistant can call check_pricing, then image_to_video, and return the task id, status, and output URLs.
Submit without waiting
Create the task but don't wait for it to finish.The assistant calls the create tool with wait: false and returns the task id. Check on it later with get_task.
Check pricing before creating
Check current Hailuo pricing, then create the task if it matches my request.The assistant calls check_pricing and can link to the Hailuo model page for the canonical catalog entry.
Configuration
The server resolves auth in this order:
RUNAPI_API_KEYenvironment variable, useful for headless and CI hosts~/.config/runapi/config.json, created by the MCPlogintool orrunapi loginNo key, which still allows
check_pricing
The config file is normally managed by login. A pre-provisioned headless config can use:
{
"apiKey": "your_runapi_key"
}Do not commit real API keys.
Links
Resource | URL |
Hailuo model page | |
npm package | |
GitHub repository | |
RunAPI MCP overview | |
RunAPI docs |
License
Licensed under the Apache License, Version 2.0.
Available Tools
5 toolscheck_pricingB
Look up RunAPI pricing for the hailuo model line.
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Model slug. Defaults to the line's primary model. | |
| action | No | Endpoint name. Defaults to the endpoint that offers the model. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, and the description does not disclose any behavioral traits such as rate limits, authentication needs, or side effects. For a lookup tool, it is a safe read operation, but the description does not explicitly state that it is read-only or non-destructive.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence that front-loads the purpose. No unnecessary words or repetition.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has no output schema and only 2 parameters with full schema coverage. The description is minimally adequate but does not explain return values or behavior when parameters are omitted. For a simple lookup, it is functional but lacks depth.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% with both parameters having enum-based descriptions. The description adds minimal meaning beyond the schema by reiterating the 'hailuo' model line, which is already in the enum values. Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description specifies the verb 'look up' and the resource 'RunAPI pricing', scoped to 'the hailuo model line'. It distinguishes clearly from siblings like get_task, image_to_video, and text_to_video, which are about task retrieval and video generation.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance on when to use this tool versus alternatives. It does not provide conditions, exclusions, or mention any prerequisites. The description lacks context for proper tool selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_taskA
Fetch the current status and latest result payload for a hailuo task.
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Asynchronous endpoint the task was created on. | |
| task_id | Yes | Task id returned when the task was created. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Since no annotations are provided, the description carries the full disclosure burden. 'Fetch' clearly indicates a read operation, and it mentions the status and latest result payload, but it does not disclose behavioral traits such as what happens while a task is still processing, whether authentication is required, or any polling behavior. It is not misleading but lacks depth.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence of 12 words, front-loaded with the verb and object. Every word contributes value, with no repetition or fluff, making it optimally concise.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has only 2 parameters, but no output schema and no annotations. The description explains the basic function but does not provide context about the asynchronous nature of the task creation or how the result payload is structured. It is adequate for a simple status fetch but leaves some contextual gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% coverage, with both parameters described ('Task id returned when the task was created' and 'Asynchronous endpoint the task was created on'). The description adds no additional parameter semantics beyond what the schema already provides, so the baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb 'Fetch' and clearly identifies the resource as 'current status and latest result payload for a hailuo task.' It distinguishes itself from siblings like image_to_video and text_to_video, which are task-creation tools, by being the retrieval/status-check tool.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage after a task has been created via image_to_video or text_to_video, but it does not explicitly state this or mention alternatives. There is no 'when to use' or 'when not to use' guidance, so the usage context is implied rather than explicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
image_to_videoA
Create a Hailuo task on RunAPI (image to video). Returns a task id, status, and output URLs.
| Name | Required | Description | Default |
|---|---|---|---|
| wait | No | Poll until the task reaches a terminal status. | |
| model | No | RunAPI model slug for this model line. | |
| prompt | No | ||
| timeout_ms | No | ||
| callback_url | No | ||
| duration_seconds | No | ||
| poll_interval_ms | No | ||
| prompt_optimizer | No | ||
| output_resolution | No | ||
| last_frame_image_url | No | ||
| enable_safety_checker | No | ||
| first_frame_image_url | Yes |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the burden and does disclose that the tool returns a task id, status, and output URLs. However, it does not disclose side effects, asynchronous behavior, cost implications, or failure modes, which is a significant gap for a creation task.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence that states the purpose and return values without any wasted words. It earns its place and is easy to parse.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has 12 parameters, no output schema, and no annotations, this description is too minimal. It does not explain task lifecycle, how wait/polling works, model selection, or output format expectations, leaving the agent with substantial gaps for correct invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is only 17% and the description adds no parameter-level detail. It only hints at the nature of the tool ('image to video'), which indirectly suggests first_frame_image_url, but does not explain wait, model, timeout, callback, resolution, or other parameters.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action: 'Create a Hailuo task on RunAPI (image to video)', specifying both the resource and the mode. It implicitly differentiates from sibling text_to_video by explicitly noting 'image to video'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies use for image-to-video generation, which distinguishes it from text_to_video, but it does not explicitly state when to choose this tool over alternatives or mention any exclusions or prerequisites. Usage context is only lightly implied.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
loginA
Authenticate RunAPI by opening a browser PKCE login flow and saving the API key to ~/.config/runapi/config.json.
| Name | Required | Description | Default |
|---|---|---|---|
| force | No | Re-run browser login when the current credential comes from the local config file. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description discloses that a browser login flow is initiated and that an API key is saved to a specific file path. However, it does not mention side effects like overwriting an existing key or network requirements. With no annotations provided, this is reasonably transparent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, concise sentence that immediately conveys the tool's purpose and method. No wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple authentication tool with one optional parameter and no output schema, the description covers the essential behavior. However, it could be more complete by explaining the 'force' parameter and what happens if already authenticated.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% and the description does not add any extra meaning beyond the schema for the 'force' parameter. The baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('Authenticate') and clearly identifies the resource ('RunAPI') and the authentication method (PKCE login flow). It distinguishes from sibling tools, which are unrelated (e.g., check_pricing, text_to_video).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implicitly suggests the tool is for initial authentication, but it does not provide explicit guidance on when to use it versus alternatives, nor does it mention any prerequisites or when not to use it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
text_to_videoB
Create a Hailuo task on RunAPI (text to video). Returns a task id, status, and output URLs.
| Name | Required | Description | Default |
|---|---|---|---|
| wait | No | Poll until the task reaches a terminal status. | |
| model | No | RunAPI model slug for this model line. | |
| prompt | No | ||
| timeout_ms | No | ||
| callback_url | No | ||
| duration_seconds | No | ||
| poll_interval_ms | No | ||
| prompt_optimizer | No | ||
| enable_safety_checker | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden. It discloses return values (task id, status, output URLs) but fails to mention asynchronous behavior, polling, or blocking semantics, despite parameters like wait, timeout_ms, and poll_interval_ms that indicate such behavior. This is a significant gap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, front-loaded with the action and resource, and contains no fluff. Every word earns its place, making it highly concise and well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 9 parameters, no annotations, no output schema, and low schema description coverage, the description is too minimal. It does not explain the asynchronous task model, key parameters, or how this tool interacts with get_task, leaving the context incomplete for an agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is only 22% (2 of 9 properties have descriptions), so the description must compensate. However, the description adds no parameter-level information, leaving the agent without guidance on key fields like prompt, model, or wait. This is a serious deficiency.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb 'Create' and identifies the resource 'Hailuo task on RunAPI', explicitly noting 'text to video'. It clearly distinguishes from siblings like image_to_video and get_task by stating the action and the return type.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for text-to-video generation but does not explicitly state when to use this tool versus alternatives such as image_to_video, or when to follow up with get_task to retrieve results. No exclusions or alternative guidance is provided.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Each tool targets a distinct function: authentication, video creation from image, video creation from text, task status retrieval, and pricing lookup. No overlap between them.
All names use lowercase with underscores, but the pattern mixes verbs (login, get_task, check_pricing) with noun-phrase descriptors (image_to_video, text_to_video). Overall stylistic consistency is high, though the verb pattern is not uniform.
Five tools is well-scoped for a video generation API wrapper, covering authentication, two creation modes, task polling, and pricing without unnecessary bloat.
The set covers the full lifecycle: create tasks (image/text), poll status, and access pricing. Minor gaps like canceling a task or listing all tasks are absent but not critical for core usage.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
MCP server for Hailuo (MiniMax) AI video generation
Remote MCP server for RunComfy Serverless API (ComfyUI): deployments and async inference.
Focused MCP server for OpenAI image/audio generation (v2.0.0). Wraps endpoints via HAPI CLI.
MCP server for Qwen Image 3 AI image generation
Related MCP Servers
AlicenseAqualityAmaintenanceRunAPI MCP server for the Flux 2 model line. Create tasks, poll their status, and check pricing through a single RunAPI API key.570Apache 2.0- AlicenseAqualityAmaintenanceMCP server for the Gemini Omni model line, enabling task creation (audio, character, text-to-video) and pricing checks through RunAPI.670Apache 2.0
- AlicenseAqualityAmaintenanceRunAPI MCP server for the Imagen 4 model line. Create tasks, poll their status, and check pricing through a single RunAPI API key.565Apache 2.0
- AlicenseAqualityAmaintenanceMCP server for the InfiniteTalk model line, enabling audio-to-video task creation, status polling, and pricing checks via a RunAPI API key.464Apache 2.0
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/runapi-ai/hailuo-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server