Skip to main content
Glama

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
NameRequiredDescriptionDefault
video_urlYesTikTok video URL
output_pathNoOutput file path (optional, auto-generated if empty)

Implementation Reference

  • 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))]
  • 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"],
        },
    ),

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/follox42/tiktok-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server