Use okdata in Claude Desktop: a connector for social data
Connect Claude Desktop to okdata, as a custom connector or through the mcp-remote bridge, and ask about Douyin, Xiaohongshu or X posts in an ordinary chat.
This page gets you to the point where you can open Claude Desktop and ask, in a normal chat, "what are people on Douyin saying about camping gear this week?" Claude checks the Douyin hot list, searches videos, reads the comments under the top few and writes you a summary with links. Every step that costs money shows up in the chat with its price, and you can approve or refuse it.
Before you start
- Claude Desktop, signed in, on the latest version (Claude menu, "Check for Updates…").
- An API key from okdata, starting with
okd_. New keys come with $0.10 of credit. The quickstart explains how to get one.
On other okdata pages we ask you to keep the key in the OKDATA_API_KEY environment variable. Desktop apps opened from the Dock or Start menu do not see the variables in your terminal, so here the key goes into Claude itself (way 1) or into a config file in your home folder (way 2). Never put it in a project folder or a shared document.
Way 1: a custom connector
Use this if your account shows a Request headers section when you add a custom connector. Anthropic calls that section a beta for a limited set of organizations, so you may not have it yet; if you don't, skip to way 2.
- Go to Customize > Connectors, select Add, then Add custom connector. On Team and Enterprise plans an Owner adds it under Organization settings > Connectors instead.
- Name it
okdataand enterhttps://api.okdata.online/mcpas the server URL. - For authentication choose No sign-in.
- Under Request headers, pick
authorizationand enterBearer okd_...with your full key. Include the wordBearerand the space; Claude sends the value exactly as typed. - Click Add.
A connector added this way also works in Claude on the web and on your phone, because the calls go out from Claude's servers rather than your computer. On the Free plan you can add one custom connector.
Way 2: the mcp-remote bridge
The Claude Desktop config file runs local servers. A small open-source program, mcp-remote, turns okdata's remote server into one. It needs Node.js 18 or newer.
- In Claude Desktop open Settings… from the Claude menu, go to Developer and click Edit Config. That opens
claude_desktop_config.json(on a Mac in~/Library/Application Support/Claude/, on Windows in%APPDATA%\Claude\). - Add the server, replacing
okd_...with your key. If the file already has servers, add the"okdata"block inside the existingmcpServers.
{
"mcpServers": {
"okdata": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://api.okdata.online/mcp", "--header", "Authorization:${AUTH_HEADER}"],
"env": { "AUTH_HEADER": "Bearer okd_..." }
}
}
}
- Quit Claude Desktop completely (not just the window) and open it again.
The header is split into AUTH_HEADER on purpose: an argument with a space in it breaks on some Windows setups. The key now sits in that file in plain text, so don't sync the file to shared storage or paste it anywhere.
Check that it worked
Click the + button under the message box and open Connectors. okdata should be there, switched on, with four tools: find, describe, call and account. Ask "What is my okdata balance?" If Claude answers with a number, the key works, and that check is free.
A first prompt to try
Use okdata. Look at today's Douyin hot list, then search Douyin videos about
"camping gear", newest first, one page. Read the comments under the three most
liked videos and tell me what people praise and complain about, with links.
Tell me the cost before each paid step.
What it costs
Looking things up is free: find and describe show the endpoints and their prices without a key, and account shows your balance. Each call costs the endpoint's price. For the prompt above:
- Douyin hot list: $0.002
- One page of Douyin video search: $0.02
- Comments under three videos: $0.002 each
That is {{cost:douyin.trends.list1+douyin.videos.search1+douyin.videos.comments.list*3}} in total, well inside the trial credit. For comparison, one page of Xiaohongshu note search is $0.02. Failed calls are free.
When something goes wrong
unauthorized(401). The key is missing or mistyped. In way 1, check that the header value starts withBearerand that you chose No sign-in; header settings can't be edited, so remove the connector and add it again. In way 2, check theAUTH_HEADERline, then quit and reopen Claude.insufficient_balance(402). Not enough balance for this call. Nothing was charged. Top up and ask again; prices are on the pricing page.rate_limited(429). Too many calls at once. The error carriesretry_after_seconds; Claude can wait that long and repeat the call at no charge.- The connector or its tools don't appear. For way 1, make sure the connector is switched on under + > Connectors for this chat. For way 2, run
node --versionin a terminal (it must print v18 or later), check the JSON for a missing comma, and read the log: on a Mac,tail -n 50 ~/Library/Logs/Claude/mcp-server-okdata.log.
Read next
- The MCP server: the four tools and what to tell Claude about spending.
- Douyin video search: parameters, fields and price.
Updated 2026-11-12