Skip to Content
tikdataapi.com

MCP server

Give an agent the whole API in one line.

tikdataapi.com serves a hosted MCP server at https://api.tikdataapi.com/mcp. Transport is Streamable HTTP. Nothing to install, nothing to run, and on most clients nothing to paste: the server implements the MCP authorization flow, so a client signs you in through a browser and gets its own credential. A key in the header works too, and is what a client with no browser needs.

Every tool call is one REST request under the hood, at the same price, through the same cache and rate limit. The agent sees credits_charged and balance_remaining in every result.

Connect

Claude Code

claude mcp add --transport http tikdataapi https://api.tikdataapi.com/mcp

Claude.ai and Claude Desktop

Add https://api.tikdataapi.com/mcp as a custom connector in Settings. These clients have no field for a request header, so this is the only route that reaches them.

Cursor, Windsurf, and other clients with an MCP config file

{
  "mcpServers": {
    "tikdataapi": {
      "url": "https://api.tikdataapi.com/mcp"
    }
  }
}

Clients that speak stdio only

The mcp-remote bridge speaks stdio to the client and Streamable HTTP to us, and signs in on the client's behalf.

{
  "mcpServers": {
    "tikdataapi": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://api.tikdataapi.com/mcp"]
    }
  }
}

Connect with a key instead

A client that cannot open a browser — a server, a container, a CI job — sends the key in the same header the REST API takes, or as Authorization: Bearer tt_live_....

claude mcp add --transport http tikdataapi https://api.tikdataapi.com/mcp --header "x-api-key: tt_live_..."
{
  "mcpServers": {
    "tikdataapi": {
      "url": "https://api.tikdataapi.com/mcp",
      "headers": { "x-api-key": "tt_live_..." }
    }
  }
}

For mcp-remote, pass the key through the environment. The header is written with no space after the colon: mcp-remote splits the argument on the first colon, and a space there arrives as part of the key.

{
  "mcpServers": {
    "tikdataapi": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://api.tikdataapi.com/mcp", "--header", "x-api-key:${TIKDATAAPI_KEY}"],
      "env": { "TIKDATAAPI_KEY": "tt_live_..." }
    }
  }
}

Signing in, for people writing clients

An unauthenticated call to /mcp answers 401 with a pointer to the discovery chain, which is all a client needs to obtain its own credential:

StepWhere
The challengeWWW-Authenticate: Bearer resource_metadata="..." on the 401
Protected resource (RFC 9728)https://api.tikdataapi.com/.well-known/oauth-protected-resource
Authorization server (RFC 8414)https://tikdataapi.com/.well-known/oauth-authorization-server
Register a client (RFC 7591)https://tikdataapi.com/api/oauth/register
Approvehttps://tikdataapi.com/oauth/authorize
Exchange the codehttps://tikdataapi.com/api/oauth/token
Disconnect (RFC 7009)https://tikdataapi.com/api/oauth/revoke

Clients are public and PKCE is required, with S256 only. There are no scopes to choose: every tool is read-only and there is one level of access.

What the exchange returns is an ordinary API key named after the app. It appears in the dashboard beside keys you made by hand, spends the same balance at the same prices, and stops the moment you revoke it. It does not expire, and there is no refresh token: it is the same class of credential you mint yourself, with the same revocation story.

Tools

ToolArgumentsCredits
get_useruser (username or sec_uid)1
get_usersusernames[], up to 1001 per profile found
get_user_videosuser, count (default 16, up to 50), cursor1 per video
get_users_videosusers[] (usernames or sec_uids), up to 20, count 1 to 16 (default 3)1 per video
get_videoid1
get_videosids[], up to 1001 per video found
get_commentsvideo_id, count (default 20, up to 50), cursor1 per comment
get_comment_repliesvideo_id, comment_id, count (default 20, up to 50), cursor1 per reply
get_hashtagname1
get_hashtag_videosname, count (default 30, up to 50), cursor1 per video
search_videosquery, count (default 12, up to 50), cursor1 per video
search_usersquery, count (default 10, up to 50), cursor1 per account
get_user_followersuser, count (default 30, up to 50), cursor1 per profile
get_user_followinguser, count (default 30, up to 50), cursor1 per profile
get_user_repostsuser, count (default 16, up to 50), cursor1 per video
get_user_playlistsuser, count (default 20, up to 50), cursor1 per playlist
get_playlist_videosplaylist_id, count (default 30, up to 50), cursor1 per video
get_musicmusic_id1
get_music_videosmusic_id, count (default 30, up to 50), cursor1 per video
get_related_videosvideo_id, count (default 16, up to 16)1 per video
get_trending_videoscount (default 16, up to 50)1 per video
search_musicquery, count (default 12, up to 50), cursor1 per sound
search_livequery, count (default 12, up to 50), cursor1 per room
get_user_liveuser1
get_video_transcriptvideo_id, lang (optional)1
search_hashtagsquery, count (default 10, up to 30)1 per hashtag
get_balancefree

Every tool takes fresh: true to bypass the cache: 2x for an item that has a cached copy, the normal price for one that has none. All tools are read-only and idempotent, and are annotated as such, so clients that auto-approve read-only tools do not prompt on every call.

search_videos uses the general ("Top") search of TikTok and finds videos only. search_users uses the account search of TikTok (the "Users" tab) and gives short profiles; get_user or get_users gives the full, exact profile. search_music uses the sound search of TikTok, and search_live its live search. TikTok gives a logged-out visitor no hashtag search of its own, so search_hashtags reads about 24 videos of the general search and ranks their hashtags, with no next page; its result_videos and result_plays count those videos only, not the totals of TikTok, which get_hashtag gives. A sound is read by its id: the id of the music of a video, or the number at the end of the address of a sound. get_related_videos gives one page with no cursor. get_trending_videos gives the explore feed of TikTok for a logged-out visitor: no cursor, and a new set of videos on each read of TikTok. get_user_live tells whether an account is live now; a live room is data, with no stream URL. get_video_transcript gives the subtitles of a video; a video with no subtitles is a not_found error and costs nothing. Search, the follower lists, sounds, reposts, playlists, related videos, trending videos, live, transcripts and hashtag search are new, and their limits are not measured yet. See What you can read.

Notes

  • The server is stateless. Each request carries the key; there is no session to expire.
  • A REST error (not_found, no_credits, rate_limited) comes back as a tool error with the same JSON body, so the agent can read the code and act on it.
  • Results are the same flat User, Video, Comment, Hashtag, MusicDetail, MusicSummary, Playlist, LiveRoom, Transcript and HashtagSummary objects as the REST API, as JSON text.
  • Keys are per account. Create one key per agent in the dashboard so you can revoke it alone.