TikTok
Provides a robust interface for searching TikTok videos by hashtags and retrieving trending content, with anti-detection measures and comprehensive metadata extraction.
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
Maintainer
Works with
Installation
Manual Installation
npx tiktok-mcp-serviceConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
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
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-mcpInstall dependencies with Poetry
Use Poetry to create a virtual environment and install all required Python packages including TikTok-Api and the MCP SDK.
poetry installObtain 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.
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]:8080Register 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 .envConfigure 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.
TikTok Alternatives — Similar Marketing & SEO Servers
Looking for alternatives to TikTok? Here are other popular marketing & seo servers you can use with Claude, Cursor, and VS Code.
TopRank
★ 2.6kGoogle Ads analysis and operations — read performance, manage keywords, bids, and campaigns.
Open SEO
★ 2.1kOpen source alternative to Semrush and Ahrefs
ASO Skills
★ 1.4kAI agent skills for App Store Optimization (ASO) and app marketing. Built for indie developers, app marketers, and growth teams who want Cursor, Claude Code, or any Agent Skills-compatible AI assistant to help with keyword research, metadata optimiza
Google Meta Ads GA4
★ 994MCP server for Google Ads, Meta Ads & GA4 — works with ChatGPT, Claude, Cursor, n8n, Windsurf & more. 250+ tools for campaign management, analytics & optimization.
Meta Ads
★ 923A Model Context Protocol server that allows AI models to access, analyze, and manage Meta advertising campaigns, enabling LLMs to retrieve performance data, visualize ad creatives, and provide strategic insights for Facebook and Instagram platforms.
Google Search Console
★ 882Connects Google Search Console with Claude AI to enable SEO professionals to analyze their SEO data through natural language conversations, providing access to property information, search analytics, URL inspection, and sitemap management.
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.
Set Up TikTok in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
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.