Wan MCP integration guide
Tongyi Wanxiang MCP supports video generation from text or reference images. Wan 3 can also combine frames and reference materials through a unified tool. You can check the inputs, durations, and resolutions supported by each model in the client.
¶ Connect to the Hosted Service
In a client that supports remote MCP, add a Streamable HTTP server at https://wan.mcp.acedata.cloud/mcp. When using OAuth, choose to sign in to AI 聚合 and confirm authorization in your browser.
| Client | How to connect |
|---|---|
| Claude / Claude Desktop | Add a custom connector under “Customize → Connectors”, enter the hosted URL, and sign in. |
| Claude Code | Run claude mcp add --transport http --scope user wan https://wan.mcp.acedata.cloud/mcp, open /mcp in the session, select the server, and complete authorization. |
| Cursor | Add an HTTP server in the MCP settings, enter the hosted URL, and follow the prompts to sign in when connecting. |
| VS Code | Run MCP: Add Server from the Command Palette, select HTTP, and enter the hosted URL. You can then use MCP: List Servers to check the status. |
In Codex CLI, run the following command. When finished, enter /mcp in the session to view the server.
codex mcp add wan --url https://wan.mcp.acedata.cloud/mcp
codex mcp login wan
To use fixed credentials, add the request header Authorization: Bearer <应用 API Key> in the client's private settings and confirm that the application is authorized to call the selected API. You can create or copy a key in the console under “Applications → General Applications → Key Management”. Application Console
¶ Use an Application Key with Gemini CLI and OpenCode
First, save the application API key as the client environment variable ACEDATACLOUD_API_TOKEN. The following commands use macOS or Linux shell quoting.
| Client | How to connect |
|---|---|
| Gemini CLI | Run gemini mcp add --scope user --transport http wan https://wan.mcp.acedata.cloud/mcp --header 'Authorization: Bearer ${ACEDATACLOUD_API_TOKEN}' and check with gemini mcp list. |
| OpenCode 2.x | Run opencode mcp add wan --global --url https://wan.mcp.acedata.cloud/mcp --header 'Authorization=Bearer {env:ACEDATACLOUD_API_TOKEN}', then run opencode reload and opencode mcp list. |
In OpenCode 1.x, configure type: "remote", the hosted URL, and oauth: false for this service in the mcp object of your personal opencode.json, and set the request header Authorization to Bearer {env:ACEDATACLOUD_API_TOKEN}. OpenCode 1.x configuration
¶ Local stdio integration
After installing uv, a local client can launch the MCP process using standard input and output. The process sends Wan requests to AI 聚合.
Claude Desktop users can open the local MCP configuration from the developer settings, merge in the server entry below, replace the placeholder in their personal configuration with the application API key itself, and restart the client. Clients that support private environment variables can also inject ACEDATACLOUD_API_TOKEN from a credential manager.
{
"mcpServers": {
"wan": {
"command": "uvx",
"args": [
"mcp-wan"
],
"env": {
"ACEDATACLOUD_API_TOKEN": "YOUR_API_KEY"
}
}
}
}
¶ Initial verification
After connecting, tell the assistant: "Please call only wan_list_models, wan_list_actions, and wan_list_resolutions to list the models and resolutions available for image-to-video generation."
¶ Tools and usage examples
| Operation | Tools and parameters |
|---|---|
| Text-to-video | wan_generate_video uses prompt to describe the shot and motion. |
| Reference-image-to-video | wan_generate_video_from_image accepts image_url. Specify duration, resolution, or audio parameters within the selected model's supported range. |
| Wan 3 multimodal generation | wan_generate_video_all_in_one accepts text and structured media, which can provide frames or reference materials. |
| Query results | wan_get_task uses a single task_id; wan_get_tasks_batch accepts a batch of task IDs. |
For example: "Make the waves in this coastal photo move toward the shore while keeping the camera steady." Use wan_generate_video_from_image, put the photo URL in image_url, and write the motion requirements in prompt. If a task ID is returned, save it and use wan_get_task to query the original task for the final video.
See the API documentation for parameter and result formats: Video generation, Task query.

