Skip to main content
Glama

TikTok MCP examples

Allow any AI agent to use the full TikTok interface through this self-hosted MCP. With this MCP you can:

  • Post/schedule videos

  • Manage profile; pfp, display name, and bio

  • Find viral tiktok hooks

  • Track analytics from TikTok Studio

Works with any MCP-compatible agent or CLI(Claude Code, Codex, Hermes Agent, etc.). Maintained by Palmyr

--

You can connect unlimited number of accounts. The agent will keep all TikTok sessions, media, browser profiles, and analytics local.

Tools

Tool

What it does

tiktok_connect

Return a shareable QR login link

tiktok_connect_status

Check whether login completed

tiktok_accounts

List local accounts and session state

tiktok_post

Post or natively schedule a video

tiktok_operation_status

Poll an asynchronous browser job

tiktok_follow

Follow a user

tiktok_like

Like a video

tiktok_delete

Delete a video

tiktok_update_profile

Update a display name or bio

tiktok_update_avatar

Update a profile image

tiktok_analytics

Collect and save post metrics locally

tiktok_series

Read saved performance history and growth

tiktok_hooks

Analyze caption hooks from local history

tiktok_niches

List suggested hook-analysis niches

tiktok_scheduled

List scheduled posts recorded locally

tiktok_cancel_scheduled

Cancel a scheduled post

Related MCP server: tiktok-mcp

Quick start

You need Node.js 18.18+ and Chrome, Edge, or Brave. Add this server to your agent's MCP configuration:

{
  "mcpServers": {
    "tiktok": {
      "command": "npx",
      "args": ["-y", "github:0xArtex/tiktok-mcp"]
    }
  }
}

Restart the agent, then ask:

Connect my TikTok account as [my-brand]

The MCP returns a shareable connect_url. Send it to the human who owns the account; they open it, scan the live TikTok QR, and confirm login while the agent polls the connection.

Important: make sure the agent's VPS/browser and the human's phone to be in the same country or a nearby region, since TikTok may refuse geographically distant QR logins. If they are different, we suggest to use a temporarily VPN/proxy while scanning.

If no installed browser is detected, install Playwright's Chromium once:

npx playwright install chromium

On a Linux VPS without a desktop display, install Xvfb so TikTok receives a headed browser while the human uses the remote link:

sudo apt-get install -y xvfb

Hosted HTTP API

Don't want to run the browser/runtime yourself? Use our hosted x402 API at https://tiktok.palmyr.ai/v1 with AgentCash, Agentic Market, or any x402 client. It is an HTTP API, not a remote MCP server.

npx agentcash@latest add https://tiktok.palmyr.ai
npx agentcash@latest discover https://tiktok.palmyr.ai
npx agentcash@latest check https://tiktok.palmyr.ai/v1/post

AgentCash handles the x402 challenge and USDC payment.

The paid hosted automation API is optional.

Local configuration

Setting

Default

Description

TIKTOK_MCP_DATA_DIR

~/.tiktok-mcp

Local profiles, job state, and analytics

TIKTOK_BROWSER_PATH

auto-detected

Chrome-family browser executable

TIKTOK_HEADLESS

headed on desktop

Set true for headless operation

TIKTOK_CONNECT_RELAY_URL

https://tiktok.palmyr.ai

Ephemeral QR hand-off origin

Development

git clone https://github.com/0xArtex/tiktok-mcp.git
cd tiktok-mcp
npm install
npm test

License

MIT

Available Tools

16 tools
tiktok_accountsList TikTok accountsB

List local persistent TikTok profiles and their session state.

Inputs: tag.

tiktok_analyticsFetch TikTok analyticsB

Scrape post metrics locally and save a time-series sample.

Inputs: account_id (required).

tiktok_cancel_scheduledCancel a scheduled TikTok postC

Cancel a native scheduled post by deleting its held video.

Inputs: account_id (required), operation_id (required).

tiktok_connectConnect a TikTok accountA

Create a shareable TikTok QR login link. Send connect_url to the human and poll tiktok_connect_status while they scan it.

Inputs: account_id (required), tag, country, browser_path, +1 more.

tiktok_connect_statusCheck TikTok connectionC

Check whether the local browser login completed.

Inputs: token (required).

tiktok_deleteDelete a TikTok videoB

Delete one of the connected account's videos.

Inputs: video_url (required), account_id (required).

tiktok_followFollow a TikTok userB

Follow a user from a connected local profile.

Inputs: account_id (required), target_user (required).

tiktok_hooksAnalyze TikTok hooksC

Compare caption openings against mature posts stored locally.

Inputs: tag, niche, caption, account_id, +2 more.

tiktok_likeLike a TikTok videoC

Like a video from a connected local profile.

Inputs: video_url (required), account_id (required).

tiktok_nichesList TikTok nichesA

List suggested account tags for local hook analysis.

Inputs: no named parameters.

tiktok_operation_statusCheck TikTok operationC

Poll a local browser job until done or failed.

Inputs: operation_id (required).

tiktok_postPost or schedule a TikTok videoC

Publish a local video through the connected browser profile, or use TikTok's native scheduler.

Inputs: caption (required), account_id (required), privacy, video_url, +6 more.

tiktok_scheduledList scheduled TikTok postsA

List native scheduled posts recorded by this local MCP.

Inputs: account_id, include_done.

tiktok_seriesRead TikTok performance historyA

Read analytics stored on this device or calculate growth over a time window.

Inputs: account_id (required), hours, video_id.

tiktok_update_avatarUpdate a TikTok avatarB

Set the profile image using a local path, URL, or base64 input.

Inputs: account_id (required), image_url, image_path, image_base64.

tiktok_update_profileUpdate a TikTok profileB

Update the display name, bio, or both through the local browser.

Inputs: account_id (required), bio, display_name.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 16 tools

    Disambiguation4/5

    Most tools have clearly distinct purposes (post, follow, like, delete, update_profile). Some potential confusion exists between tiktok_analytics and tiktok_series (both about analytics) and between tiktok_connect_status and tiktok_operation_status (both about status polling), but descriptions help differentiate them.

    Naming Consistency3/5

    All tools share the tiktok_ prefix, but the suffixes mix verb_noun patterns (cancel_scheduled, update_profile) with bare nouns (scheduled, accounts, analytics). This is readable but not fully consistent; e.g., tiktok_scheduled could be list_scheduled, tiktok_accounts could be list_accounts.

    Tool Count4/5

    16 tools is on the higher end but appropriate for the breadth of TikTok operations: login, posting, scheduling, engagement, profile management, analytics, and content analysis. Each tool addresses a distinct need, so the count is justified.

    Completeness4/5

    Core lifecycles are covered: login/connect, listing accounts, posting/scheduling/canceling, following/liking, deleting, updating profile/avatar, and analytics collection/reading. Obvious gaps exist like commenting, unfollowing, or retrieving video details, but they are workable gaps for a TikTok MCP.

    Maintenance

    ActivityInactive
    ResponsivenessLimited data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      Not graded
      maintenance
      A comprehensive MCP server that enables AI assistants to search, download, and analyze TikTok content while also performing active tasks like publishing videos and interacting with posts. It provides full automation capabilities for TikTok through browser session management and anti-detection features.
      12
      2
      MIT
    • F
      license
      B
      quality
      D
      maintenance
      MCP server for TikTok that enables searching videos, users, hashtags, and fetching trending content, user profiles, and video details via official API or public scraping.
      8
      -
    • A
      license
      A
      quality
      D
      maintenance
      MCP server for TikTok that publishes videos to your own TikTok account and retrieves video performance metrics through TikTok's official Content Posting and Display APIs.
      6
      1
      MIT