Connect CodeBuddy to Xiaohongshu and Douyin with MCP
CodeBuddy can connect to PostToData through its HTTP MCP client. Use your PostToData key, check the account and live operations first, then approve a bounded research request. This is an integration recipe based on the client documentation, not a claim of a marketplace partnership.
Documentation reviewed: 2026-11-14 · By PostToData
Configure a personal MCP connection
Install CodeBuddy following its own documentation. Set POSTTODATA_API_KEY in the environment used to launch CodeBuddy, using the key from your PostToData dashboard. Run the configuration below in a private terminal; the literal environment reference avoids putting the key in shell history. Do not paste the actual key into a chat or commit it to a repository.
The command adds a user-scoped HTTP server. After reconnecting, inspect the discovered tools. Client versions and enterprise policies can affect connection behavior; this guide does not claim a completed end-to-end client test.
Verify first, then approve two searches
Ask the agent to call get_account and list_platforms only. These checks are free. Confirm that Xiaohongshu/search and Douyin/search are available and inspect the current prices below. An account check is not permission to start fetching social data.
For a first task, ask for one search per platform for 露营咖啡, with at most five results each. Require original URLs, collection time, observed differences and an explicit note that the sample is small. Approve each call with max_price_usd equal to the quoted price. No pagination, follow-up comments or retries without a new budget.
CodeBuddy and WorkBuddy are different client surfaces
These commands configure CodeBuddy CLI. Do not assume the same settings path exists in every WorkBuddy edition. In a client that supports custom remote MCP, use the same PostToData HTTPS endpoint with the transport and authentication supported by that client.
Successful data requests consume prepaid PostToData credit. CodeBuddy or model-provider charges are separate. A missing tool or a failed connection should be diagnosed before spending data credit.
Connection setup
codebuddy mcp add-json --scope user posttodata '{"type":"http","url":"https://posttodata.com/mcp","headers":{"Authorization":"Bearer ${POSTTODATA_API_KEY}"}}'
codebuddy mcp listExample sources and documentation
Current prices & implemented operations
| Operation | Per successful call | 1,000 successful calls |
|---|---|---|
| Xiaohongshu (RedNote) · Search posts | $0.03 | $30.00 |
| Douyin · Search posts | $0.03 | $30.00 |
The 1,000-call figure is list price multiplied by calls, not 1,000 records or a top-up package. The example only previews the first operation: no upstream fetch or charge. To retrieve data, remove dry_run=1 and supply Authorization: Bearer API_KEY. Keep max_price_usd to reject a price above the approved amount.
curl --get "https://posttodata.com/v1/xiaohongshu/search" \
--data-urlencode 'query=露营咖啡' \
--data-urlencode 'limit=5' \
--data-urlencode 'max_price_usd=0.03' \
--data-urlencode 'dry_run=1'A per-call ceiling is not a shared budget for the whole task. Bound the number of approved calls and stop on 402, 412 or 429; do not automatically raise limits or rotate accounts.
Frequently asked questions
Can this read private social accounts?
No. PostToData reads supported public data. You authenticate to PostToData; do not supply social account cookies.
Does copying this command install the CLI or make paid calls?
No. Install the client separately. The command configures a connection; approve data calls only after reviewing the live operation prices.
Related guides
- Twitter/X API Alternative for AI Agents & Developers
- Connect Bluesky Search to n8n with One HTTP Request
- Send Reddit Search Results to Google Sheets
- Paginate Reddit Keyword Search with a Fixed API Budget