toktokdata.live

最後更新

MCP 伺服器

讓 Claude、Cursor、VS Code 與其他 MCP 用戶端讀取 toktokdata.live 的排行榜、創作者與 LIVE 場次。伺服器在你的電腦上執行,使用你的金鑰呼叫 API,並提供唯讀工具。

需求

  • Node.js 20 或更新版本。用戶端會以 npx -y @toktokdata.live/mcp 啟動伺服器,並透過 stdio 與其通訊;我們不會替你代管任何服務。
  • 放在 TOKTOKDATA_API_KEY 中的 API 金鑰,並具備你要使用之工具的權限範圍(請參閱身分驗證)。請為每個 AI 代理建立獨立的金鑰,以便追蹤其用量並單獨撤銷。

設定用戶端

將伺服器加入你的用戶端,並把 ttk_live_... 換成你的金鑰。之後重新啟動用戶端;工具會以 toktokdata 名稱出現。

{  "mcpServers": {    "toktokdata": {      "command": "npx",      "args": ["-y", "@toktokdata.live/mcp"],      "env": { "TOKTOKDATA_API_KEY": "ttk_live_..." }    }  }}
用戶端設定檔位置
Claude Desktop~/Library/Application Support/Claude/claude_desktop_config.json · %APPDATA%\Claude\claude_desktop_config.json
Claude Codeclaude mcp add
Cursor.cursor/mcp.json · ~/.cursor/mcp.json
VS Code.vscode/mcp.json
Windsurf~/.codeium/windsurf/mcp_config.json

在 Windows 上,部分用戶端需要透過 cmd 啟動 npx:

json
"command": "cmd","args": ["/c", "npx", "-y", "@toktokdata.live/mcp"]

工具

每個工具會呼叫 API 的一個讀取端點並回傳其 JSON。AI 代理會依你的問題挑選工具;若金鑰缺少某個工具的權限範圍,該工具會回傳 403。

群組工具權限範圍
排行榜rankings_official rankings_regions rankings_history rankings_day_barsrank:read
創作者creators_search creators_get creators_analysis creators_changes creators_followers creators_following creators_insightscreator:read
創作者的頂級送禮者creators_giftersgifter:read
創作者影片creators_videoscontent:read
直播公會agencies_list agencies_getcreator:read
洞察insights_best_time insights_presencecreator:read
影片videos_get videos_commentscontent:read
趨勢trends_listtrend:read
禮物gifts_listlive:read
送禮者gifters_listgifter:read
LIVE 場次live_sessions live_session live_session_timeline live_sessions_compare live_performance live_commentslive:read
帳號account_usage account_entitlementskeys:manage
唯讀
伺服器不提供提醒規則、匯出、直播狀態更新或 API 金鑰相關的工具,因此 AI 代理無法變更你的工作區。這些操作請使用 API 或 SDK。

點數與限制

每次工具呼叫都是使用你的金鑰發出的 API 請求。它消耗的點數與計入的速率限制,都和你自己呼叫該端點時相同,並會顯示在設定 → 使用量中。AI 代理可能會呼叫多個工具來回答一個問題;account_usage 可讓它得知工作區已花費多少點數。

提示範例

  • 目前越南每小時 LIVE 榜單前 10 名的創作者是誰?
  • 比較 room.one 最近三場直播,告訴我哪一場賺到最多鑽石。
  • 在印尼什麼時候開播最好?當地有哪些正在上升的趨勢?

對於第一個問題,AI 代理會以 hourly 榜單、地區 VN 與上限 10 呼叫 rankings_official。

疑難排解

症狀解決方法
每個工具都回覆尚未設定 TOKTOKDATA_API_KEY請在用戶端設定的 env 區塊中設定 TOKTOKDATA_API_KEY,然後重新啟動用戶端。
spawn npx ENOENT 或伺服器始終沒有啟動請安裝 Node.js 20 或更新版本。在 Windows 上,如果用戶端仍找不到 npx,請依下方方式透過 cmd 啟動。
401 unauthorized金鑰輸入錯誤、已撤銷或已過期。請建立新金鑰並更新設定。
403 insufficient_scope 或 module_not_entitled金鑰缺少該工具的權限範圍,或方案未包含其模組。請為金鑰加入權限範圍,或升級方案。
402 credit_cap_exceeded工作區已用完本期點數。請儲值,或等待每月點數額度發放。
429 速率限制錯誤AI 代理呼叫工具的速度超過了金鑰的速率限制。請要求它一次少呼叫幾個工具,或等待 Retry-After 指定的時間。
這個頁面對你有幫助嗎?