TikTok

v1.0.0Marketing & SEOstable

Provides a robust interface for searching TikTok videos by hashtags and retrieving trending content, with anti-detection measures and comprehensive metadata extraction.

agentagentic-aiaimarketingmcp
Share:
72
Stars
0
Downloads
0
Weekly
0/5

What is TikTok?

TikTok is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to provides a robust interface for searching tiktok videos by hashtags and retrieving trending content, with anti-detection measures and comprehensive metadata extraction.

Provides a robust interface for searching TikTok videos by hashtags and retrieving trending content, with anti-detection measures and comprehensive metadata extraction.

This server falls under the Marketing & SEO category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Provides a robust interface for searching TikTok videos by h

Use Cases

Search TikTok videos by hashtags and trends
Extract metadata and analyze viral content
yap-audio

Maintainer

LicenseMIT License
Languagepython
Versionv1.0.0
UpdatedMay 15, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx tiktok-mcp-service

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use TikTok

The TikTok MCP Service is a Python-based MCP server that lets AI assistants search TikTok videos by hashtag, retrieve trending content, and extract comprehensive metadata including view counts, likes, shares, comments, and video descriptions. It uses the TikTok-Api library with built-in anti-detection measures and optional proxy support to avoid rate limiting. Marketing teams, content strategists, and UGC researchers use it to analyze viral trends, benchmark competitor hashtags, and surface high-performing content for campaign ideation through natural language queries.

Prerequisites

  • Python 3.10 or later with Poetry package manager installed (`pip install poetry`)
  • A TikTok ms_token cookie value (optional but recommended to reduce bot-detection blocks)
  • Optional: a proxy URL if you need to route requests through a specific IP
  • An MCP client such as Claude Desktop
1

Clone the repository

Clone the tiktok-mcp source to get the server code and dependency files.

git clone https://github.com/yap-audio/tiktok-mcp.git
cd tiktok-mcp
2

Install dependencies with Poetry

Use Poetry to create a virtual environment and install all required Python packages including TikTok-Api and the MCP SDK.

poetry install
3

Obtain a TikTok ms_token (recommended)

Open TikTok in a browser, log in, open DevTools > Application > Cookies, and copy the value of the 'msToken' cookie. This token is optional but significantly reduces bot-detection blocking during searches.

4

Create the .env file

Create a .env file in the project root with your TikTok authentication token and optional proxy settings.

# .env file
ms_token=your_tiktok_ms_token_value_here
# Optional proxy:
# TIKTOK_PROXY=http://user:[email protected]:8080
5

Register the server with your MCP client

Install the server into your MCP client using the Poetry run command, which ensures the correct virtual environment is used.

poetry run mcp install tiktok_mcp_service/main.py --with-editable . -f .env
6

Configure Claude Desktop manually

Alternatively, add the server directly to claude_desktop_config.json using the Poetry environment Python interpreter.

{
  "mcpServers": {
    "tiktok": {
      "command": "poetry",
      "args": ["run", "python", "tiktok_mcp_service/main.py"],
      "cwd": "/absolute/path/to/tiktok-mcp",
      "env": {
        "ms_token": "your_ms_token_here"
      }
    }
  }
}

TikTok Examples

Client configuration

Claude Desktop config for TikTok MCP Service using Poetry to run the Python server with environment variables.

{
  "mcpServers": {
    "tiktok": {
      "command": "poetry",
      "args": ["run", "python", "tiktok_mcp_service/main.py"],
      "cwd": "/Users/me/projects/tiktok-mcp",
      "env": {
        "ms_token": "your_tiktok_mstoken_cookie_value",
        "TIKTOK_PROXY": ""
      }
    }
  }
}

Prompts to try

Use these prompts to research TikTok trends and content through the MCP server.

- "Search TikTok for the top 20 videos using the hashtag #aitools and summarize the themes"
- "Find trending TikTok videos about #sustainability and list their view counts"
- "Get 30 TikTok videos for the hashtag #smallbusiness and identify the most common topics"
- "Search #coding on TikTok and find the video with the highest engagement rate"
- "Compare trending content between #marketing and #growthmarketing on TikTok"

Troubleshooting TikTok

Search returns empty results or 'blocked' error

Add a valid ms_token from your TikTok browser session. Open TikTok in Chrome, log in, go to DevTools > Application > Cookies > tiktok.com, and copy the 'msToken' value to your .env file. Tokens expire periodically and need refreshing.

Poetry command not found when starting the server

Install Poetry with `pip install poetry` or `curl -sSL https://install.python-poetry.org | python3 -`. After installation, run `poetry --version` to confirm it is available, then retry the install command.

TikTok API rate limiting or 429 errors during large searches

Set TIKTOK_PROXY to a residential proxy URL in your .env file to distribute requests across different IPs. Reduce the count parameter in search requests (e.g. use 20 instead of 50) to lower request frequency.

Frequently Asked Questions about TikTok

What is TikTok?

TikTok is a Model Context Protocol (MCP) server that provides a robust interface for searching tiktok videos by hashtags and retrieving trending content, with anti-detection measures and comprehensive metadata extraction. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install TikTok?

Follow the installation instructions on the TikTok GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with TikTok?

TikTok works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is TikTok free to use?

Yes, TikTok is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.

Browse More Marketing & SEO MCP Servers

Explore all marketing & seo servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "tiktok-mcp-service": { "command": "npx", "args": ["-y", "tiktok-mcp-service"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use TikTok?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides