Douyin MCP
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Douyin MCPsearch for "Chinese food" videos sorted by likes"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Douyin MCP
抖音 MCP (Model Context Protocol) 服务器,为 AI 助手提供访问抖音数据的能力。
项目简介
Douyin MCP 是一个基于 MCP 协议的服务器,允许 AI 助手(如 Claude)直接与抖音平台交互。通过本项目,AI 可以搜索视频、获取视频详情、读取评论、查看用户信息等。
核心特性
本地签名:内置 JavaScript 签名算法,通过 V8 引擎(py_mini_racer)本地生成
a_bogus签名,无需外部签名服务完整功能:提供 8 个工具覆盖抖音主要数据获取场景
简单配置:仅需提供抖音 Cookies 即可使用
类型安全:完整的 Python 类型注解和数据模型
Related MCP server: undoom-douyin-data-analysis
功能列表
工具 | 功能描述 | 参数 |
| 检查登录状态 | 无 |
| 按关键词搜索视频 | keyword, offset, count, sort_type, publish_time |
| 获取视频详情 | aweme_id |
| 获取视频评论 | aweme_id, cursor, count |
| 获取评论回复 | comment_id, cursor, count |
| 获取用户信息 | sec_user_id |
| 获取用户发布的视频 | sec_user_id, max_cursor, count |
| 获取推荐视频流 | tag, count, refresh_index |
环境要求
Python 3.14+
uv 包管理器(推荐)
有效的抖音登录 Cookies
安装
# 克隆仓库
git clone https://github.com/yourusername/douyinmcp.git
cd douyinmcp
# 安装依赖
uv sync配置
Cookie 配置
本项目使用 cookies.txt 文件配置 Cookie,不使用环境变量(避免特殊字符导致的问题)。
配置步骤:
在项目根目录创建
cookies.txt文件将抖音 Cookie 字符串粘贴到文件中(单行,无需引号)
# 创建 cookies.txt 文件
touch cookies.txt
# 编辑文件,粘贴你的 Cookie
vim cookies.txt获取 Cookies
打开浏览器,访问 https://www.douyin.com
登录你的抖音账号
按 F12 打开开发者工具
进入 Application → Cookies → https://www.douyin.com
复制所有 Cookie(格式:
key1=value1; key2=value2; ...)粘贴到
cookies.txt文件中
或者使用浏览器插件(如 EditThisCookie)导出 Cookie 字符串。
cookies.txt 文件示例:
sessionid=abc123; ttwid=xxx; passport_csrf_token=yyy; ...注意:Cookie 必须是单行文本,不要包含换行符。
使用方法
直接运行
# 确保 cookies.txt 文件存在
uv run python main.py配置 Claude Desktop
在 claude_desktop_config.json 中添加:
{
"mcpServers": {
"douyin": {
"command": "uv",
"args": ["run", "--directory", "/path/to/douyinmcp", "python", "main.py"]
}
}
}注意:无需配置环境变量,Cookie 从项目根目录的
cookies.txt文件读取。
配置 Claude Code
在 .mcp.json 中添加 MCP 服务器配置:
{
"mcpServers": {
"douyin": {
"command": "uv",
"args": ["run", "--directory", "/path/to/douyinmcp", "python", "main.py"]
}
}
}工具详细说明
1. check_login_status - 检查登录状态
检查当前 Cookie 是否有效登录。
# 返回示例
{"logged_in": True}2. search_videos - 搜索视频
按关键词搜索抖音视频。
参数 | 类型 | 说明 | 默认值 |
keyword | str | 搜索关键词 | 必填 |
offset | int | 分页偏移 | 0 |
count | int | 每页数量 | 10 |
search_channel | str | 搜索类型:general/video/user/live | general |
sort_type | int | 排序:0-综合, 1-最多点赞, 2-最新 | 0 |
publish_time | int | 时间筛选:0-不限, 1-1天内, 7-1周内, 180-半年内 | 0 |
# 搜索美食视频,按点赞数排序
search_videos(keyword="美食", sort_type=1, count=20)3. get_video_detail - 获取视频详情
通过视频 ID 获取视频详细信息。
参数 | 类型 | 说明 |
aweme_id | str | 视频 ID |
# 获取指定视频详情
get_video_detail(aweme_id="7590719110745525567")
# 返回信息包括:
# - 标题、描述
# - 点赞数、评论数、分享数、收藏数
# - 作者信息
# - 视频封面、下载地址4. get_video_comments - 获取视频评论
获取视频的评论列表。
参数 | 类型 | 说明 | 默认值 |
aweme_id | str | 视频 ID | 必填 |
cursor | int | 分页游标 | 0 |
count | int | 每页数量 | 20 |
# 获取视频评论
get_video_comments(aweme_id="7590719110745525567", count=50)5. get_sub_comments - 获取评论回复
获取某条评论的回复列表。
参数 | 类型 | 说明 | 默认值 |
comment_id | str | 评论 ID | 必填 |
cursor | int | 分页游标 | 0 |
count | int | 每页数量 | 20 |
# 获取评论的回复
get_sub_comments(comment_id="7590992888545395462")6. get_user_info - 获取用户信息
获取用户的个人资料。
参数 | 类型 | 说明 |
sec_user_id | str | 用户安全 ID(以 MS4wLjABAAAA 开头) |
# 获取用户信息
get_user_info(sec_user_id="MS4wLjABAAAAG35eRUkDUlhVctlBVKNxjbbqw4Bu...")
# 返回信息包括:
# - 昵称、签名、头像
# - 粉丝数、关注数
# - 获赞数、作品数
# - IP 属地7. get_user_posts - 获取用户作品
获取用户发布的视频列表。
参数 | 类型 | 说明 | 默认值 |
sec_user_id | str | 用户安全 ID | 必填 |
max_cursor | str | 分页游标 | "0" |
count | int | 每页数量 | 18 |
# 获取用户的视频作品
get_user_posts(sec_user_id="MS4wLjABAAAA...", count=30)8. get_homefeed - 获取推荐视频
获取首页推荐视频流。
参数 | 类型 | 说明 | 默认值 |
tag | str | 内容分类 | "all" |
count | int | 获取数量 | 20 |
refresh_index | int | 刷新索引 | 0 |
支持的分类标签:
all- 全部knowledge- 知识sports- 体育auto- 汽车anime- 二次元game- 游戏movie- 影视life_vlog- 生活travel- 旅行mini_drama- 短剧food- 美食agriculture- 三农music- 音乐animal- 萌宠parenting- 亲子fashion- 时尚
# 获取游戏类推荐视频
get_homefeed(tag="game", count=20)项目结构
douyinmcp/
├── src/
│ ├── __init__.py # 包初始化
│ ├── models.py # 数据模型定义
│ ├── token_manager.py # Token 生成(msToken, webid, verifyFp)
│ ├── sign.py # 本地签名模块(V8 引擎)
│ ├── douyin.js # 签名算法(JavaScript)
│ ├── client.py # API 客户端实现
│ └── server.py # MCP 服务器及工具定义
├── tests/
│ ├── __init__.py
│ └── test_all.py # 综合测试套件
├── doc/
│ └── API.md # API 接口文档
├── main.py # 程序入口
├── pyproject.toml # 项目配置
├── cookies.txt # Cookie 文件(需自行创建)
├── CHANGELOG # 变更日志
└── README.md # 本文档测试
运行综合测试验证所有功能:
# 确保 cookies.txt 存在
uv run python tests/test_all.py测试输出示例:
============================================================
Douyin MCP - Comprehensive Test Suite
============================================================
Testing check_login_status...
✓ check_login_status: logged_in=True
Testing search_videos...
✓ search_videos: Found 5 results
Testing get_video_detail...
✓ get_video_detail: Got video: 《给大家讲讲...》
Testing get_video_comments...
✓ get_video_comments: Got 10 comments
Testing get_sub_comments...
✓ get_sub_comments: Got 1 replies
Testing get_user_info...
✓ get_user_info: Got user: 大阳
Testing get_user_posts...
✓ get_user_posts: Got 10 posts
Testing get_homefeed...
✓ get_homefeed: Got 2 videos from feed
Results: 8/8 tests passed
============================================================技术实现
签名机制
抖音 Web API 使用 a_bogus 参数进行请求签名验证。本项目通过以下方式实现本地签名:
使用
py_mini_racer库提供 V8 JavaScript 引擎加载
douyin.js签名算法构建完整的浏览器环境 polyfills(document, navigator, window 等)
调用
get_abogus()函数生成签名
Token 生成
msToken: 128 字符的验证 Token,支持从字节跳动 API 获取或本地生成
webid: 19 位数字 ID,支持从服务器获取或本地 UUID 算法生成
verifyFp / s_v_web_id: 指纹验证参数,使用 Base36 时间戳 + UUID 格式
请求参数
每个请求包含 31 个通用参数,模拟真实浏览器环境:
设备信息(platform, cpu_core_num, device_memory)
浏览器信息(browser_name, browser_version, engine_name)
屏幕信息(screen_width, screen_height)
网络信息(downlink, effective_type, round_trip_time)
常见问题
Q: Cookie 多久需要更新?
A: 抖音 Cookie 通常有效期较长,但如果遇到 logged_in=False 或请求失败,需要重新获取 Cookie 并更新 cookies.txt 文件。
Q: 为什么不使用环境变量配置 Cookie?
A: 抖音 Cookie 包含大量特殊字符(如 =、;、% 等),在环境变量中配置容易出现解析问题。使用文件配置更可靠。
Q: cookies.txt 文件放在哪里?
A: 放在项目根目录(与 main.py 同级目录)。
Q: 为什么 get_homefeed 返回的视频数量较少?
A: 推荐接口返回的数量取决于抖音服务器,可能需要多次调用并增加 refresh_index 来获取更多内容。
Q: 遇到签名错误怎么办?
A: 签名模块会自动重置 JavaScript 上下文。如果持续失败,请检查 douyin.js 文件是否完整。
Q: 支持哪些 Python 版本?
A: 项目使用 Python 3.14+ 特性,建议使用最新版本。
API 文档
详细的 API 接口文档请参阅 doc/API.md。
依赖项
fastmcp- MCP 服务器框架httpx- 异步 HTTP 客户端py-mini-racer- V8 JavaScript 引擎
许可证
MIT License
免责声明
本项目仅供学习和研究使用。使用本项目获取的数据应遵守抖音平台的服务条款和相关法律法规。请勿将本项目用于任何商业用途或违法行为。
Available Tools
8 toolscheck_login_statusA
Check if the current Douyin session is logged in.
Returns: dict with 'logged_in' boolean status
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the full burden and does well: it specifies the return shape (dict with 'logged_in' boolean), which clearly tells the agent what to expect. The verb 'check' implies a read-only, non-destructive operation. It does not mention edge cases or error behavior, but for a simple session status check this level of disclosure is adequate.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two short sentences: the first states the core purpose, and the second defines the return format. It is front-loaded, free of filler, and every word serves a purpose.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with no parameters and an output schema already present, the description fully covers what the tool does and what it returns. The simplicity of the operation means nothing important is missing. The distinction from sibling tools is obvious from the purpose statement.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema is an empty object, meaning the tool accepts zero parameters. The baseline for zero parameters is 4, and the description correctly avoids mentioning any parameters because there are none. No additional semantic information is needed.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific action (check), a specific resource (current Douyin session login status), and is clearly distinct from sibling tools that retrieve content or user data. An agent can immediately understand what this tool does and that it is an authentication status check.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description gives no explicit guidance on when to use this tool versus an alternative. However, the tool's purpose is unique among siblings and the intended usage (checking whether the session is logged in) is implied by the description. There are no alternatives for this function, so explicit routing is unnecessary.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_homefeedB
Get recommended videos from Douyin home feed.
Args: tag: Content category - one of: "all", "knowledge", "sports", "auto", "anime", "game", "movie", "life_vlog", "travel", "mini_drama", "food", "agriculture", "music", "animal", "parenting", "fashion" count: Number of videos to return (default 20) refresh_index: Refresh index for pagination (default 0)
Returns: dict containing recommended video list
| Name | Required | Description | Default |
|---|---|---|---|
| tag | No | all | |
| count | No | ||
| refresh_index | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It does add that refresh_index is for pagination and states the return type, but it omits critical context such as whether authentication is required, how recommendations are generated, or any rate-limit constraints. For a feed tool, login dependencies are especially relevant.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The Args/Returns structure is clear and front-loaded, with no filler sentences. The long tag list is necessary but could arguably be placed as an enum in the schema; repeating default values that already exist in the schema is minor redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a tool with 3 optional parameters and an output schema, the invocation details are mostly covered. However, the definition lacks usage context, such as when to prefer this over search_videos, and does not mention whether login is required, which is a meaningful gap given the sibling check_login_status tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, and the description fully compensates. It enumerates all 16 allowed tag values, clarifies count as the number of videos, and explains refresh_index as the pagination cursor. Without this, the parameters would be opaque.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The opening sentence 'Get recommended videos from Douyin home feed' clearly identifies the action and resource with a specific verb. It is distinct enough from siblings like get_video_detail or get_user_posts, though it does not explicitly name alternatives or exclusion conditions.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description offers no guidance on when to use this tool instead of search_videos, get_user_posts, or check_login_status. It does not mention prerequisites, alternatives, or typical scenarios, leaving the agent to infer usage from the tool name alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_sub_commentsA
Get replies (sub-comments) for a Douyin comment.
Args: comment_id: The parent comment ID cursor: Pagination cursor (default 0) count: Number of replies per page (default 20) source_keyword: Optional search keyword (used for referer)
Returns: dict containing replies list and pagination metadata
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | ||
| cursor | No | ||
| comment_id | Yes | ||
| source_keyword | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the burden of behavioral disclosure. It does disclose the return shape (dict with replies list and pagination metadata) and explains that source_keyword is used for the referer. However, it does not mention authentication needs, rate limits, error behavior, or confirm that this is a read-only operation, leaving some gaps relevant to a no-annotation tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is compact, front-loaded with the core purpose, and uses a clear Args/Returns structure. Every sentence contributes meaning, and there is no repeated or redundant information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool is a straightforward paginated read operation with four parameters, all of which are explained. An output schema is present, so the description does not need to fully document return values. The main gap is the lack of any mention of auth or rate limits, but given the tool's simplicity, the description is largely sufficient.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, and the description fully compensates by explaining every parameter: comment_id is the parent comment ID, cursor is the pagination cursor, count is the number of replies per page, and source_keyword is an optional search keyword used for the referer. This adds real semantic meaning beyond the bare schema types and defaults.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific verb+resource combination: 'Get replies (sub-comments) for a Douyin comment.' This clearly identifies the operation and naturally distinguishes it from the sibling get_video_comments, which presumably fetches top-level comments for a video rather than nested replies.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description makes clear that the tool is for fetching replies to a parent comment, implying it should be used after a comment ID is obtained from a parent-comment tool like get_video_comments. It does not explicitly state when not to use it or name an alternative, but the context is clear enough for an agent to select it correctly.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_user_infoA
Get Douyin user profile information.
Args: sec_user_id: The user's security ID (starts with MS4wLjABAAAA)
Returns: dict containing user profile with nickname, avatar, follower count, following count, total likes, and video count
| Name | Required | Description | Default |
|---|---|---|---|
| sec_user_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the behavioral disclosure burden. It clearly indicates a read-style operation ('Get') and describes the return shape, which is useful. However, it does not disclose auth requirements, failure behavior for invalid sec_user_id, rate limits, or whether a valid login is required.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is compact and well-structured with a clear summary line, an Args section, and a Returns section. Every sentence contributes useful information, and there is no redundant or filler content.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a single-parameter read tool with an output schema, the description covers the main operational need: what the tool does and what it returns. It is not fully complete because it omits auth prerequisites and error scenarios, which the sibling check_login_status suggests may be relevant, but the core call contract is adequately specified.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema only says sec_user_id is a required string, but the description explains that it is the user's security ID and gives a recognizable prefix pattern (MS4wLjABAAAA). This adds significant semantic value beyond the schema, fully covering the only parameter.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific verb and resource: 'Get Douyin user profile information.' The listed return fields (nickname, avatar, follower count, etc.) make the scope concrete and clearly differentiate it from siblings like get_user_posts, which concern posts rather than profile data.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance about when to use this tool versus alternatives. It does not mention exclusions, prerequisites like login status, or point to get_user_posts or check_login_status for adjacent use cases. Usage is only implied by the tool's name and one-line summary.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_user_postsA
Get videos posted by a Douyin user.
Args: sec_user_id: The user's security ID max_cursor: Pagination cursor (default "0") count: Number of videos per page (default 18)
Returns: dict containing video list and pagination info
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | ||
| max_cursor | No | 0 | |
| sec_user_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the burden, and it does disclose the return shape ('dict containing video list and pagination info') plus pagination parameters. It does not mention authentication requirements, rate limits, or whether only public videos are returned, but for a read-only getter the stated behavior is minimally transparent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is compact and well-structured, with a single-purpose opening line followed by args and returns sections. There is no filler or repetition of the schema beyond useful defaults.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple paginated read operation, all parameters are documented and the return type is summarized while an output schema provides further detail. The main missing context is when to choose this versus sibling search/feed tools, and how to advance pagination.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, yet the description documents all three parameters with meaningful one-line explanations: sec_user_id, max_cursor as pagination cursor, and count as page size. The semantics are clear, though max_cursor could explain that it comes from the previous response.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a clear verb and resource: 'Get videos posted by a Douyin user,' so an agent knows the tool lists a user's videos. It doesn't explicitly compare against siblings like get_homefeed or search_videos, but the user-scoped wording makes its job identifiable.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
There is no guidance about when to prefer this tool over alternatives, nor any exclusions. Given siblings such as get_homefeed and search_videos that could also return video lists, an agent is left to infer the appropriate selection context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_video_commentsA
Get comments for a Douyin video.
Args: aweme_id: The video/aweme ID cursor: Pagination cursor (default 0) count: Number of comments per page (default 20) source_keyword: Optional search keyword (used for referer)
Returns: dict containing comments list and pagination metadata
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | ||
| cursor | No | ||
| aweme_id | Yes | ||
| source_keyword | No |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the behavioral disclosure burden. It does disclose pagination behavior, cursor/count defaults, and the referer purpose of source_keyword. However, it does not clarify whether these are only top-level comments, what pagination metadata is returned, or any rate-limit/auth considerations, leaving meaningful behavioral gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is compact and well-structured with a one-line purpose followed by a clear Args/Returns breakdown. Every element earns its place, and the key action is front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a paginated retrieval tool, the description covers the core invocation details: required ID, pagination parameters, and return shape. It is slightly incomplete because it does not distinguish top-level comments from nested sub-comments, especially given the get_sub_comments sibling, but it is otherwise sufficient for calling the tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema description coverage is 0%, but the description fully compensates by explaining every parameter: aweme_id identifies the video, cursor drives pagination, count sets page size, and source_keyword is for the referer. This adds meaning well beyond the raw schema fields.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states a specific verb and resource: 'Get comments for a Douyin video.' It is unambiguous about what the tool does, but it does not differentiate itself from the sibling get_sub_comments, so an agent must infer the difference between comments and sub-comments.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Usage is implied: use this tool when you need comments for a Douyin video. However, there is no explicit guidance about when to choose get_video_comments over get_sub_comments or other siblings, so the selection guidance remains implicit rather than stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_video_detailA
Get detailed information about a Douyin video.
Args: aweme_id: The video/aweme ID (numeric string)
Returns: dict containing video details including title, description, statistics (likes, comments, shares), author info, and URLs
| Name | Required | Description | Default |
|---|---|---|---|
| aweme_id | Yes |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist, so the description carries the full disclosure burden. It does reveal the return shape (dict with statistics, author info, URLs), which is useful behavioral context. However, it omits auth requirements (relevant given the check_login_status sibling), behavior for invalid or nonexistent IDs, and error handling.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Docstring-style layout with a one-sentence purpose, an Args line, and a Returns line — scannable and free of filler. Each line earns its place, though the purpose line and Returns section overlap slightly in what they promise.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a one-parameter read tool with an output schema present, the main contract is documented: what it does, what the parameter means, and roughly what it returns. Missing pieces are sibling differentiation, auth needs, and error behavior, which an agent would need to invoke it reliably in a real Douyin session.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 0% and the schema only types aweme_id as a bare string. The description compensates by clarifying it is 'the video/aweme ID' and a 'numeric string', adding both semantic role and format. It stops short of an example or guidance on where to obtain the ID, but the core meaning is conveyed.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Uses a specific verb+resource ('Get detailed information about a Douyin video') and enumerates the concrete payload (title, description, statistics, author info, URLs). This clearly distinguishes it from siblings like get_video_comments, get_homefeed, and get_user_info, whose scopes are narrower or focus on different resources.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to choose this over sibling tools. It never references get_video_comments, search_videos, or get_homefeed as alternatives, and states no exclusions or prerequisites. Usage context must be inferred entirely from the tool name and return payload.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_videosA
Search for Douyin videos by keyword.
Args: keyword: Search keyword offset: Pagination offset (default 0) count: Number of results per page (default 10, max 20) search_channel: Search type - "general", "video", "user", or "live" sort_type: Sort order - 0 (general), 1 (most liked), 2 (latest) publish_time: Time filter - 0 (unlimited), 1 (1 day), 7 (1 week), 180 (6 months)
Returns: dict containing search results with video list
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | ||
| offset | No | ||
| keyword | Yes | ||
| sort_type | No | ||
| publish_time | No | ||
| search_channel | No | general |
Output Schema
| Name | Required | Description |
|---|---|---|
No output parameters | ||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the behavioral burden. It clearly states that the tool searches and returns a dict with a video list, which is core behavior, but it does not disclose authentication requirements, rate limits, pagination behavior beyond parameter defaults, or error conditions. This is adequate but not rich.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is well-structured with a one-sentence purpose, a clean Args list, and a Returns line. Every line adds useful information and nothing is redundant or wasteful.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
All six parameters are semantically documented and the return type is stated, so an agent can invoke the tool correctly. Minor gaps remain around usage boundaries relative to sibling tools and any authentication or rate-limit caveats, especially given there are no annotations to provide safety context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, but the description fully compensates by explaining every parameter: keyword, offset, count with max, search_channel with allowed values, sort_type with meaning, and publish_time with filter ranges. This adds significant meaning beyond the bare schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description opens with a specific verb and resource: 'Search for Douyin videos by keyword.' This makes the tool's purpose immediately clear and distinguishes it from sibling tools like get_homefeed, get_video_detail, or get_user_posts, which serve different retrieval needs.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The keyword-based search purpose implies when this tool should be used, but the description provides no explicit guidance about when to prefer it over alternatives or when not to use it. For example, it doesn't mention that get_video_detail is for a single video or get_homefeed is for feed browsing.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
8 tool updates
v0.1.0- First observed
check_login_status - First observed
get_homefeed - First observed
get_sub_comments - First observed
get_user_info - First observed
get_user_posts - First observed
get_video_comments - First observed
get_video_detail - First observed
search_videos
TDQS
Scored across 8 tools
Each tool targets one specific resource type and action: session status, feed, search, video details, video comments, comment replies, user info, and user posts. The only similar pair (get_homefeed and search_videos) is clearly separated by recommendation vs keyword-driven retrieval.
All tools use lowercase snake_case and a consistent verb_noun pattern: check_*, get_*_*, and search_*. get_homefeed is a minor compound but does not break the overall convention.
With 8 tools, the server covers the core Douyin browsing and analytics flows without bloat. Each tool supports a distinct workflow step and no tool is redundant.
The set covers a complete read-only lifecycle: authentication status, discovery via feed/search, video detail, threaded comments (video comments plus sub-comments), and user profile/posts. Tools chain naturally from discovery to video, comment, and user details with no obvious dead ends.
Maintenance
Related MCP Connectors
TikTok data for AI agents: videos, creators, sounds, hashtags, trends. Content + creator research.
Public TikTok profiles, videos, comments and keyword search as JSON. No developer account.
TikTok data for agents: videos, creators, comments, search, transcripts. 25 tools, pay per call.
YouTube transcripts, search, channel/playlist listings and upload tracking for AI agents.
Related MCP Servers
- AlicenseDqualityDmaintenanceProvides access to Douyin (TikTok China) API for searching videos, retrieving user profiles, posts, comments, music, challenges, live streams, and hot trends through the Douyin platform.79MIT
- AlicenseAqualityDmaintenanceEnables to search, analyze, and export Douyin (TikTok China) video and user data, including interaction metrics, content length, and keyword trends.823 PyPI23MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to automatically upload videos to Douyin (TikTok China) creator platform, supporting login, video upload with title/description/tags, and session management.9 npm36MIT
- AlicenseNot gradedqualityCmaintenanceEnables transcribing public Douyin videos to text using a local AI model, providing read-only tools for transcription, search, and listing.MIT