toktokdata.live

Last updated

MCP server

Give Claude, Cursor, VS Code and other MCP clients read access to toktokdata.live rankings, creators and LIVE sessions. The server runs on your machine, talks to the API with your key and exposes read-only tools.

Requirements

  • Node.js 20 or newer. The client starts the server with npx -y @toktokdata.live/mcp and talks to it over stdio; it runs on your machine, not on our servers.
  • An API key in TOKTOKDATA_API_KEY, with the scopes of the tools you want (see Authentication). Create a separate key for each agent so you can follow its usage and revoke it on its own.

Configure your client

Add the server to your client and replace ttk_live_... with your key. Restart the client afterwards; the tools appear under the name toktokdata.

{  "mcpServers": {    "toktokdata": {      "command": "npx",      "args": ["-y", "@toktokdata.live/mcp"],      "env": { "TOKTOKDATA_API_KEY": "ttk_live_..." }    }  }}
ClientWhere the config goes
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

On Windows, some clients need npx started through cmd:

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

Tools

Each tool calls one read endpoint of the API and returns its JSON. The agent picks the tools from your question; a tool whose scope the key lacks answers with a 403.

GroupToolsScope
Rankingsrankings_official rankings_regions rankings_history rankings_day_barsrank:read
Creatorscreators_search creators_get creators_analysis creators_changes creators_followers creators_following creators_insightscreator:read
Creator top gifterscreators_giftersgifter:read
Creator videoscreators_videoscontent:read
Agenciesagencies_list agencies_getcreator:read
Insightsinsights_best_time insights_presencecreator:read
Videosvideos_get videos_commentscontent:read
Trendstrends_listtrend:read
Giftsgifts_listlive:read
Giftersgifters_listgifter:read
LIVE sessionslive_sessions live_session live_session_timeline live_sessions_compare live_performance live_commentslive:read
Accountaccount_usage account_entitlementskeys:manage
Read-only
The server exposes no tools for alert rules, exports, LIVE refresh or API keys, so an agent cannot change your workspace. Use the API or an SDK for those.

Credits and limits

A tool call is an API request made with your key. It spends the same credits and counts against the same rate limits as calling the endpoint yourself, and it shows up under Settings → Usage. An agent may call several tools to answer one question; account_usage tells it how much the workspace has spent.

Example prompts

  • Who are the top 10 hourly LIVE creators in Vietnam right now?
  • Compare the last three LIVE sessions of room.one and tell me which one earned the most diamonds.
  • What is the best time to go LIVE in Indonesia, and which trends are rising there?

For the first one the agent calls rankings_official with the hourly board, region VN and a limit of 10.

Troubleshooting

SymptomFix
Every tool answers that TOKTOKDATA_API_KEY is not setSet TOKTOKDATA_API_KEY in the env block of the client’s config and restart the client.
spawn npx ENOENT or the server never startsInstall Node.js 20 or newer. On Windows, if the client still cannot find npx, start it through cmd as shown below.
401 unauthorizedThe key is mistyped, revoked or expired. Create a new one and update the config.
403 insufficient_scope or module_not_entitledThe key lacks the scope of that tool, or the plan does not include its module. Add the scope to the key or upgrade the plan.
402 credit_cap_exceededThe workspace spent its credits for the period. Top up or wait for the monthly allotment.
429 rate limit errorsThe agent called tools faster than the key’s rate limit. Ask for fewer calls at once, or wait for the time in Retry-After.
Was this page helpful?