- Home
- MCP servers
- Tongyi Wanxiang
Tongyi Wanxiang
- typescript
6
GitHub Stars
typescript
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"suixinlei-tongyi-wanx-mcp-server": {
"command": "npx",
"args": [
"-y",
"tongyi-wanx-mcp-server@latest"
],
"env": {
"DASHSCOPE_API_KEY": "<YOUR_TONGYI_API_KEY>"
}
}
}
}You run a TypeScript-based MCP server that exposes Alibaba Cloud Tongyi Wanxiang’s Text-to-Image and Text-to-Video generation capabilities via the Model Context Protocol. It lets your large language models call image and video generation APIs directly through MCP, enabling asynchronous task handling and seamless integration with supported MCP clients.
How to use
You interact with the Tongyi Wanxiang MCP server by sending MCP-style requests to the server’s exposed tools. Start image generation with the WANX Text-to-Image tool, watch for an assigned task_id, and poll or retrieve results later. Start video generation with the WANX Text-to-Video tool, retrieve its task_id, and obtain the final video URL when ready. All tasks run asynchronously, so you don’t block your LLM while waiting for results.
Key tools exposed by the server include image generation and video generation endpoints. You supply prompts and optional negative prompts for images, or a prompt for video generation, then request results using the provided task_id. The system handles long-running tasks with configurable polling intervals and retry behavior to ensure you eventually receive results.
How to install
Prerequisites: you need Node.js >= 16.x and npm >= 8.x or pnpm.
Install dependencies for the MCP server project, then build and run. Use the commands that match your preferred package manager.
Additional sections
Configuration details, security considerations, examples, troubleshooting notes, and practical tips are provided to help you tailor the Tongyi Wanxiang MCP server to your environment. You can adjust how often the system polls for task status, how many retries are allowed, and which default model is used for image and video generation. You also learn how to structure and interpret results, handle potential failures, and ensure smooth operation in production.
Available tools
wanx-t2i-image-generation
Starts an image generation task using a text prompt and optional parameters. Returns a task_id to poll for results.
wanx-t2i-image-generation-result
Fetches the result of an image generation task by task_id, returning the generated image URL.
wanx-t2v-video-generation
Initiates a video generation task with a text prompt. Returns a task_id to poll for the final video URL.
wanx-t2v-video-generation-result
Retrieves the final video result by task_id, including the video URL.