Claude Code · MCP

Douyin, TikTok and Xiaohongshu data in Claude Code

Claude Code supports remote MCP servers natively. Run one command to connect https://xtikapi.com/v1/mcp, then ask in your terminal what is going viral on Douyin for a topic, or have it write a script that pulls data every day. Claude Code asks before every paid call.

Get an API key

Connect the MCP server

With --scope user it works in every project; without it, only in the current one.

  1. Run the first command below.
  2. Type /mcp in Claude Code and sign in to xtikapi: your browser opens this site; sign in, click Allow, and the 4 tools show up in the terminal.
  3. No browser (say, on a server)? Create a key with a spend limit in the console and use the second command instead.
  4. Ask: "What are the 10 most-liked recent Xiaohongshu notes about camping?"
Terminal
# Sign in
claude mcp add --transport http --scope user xtikapi https://xtikapi.com/v1/mcp

# Or with a key
claude mcp add --transport http --scope user xtikapi https://xtikapi.com/v1/mcp \
  --header "Authorization: Bearer YOUR_API_KEY"

Writing code: install the Skill

When Claude Code writes code that calls the API, this Skill tells it how auth, paging, billing and errors work.

  1. Run the command below to save the Skill under ~/.claude/skills.
  2. Tell Claude Code: "Write a Python script that saves the Douyin trending list to CSV every day."
Terminal
mkdir -p ~/.claude/skills/xtikapi-social-data
curl -o ~/.claude/skills/xtikapi-social-data/SKILL.md https://xtikapi.com/skill.md

What people build with it

  • Find what is going viral on a topic

    "Search Douyin for camping and list the top 10 by likes." Claude Code runs find, then one search call.

    Endpoints: Douyin video search API ($0.02)

    Cost: $0.02; find is free.

  • Write a trending-list archiver

    With the Skill installed, have it write a script that stores Weibo hot search in SQLite daily.

    Endpoints: Weibo hot search API ($0.002)

    Cost: $0.06 a month once it runs.

Platforms it can read

Questions

Will Claude Code keep calling and spending?

call is not marked read-only, so Claude Code asks before each call unless you choose to always allow it. Add the key’s spend limit and call’s max_price_usd and you have three stops.

Where is the key stored? Will it end up in git?

With sign-in there is no key to store: Claude Code keeps the credentials and renews them. With a key and --scope user, it lives in your user-level Claude config, outside the project and out of git; --scope project writes the project’s .mcp.json, so do not put the key there in plain text.

What does it cost in Claude Code?

Claude Code bills you as usual; XTikAPI charges per call, from $0.002 depending on the endpoint. You pay only when the platform answers; errors and timeouts are free. New accounts get $0.50 of trial credit with no card.

Do I need a Douyin or Xiaohongshu account?

No. No platform login, cookie or QR scan, only an XTikAPI API key. It reads public data, so none of your own accounts can be banned for automation.

Can a runaway workflow drain my balance?

Give this tool its own key with a spend limit in the console; at the limit that key stops and your other keys keep working. The balance is prepaid, so it stops at zero and never runs into debt.

Which platforms can it read?

19 platforms and 229 endpoints: Douyin, Xiaohongshu, TikTok, Kuaishou, Bilibili, Weibo, WeChat, Zhihu, YouTube, Instagram, X, Reddit and more. Posts, comments, accounts and trends come back in one shape, so switching platforms does not break the steps after it.

Sources

The steps follow Claude Code's own docs:

Other integrations