Hailuo MCP Integration Guide
Hailuo MCP can generate videos from text descriptions or bring a reference image to life. Once connected, the assistant can submit generation requests, record task IDs, and provide video URLs when the tasks are complete.
¶ Connect to the Hosted Service
Select remote MCP (Streamable HTTP) in the client and enter https://hailuo.mcp.acedata.cloud/mcp as the server address. After selecting OAuth, follow the browser prompts to log in to Ace Data Cloud and authorize access.
| Client | How to connect |
|---|---|
| Claude / Claude Desktop | Add a custom connector under “Customize → Connectors,” paste the server address, and log in. |
| Claude Code | Run claude mcp add --transport http --scope user hailuo https://hailuo.mcp.acedata.cloud/mcp, open /mcp in the session, select the server, and complete authorization. |
| Codex CLI | Run codex mcp add hailuo --url https://hailuo.mcp.acedata.cloud/mcp, then run codex mcp login hailuo. |
| Cursor | Create an HTTP server in MCP settings, enter the address, and log in as prompted when connecting. |
| VS Code | Run MCP: Add Server from the command palette, select HTTP and enter the address, then use MCP: List Servers to check the status. |
If using an application API Key, select a general-purpose application or one with permissions for Hailuo video generation and task queries on the application management page, and check the allowed APIs and balance. Set the request header to Authorization: Bearer <application API Key> in the client’s private credentials settings. Applications and API Keys
¶ Use an Application Key with Gemini CLI and OpenCode
First, set the environment variable ACEDATACLOUD_API_TOKEN to the application API Key in the terminal where you launch the client. The following commands use macOS or Linux shell quoting and save the variable reference.
| Client | How to connect |
|---|---|
| Gemini CLI | Run gemini mcp add --scope user --transport http hailuo https://hailuo.mcp.acedata.cloud/mcp --header 'Authorization: Bearer ${ACEDATACLOUD_API_TOKEN}', then check with gemini mcp list. |
| OpenCode 2.x | Run opencode mcp add hailuo --global --url https://hailuo.mcp.acedata.cloud/mcp --header 'Authorization=Bearer {env:ACEDATACLOUD_API_TOKEN}', then run opencode reload and opencode mcp list. |
For OpenCode 1.x, add a service named hailuo to the mcp object in your personal opencode.json, set type to remote, url to the address above, oauth to false, and headers.Authorization to Bearer {env:ACEDATACLOUD_API_TOKEN}. OpenCode 1.x configuration
¶ Connect Locally via stdio
Install uv, open the local MCP configuration in Claude Desktop’s developer settings, and merge the following entry into the user configuration. Replace the placeholder with the application API Key, save, and restart the client. Other clients that support stdio can also run the uvx mcp-hailuo command and pass the key to the process as an environment variable.
{
"mcpServers": {
"hailuo": {
"command": "uvx",
"args": [
"mcp-hailuo"
],
"env": {
"ACEDATACLOUD_API_TOKEN": "YOUR_API_KEY"
}
}
}
}
The local process still calls the Ace Data Cloud API. Keep the key in your personal client configuration or credential manager. mcp-hailuo package
¶ Verify the Connection and Available Tools
Open the client’s tool list, find Hailuo, and first ask the assistant to call hailuo_list_models and list which models support text-to-video and which require a first-frame image. This query can check whether the client has loaded the tools without submitting a generation request.
| Purpose | Tools | Usage |
|---|---|---|
| Choose models and actions | hailuo_list_models, hailuo_list_actions |
View available models, actions, and input requirements. |
| Generate from text | hailuo_generate_video |
Pass in prompt. The text example can use the default model. |
| Bring a reference image to life | hailuo_generate_video_from_image |
Pass in an accessible first_image_url and a prompt describing the motion. |
| Query videos | hailuo_get_task, hailuo_get_tasks_batch |
Use task_id or task_ids, respectively. |
¶ Usage Example
Enter the following for the assistant in the client: “Use Hailuo to generate a video of a street after rain, with a fixed camera and puddles reflecting illuminated streetlights. Submit it only once, record the task ID, and give me the video link when it is complete.”
After receiving the task_id, ask the assistant to use hailuo_get_task to query the same task. If the status is still processing, keep the ID and continue querying. If it fails or is canceled, first read the returned reason. When using a reference image, provide the image’s accessible URL to the image-to-video tool and describe how the camera or subject moves in the prompt.
Before making an actual call, you can check current pricing and availability on the service page. Hailuo service · Video generation API · Task query API
