TikTok organic analytics — video performance, engagement metrics, and profile insights.
MCP server for TikTok organic analytics — video performance, engagement metrics, and profile insights via the TikTok Developer API.
Built for Claude Code and any MCP-compatible AI tool. Gives your AI assistant direct access to your TikTok account data — videos, views, likes, comments, shares, and follower stats.
Part of The SEO Engine toolkit by Rex Jones — AI-powered SEO and social media tooling for agencies and businesses.
Single account:
{
"mcpServers": {
"tiktok-organic": {
"command": "npx",
"args": ["-y", "tiktok-organic-mcp"],
"env": {
"TIKTOK_ACCESS_TOKEN": "your_access_token"
}
}
}
}
Multiple accounts:
{
"mcpServers": {
"tiktok-organic": {
"command": "npx",
"args": ["-y", "tiktok-organic-mcp"],
"env": {
"TIKTOK_ACCOUNTS": "[{\"name\":\"mybrand\",\"access_token\":\"act.xxx\",\"client_key\":\"abc123\",\"refresh_token\":\"rft.xxx\"},{\"name\":\"otherbrand\",\"access_token\":\"act.yyy\",\"client_key\":\"def456\",\"refresh_token\":\"rft.yyy\"}]"
}
}
}
}
git clone https://github.com/lanternrow/tiktok-organic-mcp.git
cd tiktok-organic-mcp
npm install
npm run build
Then add to your Claude Code MCP settings:
{
"mcpServers": {
"tiktok-organic": {
"command": "node",
"args": ["/path/to/tiktok-organic-mcp/dist/index.js"],
"env": {
"TIKTOK_ACCESS_TOKEN": "your_access_token"
}
}
}
}
user.info.basic — profile name, avataruser.info.profile — bio, verification statususer.info.stats — follower/following counts, total likesvideo.list — access to video listing and metricshttps://www.tiktok.com/v2/auth/authorize/
?client_key={your_client_key}
&scope=user.info.basic,user.info.profile,user.info.stats,video.list
&response_type=code
&redirect_uri={your_redirect_uri}
POST https://open.tiktokapis.com/v2/oauth/token/
Content-Type: application/x-www-form-urlencoded
client_key={client_key}
&client_secret={client_secret}
&code={auth_code}
&grant_type=authorization_code
&redirect_uri={redirect_uri}
access_token and refresh_token from the responseTip: Access tokens expire after 24 hours. Use the
refresh_tokentool or setTIKTOK_REFRESH_TOKENto enable automatic renewal.
Monitor multiple TikTok accounts from a single MCP server. Set the TIKTOK_ACCOUNTS environment variable as a JSON array:
[
{
"name": "mybrand",
"access_token": "act.xxx",
"client_key": "abc123",
"refresh_token": "rft.xxx"
},
{
"name": "otherbrand",
"access_token": "act.yyy",
"client_key": "def456",
"refresh_token": "rft.yyy"
}
]
Each account object requires:
name — a unique label you pick (used in tool calls)access_token — the OAuth access tokenOptional:
client_key — needed for token refreshrefresh_token — needed for token refreshUsing accounts in tools: Every tool accepts an optional account parameter. If omitted, the first account in the array is used as default.
get_user_info(account: "mybrand")
get_videos(account: "otherbrand", max_count: 10)
Backward compatible: If you only have one account, the legacy single-env-var format (TIKTOK_ACCESS_TOKEN) still works. It creates a default account named "default".
| Tool | Description |
|---|---|
list_accounts | List all configured TikTok accounts and the default |
| Tool | Description |
|---|---|
get_user_info | Profile metadata: username, bio, follower/following counts, total likes, video count, verification status |
get_videos | Paginated list of public videos with engagement metrics (views, likes, comments, shares) |
get_video_details | Detailed metrics for specific video IDs (batch up to 20) |
| Tool | Description |
|---|---|
refresh_token | Exchange refresh token for a new access token (requires client_key and refresh_token in account config) |
All read and utility tools accept an optional account parameter to target a specific account.
src/
index.ts # MCP server entry point, tool registration
accounts.ts # Multi-account resolution and configuration
client.ts # TikTok API HTTP client (native fetch, no dependencies)
types.ts # TypeScript interfaces for API responses
tools/
user.ts # get_user_info
videos.ts # get_videos, get_video_details
utils.ts # refresh_token
fetch| Variable | Required | Description |
|---|---|---|
TIKTOK_ACCOUNTS | Yes | JSON array of account objects (see Multi-account support section) |
| Variable | Required | Description |
|---|---|---|
TIKTOK_ACCESS_TOKEN | Yes | OAuth access token from Login Kit flow |
TIKTOK_CLIENT_KEY | For refresh | App Client Key (needed for token refresh) |
TIKTOK_REFRESH_TOKEN | For refresh | Refresh token (needed for token refresh) |
npm run dev # Watch mode — recompiles on save
npm run build # Production build
npm start # Run the server
Issues and PRs welcome. If TikTok changes their API, please open an issue.
MIT — see LICENSE.
Built as part of The SEO Engine by Rex Jones.
Source-derived launch command. Check the maintainer’s required arguments and credentials before running:
npx -y tiktok-organic-mcpMerge this template into ~/Library/Application Support/Claude/claude_desktop_config.json. Keep existing servers. Add any arguments, credentials, and permissions required by the maintainer; this template has not been install-tested.
{
"mcpServers": {
"io-github-lanternrow-tiktok-organic-mcp": {
"command": "npx",
"args": [
"-y",
"tiktok-organic-mcp"
]
}
}
}Restart Claude Desktop completely for changes to take effect. Confirm the server appears connected in the client’s tool list, then try a read-only example from its documentation.
Claude Desktop setup referencetiktok-organic-mcpnpmio.github.lanternrow/tiktok-organic-mcp works with any MCP-compatible client. Copy the config snippet from the Configuration section above and add it to the file shown for your client, then restart the application.
~/Library/Application Support/Claude/claude_desktop_config.jsonRestart Claude Desktop completely for changes to take effect.~/.cursor/mcp.jsonRestart Cursor for changes to take effect..vscode/mcp.jsonReload VS Code window for changes to take effect.~/.codeium/windsurf/mcp_config.jsonRestart Windsurf for changes to take effect..mcp.jsonSave at the project root, then start Claude Code in that project and review the MCP server approval prompt. Keep real credentials out of shared files.