tiktok_download
Download TikTok videos directly from URLs, removing watermarks when available to save content locally.
Instructions
Download a TikTok video (without watermark when possible).
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| video_url | Yes | TikTok video URL | |
| output_path | No | Output file path (optional, auto-generated if empty) |
Implementation Reference
- tiktok_mcp/server.py:254-264 (handler)The handler logic for "tiktok_download" in server.py, which processes the input arguments, generates an output path, and calls the browser's download method.
elif name == "tiktok_download": video_url = arguments["video_url"] output_path = arguments.get("output_path", "") if not output_path: import re m = re.search(r"/video/(\d+)", video_url) vid_id = m.group(1) if m else str(int(datetime.now().timestamp())) output_path = os.path.join(DOWNLOAD_DIR, f"{vid_id}.mp4") result = await browser.download_video(video_url, output_path) return [TextContent(type="text", text=json.dumps(result, indent=2, ensure_ascii=False))] - tiktok_mcp/server.py:120-131 (schema)The tool registration and schema definition for "tiktok_download".
Tool( name="tiktok_download", description="Download a TikTok video (without watermark when possible).", inputSchema={ "type": "object", "properties": { "video_url": {"type": "string", "description": "TikTok video URL"}, "output_path": {"type": "string", "description": "Output file path (optional, auto-generated if empty)"}, }, "required": ["video_url"], }, ),