Connect to the Hosted Service
In your client, select remote MCP (Streamable HTTP) and enterhttps://hailuo.mcp.acedata.cloud/mcp as the server URL. Select OAuth, then follow the browser prompts to sign in to Ace Data Cloud and authorize access.
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. In the client’s private credential settings, set the request header to
Authorization: Bearer <应用 API Key>. Applications and API Keys
Use an Application Key with Gemini CLI and OpenCode
First, set the environment variableACEDATACLOUD_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 a reference to the variable.
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 entries into the user configuration. Replace the placeholder with your application’s API key, save, and restart the client. Other clients that support stdio can also run theuvx mcp-hailuo command and pass the key to the process as an environment variable.
Verify the connection and available tools
Open the client’s tool list and find Hailuo. First, ask the assistant to callhailuo_list_models and list which models support text-to-video generation and which require a first-frame image. This query checks whether the client has loaded the tools without submitting a generation request.
Example invocation
In the client, enter the following prompt for the assistant: “Use Hailuo to generate a video of a street after the rain, with a fixed camera and puddles reflecting illuminated streetlights. Submit the request only once, record the task ID, and give me the video link when it is complete.” After receivingtask_id, ask the assistant to query the same task using hailuo_get_task. If it is still processing, keep the ID and continue querying. If it fails or is canceled, first read the reason returned. When using a reference image, provide its accessible URL to the image-to-video tool and describe how the camera or subject should move in the prompt.
Before making a request, check the service page for current pricing and availability. Hailuo service · Video generation API · Task query API
