SuperAPI AI Directory

tiktok-mcp

Public TikTok data as JSON: profile lookup, account videos, comments and reply threads, and keyword search over videos or creators.

Open website

About this tool

Purpose

The TikTok MCP Server is a hosted Model Context Protocol (MCP) server that provides Claude, Cursor, Windsurf, and other MCP clients with four read-only TikTok tools for reading public TikTok data and returning it as structured JSON. It reads public data visible to logged-out visitors, does not log in, does not post, and does not operate accounts.

Main capabilities

The server provides four tools:

  • Get TikTok profile: look up a public account by username, returning username, nickname, biography, bioLink, verified, language, createTime, avatar URL, as well as integer counts for followers, follows, likes, videos, and friends.
  • Get TikTok posts: retrieve an account's videos by username with pagination (newest first), with one call returning about thirty videos plus pagination information (hasMore, nextPageToken). Each video includes id, description, URL, duration, cover and playable video URL, music, as well as integer counts for likes, comments, shares, plays, favorites, and reposts. hashtags and mentions are present only on some videos.
  • Get TikTok comments: retrieve comments on a public video, or replies under a comment. Each comment includes text, like count, creation time, reply count, and author, with the author carrying links to their profile and videos. pagination.total reports the video's total comment count.
  • TikTok search: search videos or creators by keyword. When type: video, it returns videos and authors with the same structure as the posts tool; when type: user, it returns the creator's username, nickname, bio, avatar, follower count, and more.

The server also provides 2 preset prompt workflows, plus a resource hasdata://tiktok/type, which lists the values that uniquely accept a fixed list parameter, and reads do not count credits. Prompts and resources can be read without an API key.

Usage

Requires an MCP client and an API key created in the HasData dashboard (free to create). This is a remote server, connected via URL plus an x-api-key request header. The server URL is the same for all clients:https://mcp.hasdata.com/mcp?apis=tiktok。 OAuth-capable clients can add the same URL as a connector and sign in, without putting a key in a configuration file. Stdio-only clients can connect through the lightweight launcher in the npm package @hasdata/tiktok-mcp or the PyPI package hasdata-tiktok-mcp. Configuration examples for each client:

  • Claude Desktop uses claude_desktop_config.json to configure the stdio launcher, reading the key from an environment variable.
  • Both Claude Code and Claude Desktop can use the remote URL directly.
  • Cursor is configured in ~/.cursor/mcp.json or .cursor/mcp.json.
  • Windsurf is configured in ~/.codeium/windsurf/mcp_config.json, with the field name serverUrl rather than url.
  • VS Code is configured in .vscode/mcp.json.
  • Codex is configured in ~/.codex/config.toml.
  • Gemini is configured in ~/.gemini/settings.json. When asking a question, just paste the prompt, and the agent will choose the tool itself. Each successful call costs 10 credits, and the model decides how many calls to make.

Use cases

Suitable for research and analysis scenarios that need to read public TikTok profiles, videos, comments, or perform keyword searches through an AI client. Examples: query the @mrbeast profile and calculate the median view count of videos on the first two pages (3 calls, 30 credits); search for creators related to "cold brew coffee" and rank them by follower count (1 call, 10 credits); read the top comments of a video and analyze sentiment (1 call, 10 credits); expand the replies to a top comment (2 calls, 20 credits); search for "asmr" videos and fetch the profiles of the top three authors by view count (4 calls, 40 credits). Pagination is billed for each call.

Pricing and limits

Each successful call costs 10 credits, regardless of response size. The free tier provides 1,000 credits per month (no credit card required), i.e. 100 TikTok calls, reset with the billing cycle. Paid plans start at $59 per month and include 200,000 credits (20,000 calls), with the unit price decreasing as volume increases. The plan also determines concurrency: the free tier has 1 concurrent request, Startup 5, Basic 15, and Growth tiers range from 50 to 500. Non-200 responses are not billed, but successful calls with no results are still billed.

Limitations and error handling

  • Does not include posting, direct messages, followers-only or private content, and does not provide analytics for accounts you do not own.
  • A nonexistent username still returns requestMetadata.status as ok, but the profile object is missing.
  • An incorrect key does not error at connection time, but returns isError: true and 401 Unauthorized text on the first tool call.
  • A missing key causes the connection itself to fail with 401.
  • Parameters that do not match the tool schema are rejected before scraping, returning isError: true and MCP error -32602.
  • Identifiers rejected by the platform return 400 and set requestMetadata.status to error.
  • In tool call results, the scraped data is located in the .json field after parsing result.content[0].text.

Compliance

HasData only accesses public data. Platform terms may restrict automated access, and users are responsible for their own compliance. If the collected data contains personal information, you must ensure there is a legal basis under GDPR, CCPA, or equivalent local rules.

Other notes

The apis query parameter determines which tools are visible to the agent. Pass a provider name such as tiktok or an API name such as tiktok_search; spelling errors are ignored; if all are incorrect, it returns 400 and lists the valid values; omitting the parameter exposes all 57 HasData tools. It can be combined with other HasData APIs such as Instagram, e.g. ?apis=tiktok,instagram. The repository itself is the configuration and documentation for the remote server, with no build step.