follox42

๐ŸŽต TikTok MCP Server

Community follox42
Updated

๐ŸŽต The first full-featured TikTok MCP server โ€” search, feed, publish, interact, download, and trend analysis. 12 tools. No API key needed.

๐ŸŽต TikTok MCP Server

The first complete TikTok MCP server with publish, interact, and browse

Search โ€ข Download โ€ข Publish โ€ข Like โ€ข Comment โ€ข Follow โ€ข Analyze Trends โ€” all from your AI assistant.

Python 3.10+License: MITMCP CompatibleGitHub Stars

โšก Why tiktok-mcp?

Most TikTok MCP servers only let you read data. This one lets you act.

  • ๐Ÿ” Browse โ€” Search videos, explore hashtags, scroll the For You Page
  • ๐Ÿ“ฅ Download โ€” Save videos without watermark (HD when available)
  • ๐Ÿ“ค Publish โ€” Upload videos directly to TikTok via Creator Center
  • ๐Ÿ’ฌ Interact โ€” Like, comment, and follow โ€” all automated
  • ๐Ÿ“Š Analyze โ€” Cross-keyword trend analysis with top hashtags & creators

12 tools. One server. Full TikTok automation.

๐Ÿ› ๏ธ All 12 Tools

Tool Description
tiktok_search Search TikTok videos by keyword. Returns author, description, views, URL, hashtags.
tiktok_trending Get trending/For You videos from TikTok's main feed.
tiktok_feed Scroll the For You Page like a real user and collect video metadata.
tiktok_user_videos Get all videos from a specific user's profile with their stats.
tiktok_video_info Get detailed metadata for a specific video (stats, audio, hashtags, description).
tiktok_hashtag Explore a hashtag โ€” view count, popular videos, and stats.
tiktok_download Download a TikTok video without watermark (HD when available via tikwm).
tiktok_publish Publish a video to TikTok with caption and hashtags via Creator Center.
tiktok_interact Like, comment, or follow โ€” interact with any video or creator.
tiktok_sounds Get trending sounds/music on TikTok.
tiktok_session Manage your TikTok session: check login, refresh cookies, export session.
tiktok_analyze_trend Multi-keyword trend analysis: top hashtags, top creators, posting patterns.

๐Ÿš€ Installation (3 Steps)

1. Clone & Install

git clone https://github.com/follox42/tiktok-mcp.git
cd tiktok-mcp
pip install -e .
playwright install chromium

2. Get Your TikTok Cookies

You need authenticated cookies for publish/interact features. Two options:

Option A โ€” From TikSimPro (recommended):

# If you use TikSimPro, cookies are already at:
~/TikSimPro/tiktok_cookies.pkl

Option B โ€” Export manually:

  1. Log into TikTok in your browser
  2. Use a cookie export extension (e.g., "Get cookies.txt")
  3. Save as JSON:
[
  {"name": "sessionid", "value": "xxx", "domain": ".tiktok.com", "path": "/"},
  {"name": "sid_tt", "value": "xxx", "domain": ".tiktok.com", "path": "/"}
]

3. Set Environment Variables

export TIKTOK_COOKIES_PATH="/path/to/your/cookies.pkl"  # or .json
export TIKTOK_HEADLESS=true       # false to see the browser
export TIKTOK_MIN_INTERVAL=2.0    # rate limit between calls (seconds)
export TIKTOK_DOWNLOAD_DIR="./downloads"

โš™๏ธ Configuration

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "tiktok": {
      "command": "tiktok-mcp",
      "env": {
        "TIKTOK_COOKIES_PATH": "/home/you/TikSimPro/tiktok_cookies.pkl",
        "TIKTOK_HEADLESS": "true"
      }
    }
  }
}

mcporter

{
  "servers": {
    "tiktok": {
      "command": "tiktok-mcp",
      "env": {
        "TIKTOK_COOKIES_PATH": "/home/you/TikSimPro/tiktok_cookies.pkl"
      }
    }
  }
}

Direct (stdio)

tiktok-mcp
# or
python -m tiktok_mcp

๐Ÿ“– Usage Examples

๐Ÿ” Search Videos

Use tiktok_search to find "AI productivity" videos
{"query": "AI productivity", "count": 10}

๐Ÿ“Š Analyze a Niche

Analyze trends for "solopreneur" and "indie hacker" โ€” what hashtags and creators dominate?
{"keywords": ["solopreneur", "indie hacker", "build in public"], "count_per_keyword": 15}

๐Ÿ‘ค Research a Creator

Get the last 20 videos from @garyvee
{"username": "garyvee", "count": 20}

๐Ÿ“ฅ Download a Video

Download this video without watermark: https://www.tiktok.com/@user/video/123456
{"video_url": "https://www.tiktok.com/@user/video/123456"}

๐Ÿ“ค Publish a Video

Publish my video with caption "Building in public day 47 ๐Ÿš€" and hashtags buildinpublic, startup, coding
{
  "video_path": "/path/to/video.mp4",
  "caption": "Building in public day 47 ๐Ÿš€",
  "hashtags": ["buildinpublic", "startup", "coding"]
}

๐Ÿ’ฌ Interact (Like / Comment / Follow)

Like this video and leave a comment: "This is incredible! ๐Ÿ”ฅ"
{"action": "like", "video_url": "https://www.tiktok.com/@user/video/123456"}
{"action": "comment", "video_url": "https://www.tiktok.com/@user/video/123456", "text": "This is incredible! ๐Ÿ”ฅ"}
{"action": "follow", "video_url": "https://www.tiktok.com/@user/video/123456"}

๐ŸŽต Trending Sounds

What sounds are trending on TikTok right now?
{"count": 20}

๐Ÿ” Session Management

Check if my TikTok session is still active
{"action": "check_login"}
{"action": "refresh_cookies"}
{"action": "export_session"}

๐Ÿ† Comparison โ€” Why This One?

Feature tiktok-mcp Other TikTok MCPs
Search videos โœ… โœ…
Trending feed โœ… โš ๏ธ Some
User profiles โœ… โš ๏ธ Some
Video details โœ… โœ…
Hashtag exploration โœ… โŒ
Download (no watermark) โœ… โŒ
Publish videos โœ… โŒ
Like / Comment / Follow โœ… โŒ
Trending sounds โœ… โŒ
Trend analysis โœ… โŒ
Session management โœ… โŒ
Stealth / anti-detection โœ… โŒ
Cookie auth (TikSimPro) โœ… โŒ
Total tools 12 2-4

tiktok-mcp is the only MCP server that lets you publish and interact on TikTok.

๐Ÿ“ธ Demo

Screenshots and demo GIFs coming soon.

๐Ÿ—๏ธ Built With

  • Playwright โ€” Browser automation with stealth capabilities
  • playwright-stealth โ€” Anti-detection patches
  • MCP SDK โ€” Model Context Protocol for AI integration
  • TikSimPro โ€” Cookie management & TikTok session handling
  • tikwm โ€” Watermark-free video downloads
  • httpx โ€” Async HTTP client

๐Ÿค Contributing

Contributions are welcome! Here's how:

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'feat: add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Ideas for contributions:

  • ๐Ÿ“ฑ Mobile viewport support
  • ๐ŸŒ Multi-language support
  • ๐Ÿ“Š Advanced analytics (engagement rate, best posting times)
  • ๐Ÿ”„ Scheduled posting
  • ๐ŸŽญ Multiple account support

๐Ÿ“„ License

This project is licensed under the MIT License โ€” see the LICENSE file for details.

โญ Star this repo if you find it useful!

Made with โค๏ธ by follox42

MCP Server ยท Populars

MCP Server ยท New

    aovestdipaperino

    tokensave

    Rust port of CodeGraph โ€” a local-first code intelligence system that builds semantic knowledge graphs from codebases. Ported from the original TypeScript implementation by @colbymchenry.

    Community aovestdipaperino
    jpicklyk

    MCP Task Orchestrator

    Server-enforced workflow discipline for AI agents. An MCP server providing persistent work items, dependency graphs, quality gates, and actor attribution. Schemas define what agents must produce โ€” the server blocks the call if they don't. Works with any MCP-compatible client.

    Community jpicklyk
    AgentsID-dev

    AgentsID Scanner

    Security scanner for MCP servers. Grades auth, permissions, injection risks, and tool safety. The Lighthouse of agent security.

    Community AgentsID-dev
    remete618

    widemem.ai

    Next-gen AI memory layer with importance scoring, temporal decay, hierarchical memory, and YMYL prioritization

    Community remete618
    Ruya-AI

    Cozempic

    Context cleaning for Claude Code โ€” prune bloated sessions, protect Agent Teams from context loss, auto-guard with tiered pruning

    Community Ruya-AI