抖音无水印视频文本提取

一个基于Model Context Protocol (MCP)的服务器,可以从抖音分享链接下载无水印视频,提取音频并转换为文本。

entertainment-and-media

5.0k 查看 · 2026-07-07 更新

简介

一个基于Model Context Protocol (MCP)的服务器,可以从抖音分享链接下载无水印视频,提取音频并转换为文本。

简介

一个基于Model Context Protocol (MCP)的服务器,可以从抖音分享链接下载无水印视频,提取音频并转换为文本。

TikTok Watermark-Free Video Text Extraction MCP Server

PyPI version Python version

A server based on the Model Context Protocol (MCP) that can download watermark-free videos from TikTok share links, extract audio, and convert it to text.

Features

  • 🎵 Obtain watermark-free videos from TikTok share links
  • 🎧 Automatically extract video audio
  • 📝 Use AI speech recognition to extract text content
  • 🧹 Automatically clean up intermediate temporary files
  • 🔧 Support for custom API configuration, with SiliconFlow API as the default

Installation

Using uvx (Recommended)

bash uvx douyin-mcp-server

Using pip

bash pip install douyin-mcp-server

Usage

1. Start the Server

bash douyin-mcp-server

2. Configure in Claude Desktop

Add the following to your claude_desktop_config.json:

json { "mcpServers": { "douyin-mcp": { "command": "uvx", "args": ["douyin-mcp-server"], "env": { "DOUYIN_API_KEY": "your-api-key-here" } } } }

3. Use MCP Tools

Get Watermark-Free Download Link

Use the get_douyin_download_link tool:

python

Use in Claude without an API key

get_douyin_download_link("https://v.douyin.com/xxx")

Extract Video Text

Use the extract_douyin_text tool (requires setting the environment variable DOUYIN_API_KEY):

python

Use in Claude

extract_douyin_text("https://v.douyin.com/xxx")

Parse Video Information

Use the parse_douyin_video_info tool:

python parse_douyin_video_info("https://v.douyin.com/xxx")

API Configuration

Default Configuration

The server uses SiliconFlow API by default:

  • API URL: https://api.siliconflow.cn/v1/audio/transcriptions
  • Model: FunAudioLLM/SenseVoiceSmall

Custom Configuration

You can customize the API configuration:

python extract_douyin_text( share_link="your-douyin-link", api_base_url="https://your-custom-api.com/transcriptions", model="your-custom-model" )

Environment Variable Configuration

Set the environment variables in the Claude Desktop configuration file:

json { "mcpServers": { "douyin-mcp": { "command": "uvx", "args": ["douyin-mcp-server"], "env": { "DOUYIN_API_KEY": "sk-your-api-key-here" } } } }

Tool Description

get_douyin_download_link

Obtains the watermark-free download link of a TikTok video without needing an API key.

Parameters:

  • share_link: TikTok share link or text containing the link

Returns:

  • JSON-formatted data containing the download link and video information

extract_douyin_text

A complete text extraction tool that performs the following steps:

  1. Parse the TikTok share link
  2. Download the watermark-free video
  3. Extract the audio
  4. Convert the audio to text
  5. Clean up temporary files

Parameters:

  • share_link: TikTok share link or text containing the link
  • api_base_url: Base URL of the API (optional)
  • model: Speech recognition model (optional)

Environment Variables:

  • DOUYIN_API_KEY: Speech recognition API key (required)

parse_douyin_video_info

Parses only the basic video information without downloading the video.

Parameters:

  • share_link: TikTok share link

Resource Access

  • douyin://video/{video_id}: Get detailed information via the video ID

Dependencies

  • Python 3.8+
  • ffmpeg (ffmpeg must be installed on the system)
  • requests
  • ffmpeg-python
  • tqdm
  • mcp

Install ffmpeg

macOS

bash brew install ffmpeg

Ubuntu/Debian

bash sudo apt update sudo apt install ffmpeg

Windows

Download and install ffmpeg

Development

Local Development

bash git clone https://github.com/yzfly/douyin-mcp-server.git cd douyin-mcp-server pip install -e .

Run Tests

bash python -m douyin_mcp_server.server

Notes

  • Ensure that ffmpeg is installed on your system- An effective speech recognition API key DOUYIN_API_KEY needs to be set in the environment variables
  • The function to obtain download links does not require an API key
  • Intermediate files will be automatically cleaned up and will not occupy disk space
  • Supports most Douyin video formats

⚠️ Disclaimer

  • The use of this project by the user is at the user's own discretion and risk. The author is not responsible for any loss, liability, or risk arising from the user's use of this project.
  • The code and functionality provided by the author of this project are developed based on existing knowledge and technology. The author endeavors to ensure the correctness and security of the code according to the current level of technology but does not guarantee that the code is completely free of errors or defects.
  • All third-party libraries, plugins, or services relied upon by this project follow their original open-source or commercial licenses. Users must consult and comply with the relevant agreements themselves; the author assumes no responsibility for the stability, security, or compliance of third-party components.
  • When using the code and functions of this project, users must research the relevant laws and regulations on their own and ensure that their usage is legal and compliant. Any legal liabilities and risks resulting from violations of laws and regulations shall be borne by the user.
  • Users must not use this tool to engage in any acts that infringe intellectual property rights, including but not limited to unauthorized downloading, dissemination of copyrighted content. The developer does not participate in, support, or endorse the acquisition or distribution of any illegal content.
  • This project does not assume responsibility for the compliance of data collection, storage, transmission, and other processing activities carried out by the user. Users should comply with relevant laws and regulations on their own to ensure that their processing actions are legal and proper; any legal liabilities resulting from non-compliant operations shall be borne by the user.
  • Under no circumstances shall the user associate the author, contributors, or other related parties of this project with the user's usage behavior, or hold them responsible for any losses or damages arising from the user's use of this project.
  • Any secondary development, modification, or compilation based on this project is unrelated to the original author, who does not bear any responsibility related to secondary development activities or their results. The user shall bear full responsibility for any situations that may arise from secondary development.
  • This project does not grant the user any patent license; if the use of this project leads to patent disputes or infringement, the user bears all risks and responsibilities. Without written authorization from the author or right holder, the user may not use this project for any commercial promotion, publicity, or re-licensing.
  • The author reserves the right to terminate service to any user who violates this statement at any time and may require the destruction of any obtained code and derivative works.
  • The author reserves the right to update this statement without prior notice, and continued use by the user is deemed acceptance of the revised terms.

Before using the code and functions of this project, please carefully consider and accept the above disclaimer. If you have any questions or do not agree with the above statement, please do not use the code and functions of this project. If you use the code and functions of this project, it is considered that you fully understand and accept the above disclaimer and voluntarily bear all risks and consequences of using this project.

License

MIT License

Author

Contributions

Feel free to submit Issues and Pull Requests!

Changelog

v1.0.0

  • Initial version
  • Supports Douyin video text extraction
  • Supports obtaining watermark-free video download links
  • Reads API key from environment variables
  • Automatically cleans up temporary files
  • Supports custom API configuration

工具列表

  • get_douyin_download_link: 获取抖音视频的无水印下载链接

参数:

  • share_link: 抖音分享链接或包含链接的文本

返回:

  • 包含下载链接和视频信息的JSON字符串

  • extract_douyin_text: 从抖音分享链接提取视频中的文本内容

参数:

  • share_link: 抖音分享链接或包含链接的文本
  • api_base_url: API基础URL(可选,默认使用SiliconFlow)
  • model: 语音识别模型(可选,默认使用SenseVoiceSmall)

返回:

  • 提取的文本内容

注意: 需要设置环境变量 DOUYIN_API_KEY

  • parse_douyin_video_info: 解析抖音分享链接,获取视频基本信息

参数:

  • share_link: 抖音分享链接或包含链接的文本

返回:

  • 视频信息(JSON格式字符串)

服务配置

[{'mcpServers': {'douyin-mcp': {'args': ['douyin-mcp-server'], 'command': 'uvx', 'env': {'DOUYIN_API_KEY': 'your-api-key-here'}}}}, {'mcpServers': {'douyin-mcp': {'args': ['douyin-mcp-server'], 'command': 'uvx', 'env': {'DOUYIN_API_KEY': 'sk-your-api-key-here'}}}}]

来源