TikTok automation MCP: post videos, get analytics, manage comments
Project description
TikTok Creator MCP
mcp-name: io.github.wmarceau/tiktok-creator
TikTok automation tools for Claude via MCP (Model Context Protocol). Post videos, track analytics, and manage comments.
Features
- Post Videos: Upload from local file or public URL
- Privacy Control: Set visibility (self, friends, followers, public)
- Analytics: Video views, likes, comments, shares
- Account Stats: Follower count, total likes
- Comments: Read and reply to comments
- Interaction Controls: Enable/disable duets, stitch, comments
Installation
pip install tiktok-creator-mcp
Setup
Prerequisites
- TikTok Developer Account: https://developers.tiktok.com
- App with Content Posting API access
1. Create TikTok App
- Go to TikTok Developer Portal
- Create a new app
- Request Content Posting API access
- Add redirect URI for OAuth
2. OAuth Flow
TikTok uses OAuth 2.0. You'll need to:
- Direct user to authorization URL
- Receive authorization code
- Exchange for access token
# Authorization URL
auth_url = f"https://www.tiktok.com/v2/auth/authorize/?client_key={CLIENT_KEY}&response_type=code&scope=user.info.basic,video.upload,video.list&redirect_uri={REDIRECT_URI}"
# Exchange code for token
token_response = requests.post(
"https://open.tiktokapis.com/v2/oauth/token/",
data={
"client_key": CLIENT_KEY,
"client_secret": CLIENT_SECRET,
"code": auth_code,
"grant_type": "authorization_code",
"redirect_uri": REDIRECT_URI,
}
)
3. Set Environment Variables
export TIKTOK_CLIENT_KEY="your_client_key"
export TIKTOK_CLIENT_SECRET="your_client_secret"
export TIKTOK_ACCESS_TOKEN="your_access_token"
export TIKTOK_REFRESH_TOKEN="your_refresh_token"
Tools
| Tool | Description |
|---|---|
post_video |
Post video from local file |
post_video_from_url |
Post video from public URL |
get_video_stats |
Get video performance metrics |
get_account_stats |
Follower count, likes, videos |
get_video_list |
List your TikTok videos |
get_comments |
Get video comments |
reply_to_comment |
Reply to a comment |
Usage Examples
Post a Video
{
"tool": "post_video",
"arguments": {
"video_path": "/path/to/video.mp4",
"title": "Quick fitness tip! #fitness #workout",
"privacy": "PUBLIC_TO_EVERYONE"
}
}
Post from URL
{
"tool": "post_video_from_url",
"arguments": {
"video_url": "https://example.com/video.mp4",
"title": "Check out this workout! #gym",
"privacy": "PUBLIC_TO_EVERYONE",
"disable_duet": false,
"disable_stitch": false
}
}
Get Video Stats
{
"tool": "get_video_stats",
"arguments": {
"video_id": "7123456789012345678"
}
}
Privacy Levels
| Level | Description |
|---|---|
SELF_ONLY |
Only you can see |
MUTUAL_FOLLOW_FRIENDS |
Mutual followers only |
FOLLOWER_OF_CREATOR |
Your followers only |
PUBLIC_TO_EVERYONE |
Everyone can see |
Video Requirements
- Format: MP4, WebM
- Duration: 3 seconds - 10 minutes
- Size: Max 4GB
- Aspect Ratio: 9:16 (vertical) recommended
Rate Limits
- Video Posts: Check TikTok Developer docs for current limits
- API Calls: Varies by endpoint
Environment Variables
| Variable | Required | Description |
|---|---|---|
TIKTOK_CLIENT_KEY |
Yes | App client key |
TIKTOK_CLIENT_SECRET |
Yes | App client secret |
TIKTOK_ACCESS_TOKEN |
Yes | User access token |
TIKTOK_REFRESH_TOKEN |
No | For token renewal |
Claude Desktop Configuration
{
"mcpServers": {
"tiktok-creator": {
"command": "tiktok-creator-mcp",
"env": {
"TIKTOK_CLIENT_KEY": "your_key",
"TIKTOK_CLIENT_SECRET": "your_secret",
"TIKTOK_ACCESS_TOKEN": "your_token"
}
}
}
}
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
tiktok_creator_mcp-1.0.0.tar.gz
(345.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tiktok_creator_mcp-1.0.0.tar.gz.
File metadata
- Download URL: tiktok_creator_mcp-1.0.0.tar.gz
- Upload date:
- Size: 345.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4608e01dcad1df844ce3be2ea310aea40978e95e248c713bbb29a8dc5f68a237
|
|
| MD5 |
0554db9585fe99ead16cf8379d305d2a
|
|
| BLAKE2b-256 |
307387c6b5779da364d2a7d8efb6d9e840cbce4fca825547fc1b547f753a46f3
|
File details
Details for the file tiktok_creator_mcp-1.0.0-py3-none-any.whl.
File metadata
- Download URL: tiktok_creator_mcp-1.0.0-py3-none-any.whl
- Upload date:
- Size: 8.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
65341845bd3cc0d010eb07b9760a5d2c932940ca5bdc78b54dc99417460666d7
|
|
| MD5 |
4a4bd642a426a07a043fd0c25e6dfe07
|
|
| BLAKE2b-256 |
45c230b7742ba9fbccf590814729122876453d227b2f16986d66e5a26277af04
|