Tiktok Organic Mcp

io.github.lanternrow由 GitHub 帳號 lanternrow 發布v1.1.1更新於 Oct 24, 2026

TikTok organic analytics — video performance, engagement metrics, and profile insights.

已驗證STDIO僅桌面資料與分析商業與電商

概覽

AI 產生的概覽

一個本機 MCP 伺服器,讓 AI 助理讀取 TikTok 自然流量分析資料:帳號資料、影片清單與單支影片的互動指標。

可以做什麼
列出已設定的 TikTok 帳號與預設帳號,支援以標籤區分多個帳號。讀取帳號資料:使用者名稱、簡介、粉絲與追蹤數、總讚數、影片數與驗證狀態。分頁列出公開影片及觀看、讚、留言、分享等互動指標。依影片 ID 批次取得詳細指標,單次最多 20 支。使用已儲存的用戶端金鑰與更新權杖,為過期的存取權杖續期。
適用情境
當你希望助理回答關於自己 TikTok 帳號自然流量表現的問題時使用,例如近期影片表現如何、粉絲數與互動情形如何變化,而不必手動匯出資料。適合已串接 TikTok 開發者 API 的創作者、代理商與社群媒體團隊。
執行需求
以 npm 套件形式透過 stdio 在本機執行,需要 Node.js 18 或更新版本。需要一個 TikTok 開發者應用程式,加入 Login Kit 產品並取得使用者資訊與影片清單相關權限,以及透過 TIKTOK_ACCESS_TOKEN 提供的 OAuth 存取權杖。權杖更新需要 TIKTOK_CLIENT_KEY 與 TIKTOK_REFRESH_TOKEN;多帳號透過 TIKTOK_ACCOUNTS 設定。需要可連線至 TikTok API 的網路。
安裝前請注意
伺服器需要 OAuth 憑證:TIKTOK_ACCESS_TOKEN,以及選用的 TIKTOK_CLIENT_KEY 與 TIKTOK_REFRESH_TOKEN,這些會存放在 MCP 設定中。存取權杖約 24 小時後過期,持續使用需要更新憑證。帳號資料(包含個人資料與影片指標)會傳送到 TikTok API。除權杖更新外,工具皆為唯讀;更新會變更已儲存的憑證。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Tiktok Organic Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

tiktok-organic-mcp

[npm version] [License: MIT]

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.

Why this exists

  • No open-source TikTok organic MCP existed. Ads MCPs exist. Organic analytics? Nobody built one.
  • Paid alternatives cost money. The commercial options require monthly subscriptions. This is free and open source.
  • Your AI should see your TikTok data. Ask "how are my TikTok videos performing?" and get a real answer.

Quick start

Option 1: npx (no install)

Single account:

json
{  "mcpServers": {    "tiktok-organic": {      "command": "npx",      "args": ["-y", "tiktok-organic-mcp"],      "env": {        "TIKTOK_ACCESS_TOKEN": "your_access_token"      }    }  }}

Multiple accounts:

json
{  "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\"}]"      }    }  }}

Option 2: Clone and build

bash
git clone https://github.com/lanternrow/tiktok-organic-mcp.gitcd tiktok-organic-mcpnpm installnpm run build

Then add to your Claude Code MCP settings:

json
{  "mcpServers": {    "tiktok-organic": {      "command": "node",      "args": ["/path/to/tiktok-organic-mcp/dist/index.js"],      "env": {        "TIKTOK_ACCESS_TOKEN": "your_access_token"      }    }  }}

Getting your TikTok Access Token

Step 1: Create a TikTok Developer App

  1. Go to the TikTok Developer Portal and log in
  2. Click Manage apps → Connect an app
  3. Fill in your app details and submit for review

Step 2: Add Login Kit and request scopes

  1. In your app dashboard, add the Login Kit product
  2. Request these scopes:
    • user.info.basic — profile name, avatar
    • user.info.profile — bio, verification status
    • user.info.stats — follower/following counts, total likes
    • video.list — access to video listing and metrics

Step 3: Complete the OAuth flow

  1. Direct users to TikTok's authorization URL:
    https://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}
  2. Exchange the authorization code for tokens:
    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}
  3. Save the access_token and refresh_token from the response

Tip: Access tokens expire after 24 hours. Use the refresh_token tool or set TIKTOK_REFRESH_TOKEN to enable automatic renewal.

Multi-account support

Monitor multiple TikTok accounts from a single MCP server. Set the TIKTOK_ACCOUNTS environment variable as a JSON array:

json
[  {    "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 token

Optional:

  • client_key — needed for token refresh
  • refresh_token — needed for token refresh

Using 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".

Tools

Account tools

ToolDescription
list_accountsList all configured TikTok accounts and the default

Read tools

ToolDescription
get_user_infoProfile metadata: username, bio, follower/following counts, total likes, video count, verification status
get_videosPaginated list of public videos with engagement metrics (views, likes, comments, shares)
get_video_detailsDetailed metrics for specific video IDs (batch up to 20)

Utility tools

ToolDescription
refresh_tokenExchange 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.

Architecture

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
  • Zero external HTTP dependencies — uses Node 18+ native fetch
  • Multi-account support — monitor multiple TikTok accounts from one server
  • Backward compatible — single-token env var still works
  • Cursor-based pagination — video listing supports pagination via cursor
  • Zod validation — all tool inputs validated with descriptive error messages
  • Batch video queries — get details for up to 20 videos in one request

Environment variables

Multi-account (recommended)

VariableRequiredDescription
TIKTOK_ACCOUNTSYesJSON array of account objects (see Multi-account support section)

Single account (legacy)

VariableRequiredDescription
TIKTOK_ACCESS_TOKENYesOAuth access token from Login Kit flow
TIKTOK_CLIENT_KEYFor refreshApp Client Key (needed for token refresh)
TIKTOK_REFRESH_TOKENFor refreshRefresh token (needed for token refresh)

Development

bash
npm run dev    # Watch mode — recompiles on savenpm run build  # Production buildnpm start      # Run the server

Contributing

Issues and PRs welcome. If TikTok changes their API, please open an issue.

License

MIT — see LICENSE.


Built as part of The SEO Engine by Rex Jones.

來源:README.md,提交 694fba5

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.1.1最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分