← Back to Blog
MindThread Team / / 7 min read

Run a Threads account with an AI agent: the MindThread API and MCP guide, review checklist included

AI agentMindThread APIMCPThreads 自動化Threads automation

This is for anyone who has an AI agent and wants it to run a Threads account. From the API key to a loop that runs every day, everything below happens through the MindThread API or MCP; you never need to open the website. Every step here is what our own agent actually runs while operating @mindthread_offical.

Two ways in

MCP (no code): add https://mindthread.tw/api/mcp to Claude, ChatGPT or any MCP-capable agent, authenticated with Authorization: Bearer mt_live_your_key. 29 tools, named after what they do: get_me, generate_posts, add_library, set_cloud_patrol, list_pending_replies, list_events.

REST API (code): everything sits on https://mindthread.tw/api/v1. The spec is openapi.json; the human version is the developers page. Keys are created in the web app's settings. A key starting with mt_test_ returns mock data and never touches real accounts, which is the right way to dry-run the loop.

Day one: set the account up

GET  /me                          plan, remaining calls, patrol points
GET  /accounts                    get account_id
PATCH /accounts/{id}/settings     persona, schedule_times, content_rules

The persona is free text the model writes in. schedule_times are the daily publish slots, for example "12:30,16:30"; queued items go out in order at those times.

content_rules are a different thing: rules the platform enforces in code, not a prompt.

{
  "content_rules": {
    "max_chars": 220, "min_chars": 80,
    "forbid_cta": true, "forbid_hashtags": true,
    "facts": [
      "accounts posting 5 times a day average 38 views",
      "654 replies earned 729,889 views, 1,116 per reply"
    ],
    "enforce": "block"
  }
}

facts is the important field: every number in a post must come from this list, and any other number is flagged as unverified_number. Another article explains why in full. The short version: telling the model "only use these numbers" in the persona does not stop it from deriving or inventing; the prompt layer never reaches 100%.

The daily loop

  1. Read yesterday: GET /patrol/cloud/stats, GET /patrol/browser/stats, GET /analytics/insights. Views per reply and the top replies tell you whether the keywords are right.
  2. Generate: POST /content/generate with account_id and topic. The account persona wins over any formula template. With content_rules set, the server regenerates until the text complies, up to three model calls, then returns 422 with the exact violations.
  3. Review: the platform cannot do this part for you; checklist below.
  4. Queue: POST /library with status: "queued". GET /library returns each item's position and next_publish_at; PATCH /library/{id} with position: "first" moves one up; POST /library/bulk archives up to 50 old drafts in one call.
  5. Replies: PUT /patrol/cloud with 3 to 5 keywords and enabled: true, and the account starts replying under relevant posts every 15 minutes. For the first week add review_before_reply: true: each drafted reply waits in GET /patrol/cloud/pending until you approve it, optionally with edited text.
  6. Events: register POST /webhooks if you have a public endpoint; otherwise poll GET /events?since=latest_at for patrol.pending, post.failed and token.expiring.

The review checklist: seven things the platform cannot judge

Length, calls to action, hashtags, banned phrases and number provenance are enforced in code. These are not, and an agent should check them before queueing:

This list came out of running our own agent: of the first 12 candidates, 5 were over the length limit, 1 derived a ratio on its own, and 1 invented a causal link. The first two kinds stopped once the rules moved into code; the rest still need a reviewer, human or agent.

Governance: when to turn on review-before-send

Posts have drafts and approval (review_before_publish); replies do too (review_before_reply). For anything attached to a brand account, keep both on for the first week and look at the approval rate before letting go. In our own case, once the keywords were fixed, cloud patrol's relevance went from six wrong out of nine to one wrong out of nine. That is the point at which switching review off becomes reasonable.

FAQ

Is the API paid?
The free plan includes 50 calls and 10 patrol points per day, enough to run the whole loop. Plans and quotas are on the pricing page.

Can the agent connect a new account?
Yes. POST /accounts/connect-link returns a Threads OAuth link; the account owner clicks it once and the account appears under the key.

Who carries the risk of what gets posted?
Cloud patrol goes through Meta's official API with quality gates on our side. Browser patrol runs inside your own browser and is a platform-terms grey area; every API response says so explicitly.

Ready to automate your Threads?

7-day free trial, no credit card required

Start for Free →