tiktok-mcp
This server provides TikTok integration via MCP, enabling searches and retrieval of videos, users, hashtags, and trending content. All tools return JSON results, with fallback to public scraping if no official API credentials are provided.
Search Videos (
search_videos): Find TikTok videos by keyword with configurable result limits.Get Trending Hashtags (
get_trending_hashtags): Retrieve currently trending hashtags filtered by region (e.g., US, BR, GB).Get Trending Videos (
get_trending_videos): Fetch popular/trending videos by region with configurable result limits.Get User Info (
get_user_info): Look up a TikTok user's profile details including followers, following, likes, and bio.Get User Videos (
get_user_videos): Retrieve videos posted by a specific TikTok user with configurable result limits.Get Video Details (
get_video_details): Fetch detailed information (stats, description, etc.) about a specific video using its ID.Search Hashtag (
search_hashtag): Get videos associated with a specific hashtag with configurable result limits.Search Users (
search_users): Discover TikTok users matching a search query with configurable result limits.
Provides tools for searching TikTok videos, users, hashtags, trending content, user profiles, and video details.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@tiktok-mcp get trending videos in the US"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
TikTok MCP Server
Model Context Protocol (MCP) server for TikTok. Provides tools for searching videos, users, hashtags, getting trending content, user profiles, video details, and more.
Features
Video Search - Search TikTok videos by keyword
Trending Hashtags - Get currently trending hashtags by region
Trending Videos - Get popular/trending videos
User Info - Get user profile details (followers, following, likes, bio, etc.)
User Videos - Get videos from a specific user's profile
Video Details - Get detailed video information (stats, description, etc.)
Hashtag Search - Get videos for a specific hashtag
User Search - Search for TikTok users
Related MCP server: TikTok MCP Server
API Access
This server supports two modes:
Official TikTok API (recommended) - Requires approved developer access with:
TIKTOK_CLIENT_KEYTIKTOK_CLIENT_SECRETTIKTOK_ACCESS_TOKEN
Public Scraping (fallback) - Works without API credentials but may be rate-limited or break if TikTok changes their frontend.
Transport
The server runs over streamable-HTTP by default, exposing the MCP endpoint at
/mcp so it can be hosted as a network service (Easypanel/Docker). Set
MCP_TRANSPORT=stdio to run over stdio for local subprocess use instead.
Configuration
Environment variables:
Variable | Default | Description |
|
|
|
|
| Bind address |
|
| Listen port |
| — | Official API key (optional) |
| — | Official API secret (optional) |
| — | Official API token (optional) |
Official API (Recommended)
Get credentials from TikTok Developers and set the
three TIKTOK_* variables. If they are not set, the server falls back to public scraping.
Local Development
# Install (editable) with uv
uv pip install -e .
# Run (streamable-HTTP on http://0.0.0.0:8000/mcp)
tiktok-mcp
# Or over stdio
MCP_TRANSPORT=stdio tiktok-mcpDocker
docker build -t tiktok-mcp .
docker run -p 8000:8000 \
-e TIKTOK_CLIENT_KEY=... \
-e TIKTOK_CLIENT_SECRET=... \
-e TIKTOK_ACCESS_TOKEN=... \
tiktok-mcpThe MCP endpoint will be available at http://localhost:8000/mcp.
Deploy on Easypanel
Create an App service pointing to this repository (or the GHCR image built by the included CI workflow).
Build method: Dockerfile (already in the repo root).
Set the exposed/container port to 8000 and add a domain (Easypanel handles SSL).
Add the
TIKTOK_*environment variables under the service's Environment tab (leave them empty to use public scraping).Deploy. The MCP endpoint will be served at
https://<your-domain>/mcp.
Connecting an MCP client
For a hosted HTTP server, connect via URL (not a spawned command). The exact config file depends on the client; the shape is the same:
{
"mcpServers": {
"tiktok": {
"url": "https://<your-domain>/mcp"
}
}
}Claude Desktop / Claude Code: add the block above to the MCP config and restart.
Hermes Agent: point the
tiktokserver at the sameurl.
Once connected, the tools appear to the model (e.g. mcp_tiktok_search_videos) and can
be triggered with natural language — see Example Queries.
Verify the endpoint
After running locally or deploying, confirm the server is up with a raw MCP handshake.
The streamable-HTTP endpoint requires both application/json and text/event-stream
in the Accept header:
curl -i -X POST http://localhost:8000/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"curl","version":"1.0"}}}'A healthy server returns HTTP/1.1 200 OK and an SSE data: line containing
"serverInfo":{"name":"tiktok-mcp",...}.
Available Tools
All tools return a JSON text payload. When scraping is used (no official API
credentials), responses include a "source": "scraping" field.
Tool | Parameters | Description |
|
| Search videos by keyword |
|
| Get trending hashtags by region |
|
| Get trending videos |
|
| Get user profile details |
|
| Get a user's videos |
|
| Get video details by ID |
|
| Get videos for a hashtag |
|
| Search for users |
Example Queries
"Search for videos about AI automation"
"Get trending hashtags in Brazil"
"Find trending videos in the US"
"Get profile info for @username"
"Get videos from @username's profile"
"Search for #marketing hashtag videos"
"Find users about 'dark fantasy art'"
Development
# Install with dev dependencies
uv pip install -e ".[dev]"Note: an automated test suite is not included yet. Use the Verify the endpoint handshake to smoke-test changes.
Important Notes
Rate Limits: Public scraping is subject to TikTok's rate limits. Use official API for production.
Legal: Respect TikTok's Terms of Service and robots.txt
Stability: Public scraping may break if TikTok changes their frontend structure
Official API: Requires TikTok developer approval - apply at developers.tiktok.com
License
MIT
Available Tools
8 toolsget_trending_hashtagsB
Get trending hashtags on TikTok
Inputs: region (required).
get_trending_videosC
Get trending/popular videos on TikTok
Inputs: region (required), max_results.
get_user_infoB
Get TikTok user profile information
Inputs: username (required).
get_user_videosC
Get videos from a TikTok user's profile
Inputs: username (required), max_results.
get_video_detailsA
Get detailed information about a specific TikTok video
Inputs: video_id (required).
search_hashtagB
Search videos by hashtag
Inputs: hashtag (required), max_results.
search_usersC
Search for TikTok users
Inputs: query (required), max_results.
search_videosC
Search for TikTok videos by keyword
Inputs: query (required), max_results.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Most tools have clearly distinct purposes (trending, user info, search, video details). The main potential confusion is between get_trending_videos and search_videos, as both return videos but one is specifically trending; descriptions help disambiguate.
All tools follow a consistent verb_noun pattern in snake_case (get_*, search_*), making them predictable and easy to understand.
8 tools is appropriate for a TikTok MCP server, covering trending, user, video details, and search without being overwhelming or too sparse.
The tool set covers core read operations (trending, user, video, search) for TikTok. Minor gaps exist (e.g., no hashtag metadata, no posting or interaction tools), but they are reasonable given typical read-only MCP servers.
Maintenance
Related MCP Connectors
Real-time TikTok videos, profiles, comments, trends & Creative Center ads MCP. OAuth or API key.
Hosted MCP server for DataLikers — Instagram & TikTok data API. 51 tools: Instagram user search by demographics (gender/age/race/country/city), profiles, bulk lookup, engagement, posts & reels, comments, hashtags, locations, stories, highlights, music, business accounts, top users; TikTok users, videos, comments, hashtags, playlists and top charts. Streamable HTTP, Bearer API key. Free tier: 100 requests on signup at https://datalikers.com/p/1by27bwg
Hosted TikTok Pages MCP server, with each action switched on or off per account.
Real-time short-form video, creator profiles, comments, trends & ad data MCP. OAuth or API key.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceMCP server for analyzing TikTok data for insight extraction6MIT
- AlicenseBqualityNot gradedmaintenanceA comprehensive MCP server that enables AI assistants to search, download, and analyze TikTok content while also performing active tasks like publishing videos and interacting with posts. It provides full automation capabilities for TikTok through browser session management and anti-detection features.122MIT
- AlicenseAqualityDmaintenanceFree MCP server to automate TikTok viral marketing — search trending videos, analyze hashtags, and draft video scripts. Premium features powered by DeepSeek AI unlock AI-driven optimal posting times, hashtag strategies, and script generation.5MIT
- AlicenseAqualityDmaintenanceMCP server for TikTok that publishes videos to your own TikTok account and retrieves video performance metrics through TikTok's official Content Posting and Display APIs.61MIT