Use okdata in Trae: real social data while the agent codes
Paste one JSON block into Trae's MCP settings and its agent can fetch real posts, comments and hot lists from 17 platforms while it builds your app.
The address Trae connects to https://api.okdata.online/mcp
One address and one header: your API key as a bearer token.
Building a dashboard or a scraper replacement in Trae? With okdata connected, the agent can pull one real page of data, look at its fields with describe, and write the code against it instead of inventing sample data. You see the price of every paid call before it runs.
Connect it
- Open the place MCP servers are added. Settings (设置) → MCP → Add (添加) → Create Manually (手动添加), paste the JSON, then Confirm (确认). In the Agent window, pick Local or Cloud first.
- Paste the configuration. Replace the key placeholder with your own key.
Manual configuration { "mcpServers": { "okdata": { "url": "https://api.okdata.online/mcp", "headers": { "Authorization": "Bearer okd_…" } } } } - Ask it to list the tools. The reply should match the one below.
Check it works
“List the okdata tools.”
okdata is connected with 5 tools: find describe the data you need in words; get up to five capabilities with what they need, the price and a ready call. It never offers another platform in place of the one asked for; describe read the full contract of one to five capabilities: parameters, links taken, price and the most a call can cost, paging, fields and an example item; call fetch one page of data as text: the first lines say what it cost, the balance left and how to get the next page. Failed calls are free; max_price caps a call; read_more read the rest of an answer that was cut at about 20 KB, or the same result in another view, for 24 hours; account balance and the key’s spending limits, a receipt for one call, usage by day or capability; which capabilities are up, even without a key. Only call costs money. The catalog has 214 endpoints on 17 platforms.
None of this costs anything.
A first conversation
“What is on Weibo hot search right now?”
| Tool call | Result | Cost |
|---|---|---|
find {"query":"weibo hot search"} | weibo.trends.list · $0.002 per call · about 50 board entries per page | Free |
call {"capability":"weibo.trends.list"} | One page of about 50 entries | $0.002 |
2 tool calls · 1 charged · $0.002
Then try: “Use okdata to list the top ten trends on X in Japan.”
Tips for Trae
- Let the free tools run without asking. Allow
find,describeandaccount; keepcallon “ask” if you want to approve every charge. - Ask for the cost first. “Tell me what this will cost before you call anything” works in every client.
- Give each client its own key. Create one per app in the console; revoking it then touches nothing else.
- Retries are safe. A resent call with the same
idempotency_keyis never charged twice, and failed calls are free.
What to know about Trae
- A server added under Local works in local and worktree tasks only; one added under Cloud works in cloud tasks only.
- Trae reads timeouts for remote servers from the headers: add
"RUN_MCP_TIMEOUT_MS": "60000"next to Authorization if long searches time out. - A project file
.trae/mcp.jsonworks too, once project-level MCP (项目级 MCP) is turned on. Never commit it with a key in it.
Sources
From Trae's own documentation, read on 2026-11-12. Menus move: if a step differs, the client's page is right.
If something is off
| What you see | Why | Fix |
|---|---|---|
| Trae does not list the okdata tools | It was started before the server was added, or the address differs from the one above. | Check the entry, then restart Trae or start a new chat. |
find works, call says unauthorized | The key did not arrive. find and describe need none, so they still answer. | Check the header is Authorization with Bearer and a key starting with okd_, then restart. |
call says insufficient_balance | The balance does not cover the most this call can cost. Nothing was charged. | Ask it to run account, then top up in the console. |