Content
# Douyin MCP Server
An MCP server for AI agents that need to parse Douyin share links and extract useful video metadata.
It focuses on practical short-video workflows: collecting assets, understanding video metadata, and helping agents work with Douyin/TikTok-style content links.
## What It Does
- Parses Douyin short share links
- Resolves redirected video pages
- Extracts title, author, duration, cover image, music, and video URL
- Attempts to return watermark-free video URLs when available
- Provides TikTok trending retrieval support
## Tools
| Tool | Description |
| --- | --- |
| `parse_douyin` | Parse a Douyin share link and extract video info and media URLs |
| `get_tiktok_trending` | Get a global TikTok trending video list |
## Good For
- Short-video asset collection
- AI-assisted video research
- Content repurposing workflows
- Creator research and reference gathering
- Agent workflows that need structured video metadata
## Installation
```bash
pip install git+https://github.com/521w/douyin-mcp.git
```
Or install from source:
```bash
git clone https://github.com/521w/douyin-mcp.git
cd douyin-mcp
pip install -e .
```
## MCP Configuration
```json
{
"mcpServers": {
"douyin": {
"command": "python3",
"args": ["-m", "douyin_mcp.server"]
}
}
}
```
## Example
Input:
```json
{
"share_url": "https://v.douyin.com/xxxxx/"
}
```
Output includes:
```text
Title
Author
Duration
Cover image URL
Video URL
Music URL
```
## Example Agent Tasks
- "Parse this Douyin link and summarize the video metadata."
- "Extract cover, music, and video URL from this share link."
- "Collect references from a batch of short-video links."
- "Help me build a content inspiration board from Douyin links."
## Why This Server
- **Agent-ready**: turns messy share links into structured metadata
- **Practical**: useful for creator workflows and content operations
- **Small and focused**: one job, easy to plug into a larger agent pipeline
- **Productizable**: can become part of a content research, clipping, or remix workflow
## Requirements
- Python >= 3.9
- `mcp >= 1.0.0`
- `requests >= 2.28.0`
## Notes
Douyin and TikTok endpoints can change or block automated access. This server should be treated as a practical integration layer that may require maintenance when platforms update their behavior.
Respect platform rules and copyright when downloading or reusing media.
## Verified Status
Verified on Termux/Android with Python 3.13:
```bash
python -m venv .venv
. .venv/bin/activate
pip install -e .
douyin-mcp
```
MCP initialization and tool listing were verified successfully. `get_tiktok_trending` returned a handled platform/network failure when TikTok reset the connection, so live endpoint availability may vary.
## License
MIT