Volcengine Video Generation MCP Server
MCP (Model Context Protocol) server for Volcengine (Doubao/豆包) Video Generation API - Seedance models.
Features
- ✅ Text-to-Video Generation - Generate videos from text prompts
- ✅ Image-to-Video Generation - Animate images with multiple modes:
- First frame mode
- First & last frame mode
- Reference images mode (1-4 images)
- ✅ Task Management - Query, list, and cancel video generation tasks
- ✅ Comprehensive Parameters - Full control over resolution, ratio, duration, FPS, etc.
- ✅ MCP Resources - Server status, models list, and API documentation
Installation
Prerequisites
- Python 3.11+
- uv (recommended) or pip
Setup
- Clone the repository:
git clone <repository-url>
cd volcengine-video-mcp
- Install dependencies:
# Using uv (recommended)
uv sync
# Or using pip
pip install -e .
- Configure environment variables:
cp .env.example .env
# Edit .env and add your Volcengine API key
Required environment variables:
ARK_API_KEY: Your Volcengine API key (Get one here)ARK_BASE_URL: (Optional) API base URL, defaults tohttps://ark.cn-beijing.volces.com
Usage
Running the Server
# Using uv
uv run python app/main.py
# Or if installed with pip
python app/main.py
Using with Claude Desktop
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"volcengine-video": {
"command": "uv",
"args": [
"--directory",
"/path/to/volcengine-video-mcp",
"run",
"python",
"app/main.py"
],
"env": {
"ARK_API_KEY": "your_api_key_here"
}
}
}
}
Tools
create_video_task
Create a video generation task.
Example - Text-to-Video:
create_video_task(
model="doubao-seedance-1-0-pro",
prompt="一只可爱的猫在草地上玩耍,阳光明媚",
duration=5,
ratio="16:9",
resolution="1080p"
)
Example - Image-to-Video (First Frame):
create_video_task(
model="doubao-seedance-1-0-pro",
prompt="镜头慢慢推进,展示更多细节",
image_url="https://example.com/image.jpg",
duration=5
)
Example - Image-to-Video (First & Last Frame):
create_video_task(
model="doubao-seedance-1-0-pro",
prompt="从白天到夜晚的过渡",
first_frame_url="https://example.com/day.jpg",
last_frame_url="https://example.com/night.jpg",
duration=8
)
Parameters:
model(required): Model ID (see supported models below)prompt(required): Text description for video generationimage_url: Single image URL for first-frame modefirst_frame_url: First frame image URLlast_frame_url: Last frame image URLreference_image_urls: List of 1-4 reference imagesresolution: 480p/720p/1080pratio: 16:9/4:3/1:1/3:4/9:16/21:9/keep_ratio/adaptiveduration: Video duration in seconds (2-12)frames: Number of frames (29-289, must satisfy 25+4n)fps: Frame rate (16/24)seed: Random seed (-1 to 2^32-1)camera_fixed: Whether to fix camerawatermark: Whether to include watermarkreturn_last_frame: Whether to return last frame imagecallback_url: Callback URL for task completion notification
get_video_task
Query status and result of a video generation task.
get_video_task(task_id="cgt-2025******-****")
list_video_tasks
List video generation tasks with optional filters.
list_video_tasks(
page_num=1,
page_size=10,
status="succeeded" # queued/running/cancelled/succeeded/failed
)
cancel_video_task
Cancel or delete a video generation task.
cancel_video_task(task_id="cgt-2025******-****")
Resources
status://server
Get server status and capabilities.
models://list
Get list of supported models and their capabilities.
docs://api
Get comprehensive API documentation.
Supported Models
Seedance Pro Series
- doubao-seedance-1-0-pro - High quality, supports all generation modes, max 12s
- doubao-seedance-1-0-pro-fast - Faster generation, text-to-video and first-frame mode
Seedance Lite Series
- doubao-seedance-1-0-lite-t2v - Text-to-video, max 10s
- doubao-seedance-1-0-lite-i2v - Image-to-video with reference images support
Important Notes
⚠️ Video URL Expiration: Generated video URLs are valid for 24 hours only. Download promptly!
⚠️ Historical Data: Only last 7 days of task history can be queried.
⚠️ Cancellation Limits: Only queued tasks can be cancelled. Running tasks cannot be cancelled.
⚠️ Async Processing: Video generation is asynchronous. Poll task status for results.
Development
Running Tests
# Run all tests
uv run pytest tests/ -v
# Run with coverage
uv run pytest tests/ --cov=app --cov-report=html
Project Structure
volcengine-video-mcp/
├── app/
│ ├── __init__.py
│ ├── main.py # Main entry point
│ ├── config.py # Configuration management
│ ├── client.py # HTTP client for Volcengine API
│ ├── tools/ # MCP tools
│ │ ├── create_video.py
│ │ ├── get_video.py
│ │ ├── list_videos.py
│ │ └── cancel_video.py
│ └── resources/ # MCP resources
│ └── server_info.py
├── tests/ # Test suite
│ ├── test_config.py
│ └── test_resources.py
├── pyproject.toml # Project configuration
├── .env.example # Environment variables template
└── README.md # This file
Task Status Flow
queued → running → succeeded
↘ failed
queued → cancelled (auto-deleted after 24h)
License
MIT License
Links
Contributing
Contributions are welcome! Please feel free to submit issues and pull requests.
Support
For issues and questions:
- Create an issue in this repository
- Contact Volcengine support for API-related questions
Metadata
Release files for volcengine-video-mcp 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| volcengine_video_mcp-0.1.1.tar.gz | 90.4 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| volcengine_video_mcp-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 105.1 kB
Release files / volcengine_video_mcp-0.1.1.tar.gz
| Download URL | volcengine_video_mcp-0.1.1.tar.gz |
|---|---|
| Size | 90.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fdd44e877934a1b2584d7bca74db7864486054d9f1645c55f29d128cb87fbf71
|
|
BLAKE2b-256 checksum How to use checksums |
b4a1ea06527c4d18637cc323b41e31a30b42e162c17600ea6abafa61589d067d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.2
|
Release files / volcengine_video_mcp-0.1.1-py3-none-any.whl
| Download URL | volcengine_video_mcp-0.1.1-py3-none-any.whl |
|---|---|
| Size | 14.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6f4c67dcd9c64779ca685bca2d8e30c7a91c34efe155287c20d2f4b7be965d7d
|
|
BLAKE2b-256 checksum How to use checksums |
9bc2306f49e3270db38d107b4f8c802210f306b0abfaf1a9f5bbb4affab4aa71
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.8.2
|
Security for volcengine-video-mcp 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.