Tongyi Wanxiang (Wan) MCP Integration Guide
Tongyi Wanxiang MCP supports generating videos from text or reference images. Wan 3 can also combine frames and reference materials through a unified tool. The inputs, durations, and resolutions for different models can be queried in the client.
¶ Connect to the Hosted Service
Add a Streamable HTTP server in a client that supports remote MCP, using the address https://wan.mcp.acedata.cloud/mcp. When using OAuth, choose to sign in to 零壹AI and confirm authorization in the browser.
| Client | How to connect |
|---|---|
| Claude / Claude Desktop | Add a custom connector under “Customize → Connectors”, enter the hosted address, 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 | Create an HTTP server in MCP settings, enter the hosted address, 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 address, then use MCP: List Servers to confirm the status. |
In Codex CLI, you can run the following commands, then 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 <application 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 in 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. |
For OpenCode 1.x, set type: "remote", the hosted URL, and oauth: false for this service in the mcp object of your personal opencode.json, and set the Authorization request header to Bearer {env:ACEDATACLOUD_API_TOKEN}. OpenCode 1.x Configuration
¶ Local stdio Integration
After installing uv, local clients can use standard input and output to start the MCP process, which sends Wan requests to 零壹AI.
Claude Desktop users can open the local MCP configuration from the developer settings, merge the server entry below, replace the placeholder with the application API Key itself in their personal configuration, and then 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, say to 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 generation | wan_generate_video uses prompt to describe the shot and action. |
| Reference-image-to-video generation | wan_generate_video_from_image accepts image_url. Enter duration, resolution, or audio parameters within the range supported by the selected model. |
| Wan 3 multimodal generation | wan_generate_video_all_in_one accepts text and structured media, and can be provided with frames or reference materials. |
| Query results | wan_get_task uses a single task_id, while wan_get_tasks_batch accepts a batch of task IDs. |
For example, “Make the waves in this coastal photo move toward the shore, with the camera remaining steady.” Use wan_generate_video_from_image, put the photo address 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 final video by the original task.
For parameters and result formats, please refer to the API documentation. Video Generation, Task Query.

