Summary
Run a Threads profile from your AI: read posts, replies, whole conversations and mentions, post and account insights, keyword search and public profiles, publish text, image, video and carousel posts and replies, and hide or approve replies. One long-lived Threads user token.
Guided setup
Connect Threads to Microsoft Copilot in 2 minutes
Start a free trial on AnythingMCP Cloud, connect Threads in the guided setup, then add your MCP URL to Microsoft Copilot. No code and no server to run.
No credit card · 7-day trial · Self-host alternative available
Try asking
Example prompts for Threads
Click any prompt to copy it. Paste into Claude, ChatGPT, Cursor, Gemini, Copilot or OpenClaw to run it against this connector.
Claude is AI and can make mistakes. Please double-check responses.
💡 No install? Use cloud.anythingmcp.com directly. Sign in, click Connectors → Threads, paste your credentials, mint an MCP API key and you're done. No Docker, no
git clone, no local server.
Threads + Microsoft Copilot
Run a Threads profile from your AI: read posts, replies, whole conversations and mentions, post and account insights, keyword search and public profiles, publish text, image, video and carousel posts and replies, and hide or approve replies. One long-lived Threads user token.
Prerequisites
See the full setup instructions baked into the connector (visible in the in-app store when you select the connector). The required environment variables for this connector are:
THREADS_ACCESS_TOKEN
Step 1 — Get credentials
Setting up takes about 15 minutes. You need a Meta app with the Access the Threads API use case and a long-lived Threads user token for the profile the connector should act as. It works with any Threads profile that authorized your app, personal accounts included.
- Create a Meta app at developers.facebook.com/apps/creation with the use case Access the Threads API. On the use case's Customize page add the permissions you need:
threads_basic(always),threads_content_publish,threads_read_replies,threads_manage_repliesandthreads_manage_insights, plusthreads_manage_mentions,threads_keyword_search,threads_profile_discovery,threads_location_taggingandthreads_deleteif you use those tools. - While the app is in development, only its own people can authorize it. Add the profile under App roles → Roles → Add People → Threads Tester, then accept the invitation in Threads (Settings → Account → Website permissions → Invites).
- Get a user token: in the Graph API Explorer pick your app, switch the host to
threads.net, choose the permissions and click Generate Threads Access Token. This token lasts one hour. - Exchange it for a long-lived token (60 days) by opening
https://graph.threads.net/access_token?grant_type=th_exchange_token&client_secret=<Threads app secret>&access_token=<short-lived token>. The Threads app secret is under App settings → Basic. Copyaccess_tokenfrom the answer. - Paste it into
THREADS_ACCESS_TOKEN, without the word Bearer (it starts withTH). Install the connector and runthreads_get_profileto check the connection: it returns the profile's user id and handle.
The token lasts 60 days: Threads gives this kind of connector no refresh token, so the token you paste is the only credential. Refresh it before the 60 days are over (and at least 24 hours after it was issued) by opening https://graph.threads.net/refresh_access_token?grant_type=th_refresh_token&access_token=<current token>, then paste the new token into the connector. A token that was not refreshed in time cannot be renewed: repeat steps 3 and 4. The Access Token Debugger shows when a token expires.
Cloud and self-hosted work the same way: you create the token at Meta and paste it in. There is no redirect URL to set in AnythingMCP.
Where to start: threads_get_profile, then threads_list_posts for the profile's posts. Tools that act on the connected profile use me, so you never pass a user id. For replies, threads_list_replies returns the top-level replies to a post and threads_get_conversation everything under it, with replied_to to rebuild the tree. threads_list_mentions and threads_list_my_replies cover the rest of the profile's activity.
Insights: threads_get_post_insights returns views, likes, replies, reposts, quotes and shares of one post; threads_get_account_insights returns profile totals over a period, views per day and, from 100 followers, follower demographics. Insights exist only for the connected profile's own posts.
Discovery: threads_search_posts searches by keyword or topic tag (without the approved threads_keyword_search permission it only searches the profile's own posts; 2,200 searches per 24 hours). threads_lookup_profile and threads_list_profile_posts read public profiles by exact username, and threads_search_locations finds location ids to tag.
Publishing is public at once: the AI shows you the exact text and media and waits for a yes before it posts. A text post or reply is one call, threads_post_text (at most 500 characters; reply_to_id makes it a reply). An image or video post takes threads_create_container with a public media URL, for video threads_get_container_status until it is FINISHED (about 30 seconds on average), then threads_publish. A carousel is 2 to 20 item containers, one CAROUSEL container with their ids and the text, then threads_publish. threads_repost reposts a post. threads_get_publishing_limit shows the quotas: 250 posts, 1,000 replies and 100 deletions per rolling 24 hours.
Moderation: threads_hide_reply hides or unhides a top-level reply on the profile's posts. For posts created with reply approvals, threads_list_pending_replies and threads_manage_pending_reply approve or ignore held replies.
Switched off at install: threads_delete_post (delete a post, reply or repost for good). A deletion cannot be undone, and it needs the threads_delete permission. Switch it on on the connector page only if the AI should delete; it asks you to confirm every call. Publishing, reposting, hiding replies and approving replies are switched on (threads_post_text, threads_create_container, threads_publish, threads_repost, threads_hide_reply, threads_manage_pending_reply).
Paging and ids: lists return data and paging.cursors; the AI passes paging.cursors.after as after until it is missing, with at most 100 items per page. Ids are strings of digits and are passed unchanged. since and until take Unix seconds or dates.
Common errors: 190 means the token expired or was revoked (the user removed the app or changed the password), or it is a Facebook or Instagram token rather than a Threads token: create a new one (steps 3 and 4). 10 or 200 means a permission is missing: add it in the use case and generate the token again. 4, 17, 32 or 613 is rate limiting: wait a few minutes. A container in ERROR usually means Meta could not download the media URL (it must be public and must not redirect) or the format is not supported.
Not covered: other Threads profiles than the one that owns the token (add a second connector for a second profile), and the Facebook and Instagram APIs.
Step 2 — Install the adapter
curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d
Step 3 — Add the connector in Microsoft Copilot
Your server URL: in AnythingMCP, open MCP Servers → the server this connector is on, and copy its URL (
https://cloud.anythingmcp.com/mcp/…). Use it wherever this guide showsYOUR_SERVER_ID.
Microsoft Copilot uses MCP servers through agents built in Copilot Studio: you add AnythingMCP to an agent as a tool, then publish the agent to Microsoft 365 Copilot and Teams. Copilot Studio connects from Microsoft's cloud over Streamable HTTP, which AnythingMCP supports.
- In Copilot Studio, open your agent (or create one), go to Tools and choose Add a tool → New tool → Model Context Protocol.
- Enter a Server name (for example
AnythingMCP), a Server description that says what the connector does, and the Server URLhttps://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID. Copilot Studio uses the description to decide when to call the server. - Under authentication, choose API key, set Type to Header and the header name to
X-API-Key, then select Create. - In Add tool, choose Create a new connection, paste an MCP API key from AnythingMCP (MCP Servers → your server → API keys) and select Add to agent.
- Try it in the agent's Test pane: ask for something that needs the
Threadstools. - Select Publish, then Channels → Microsoft 365 and Microsoft Teams, keep Make agent available in Microsoft Copilot selected and choose Add channel. See agent in Teams installs it for you; in Microsoft 365 Copilot, type @ and pick the agent.
Prefer per-user sign-in? Choose OAuth 2.0 → Dynamic discovery instead of an API key: each user then signs in to AnythingMCP the first time the agent calls it.
Self-hosting? Use your instance's public HTTPS address instead of https://cloud.anythingmcp.com. Copilot Studio connects from Microsoft's cloud, so localhost does not work.
Available tools
| Tool | What it does |
|---|---|
threads_get_profile | The connected Threads profile: id, username, display name, biography, profile picture URL and is_verified |
threads_get_publishing_limit | How much of the rolling 24-hour quotas the profile has used: posts (quota_usage of 250, carousels count once), replies (reply_quota_usage… |
threads_list_posts | List the posts the connected profile published, newest first: id, text, media type and URL, permalink, timestamp, quote and repost links… |
threads_get_post | One Threads post or reply by media id: text, media type and URL, permalink, owner, timestamp, children of a carousel, quoted or reposted… |
threads_list_my_replies | List the replies the connected profile wrote on any post, newest first, with the post each one answers (replied_to, root_post) |
threads_list_mentions | List public posts by other profiles that mention the connected profile (@username), newest first |
threads_list_replies | List the top-level replies to a post (not replies to replies), newest first by default, with username, text, timestamp, hide_status and… |
threads_get_conversation | The whole conversation under a post as one flat list: top-level and nested replies, each with replied_to and root_post so the tree can be… |
threads_list_pending_replies | List replies waiting for approval on a post that was published with reply approvals switched on (enable_reply_approvals).… |
threads_hide_reply | Hide or unhide a top-level reply on one of the connected profile's posts |
threads_manage_pending_reply | Approve or ignore a pending reply (from threads_list_pending_replies) |
threads_get_post_insights | Lifetime engagement of one of the connected profile's posts: views, likes, replies, reposts, quotes and shares |
threads_get_account_insights | Profile-level insights of the connected account over a period: views (per day), likes, replies, reposts, quotes, link clicks and… |
threads_search_posts | Search public Threads posts by keyword or topic tag, most popular (TOP) or most recent (RECENT), optionally only text, image or video posts… |
threads_lookup_profile | Public profile of another Threads user by exact username: name, biography, profile picture, is_verified, follower_count and the likes… |
threads_list_profile_posts | Recent public posts of another Threads profile by exact username, newest first |
threads_search_locations | Find places to tag in a post, by name or by coordinates; returns location ids with name, address, city, country and coordinates |
threads_post_text | Publish a text post, or a text reply, in one step (auto_publish_text): it goes live on the connected profile at once |
threads_create_container | Step 1 of publishing an image, video or carousel post (or reply): create a media container from a public URL |
threads_get_container_status | Status of a media container before publishing: IN_PROGRESS (still processing, check again in a few seconds), FINISHED (ready for… |
threads_publish | Step 2 of publishing: publish a FINISHED media container on the connected profile |
threads_repost | Repost a published Threads post on the connected profile (like the repost button) |
threads_delete_post | Delete one of the connected profile's posts, replies or reposts for good |
Example prompts
- "Which of my Threads posts from the last 30 days got the most views, and how many replies did each get?"
- "Show me the whole conversation under my latest post and summarise what people are asking."
- "Draft a reply to the top question under that post and show it to me before you publish it."
- "How did my profile views and followers change this month?"
- "Find recent Threads posts about our product name and list the accounts that wrote them."
FAQ
What happens when the token expires? Calls fail with error 190. Refresh the token before the 60 days are over with grant_type=th_refresh_token and paste the new one into the connector; after expiry, generate a new token and exchange it again.
Can it delete posts? Only if you switch on threads_delete_post on the connector page and the token has the threads_delete permission. It is switched off at install.
Which Copilot is this for? Microsoft 365 Copilot at work, through agents built in Copilot Studio. The Microsoft Copilot app for personal accounts has no option to add your own MCP server.
What do I need? A work account with access to Copilot Studio (a license or a trial) to build the agent. People who use it in Microsoft 365 Copilot or Teams need access to the agent: share it with them, or ask an admin to publish it to the organization. If your organization applies data policies to Power Platform connectors, they cover MCP servers too.
The agent doesn't call the tools. Check that the header name is exactly X-API-Key and that the key belongs to the same MCP server as the URL, and make the server description specific: Copilot Studio uses it to decide when to call the server. Publish the agent again after each change; in an open chat, type "start over" to get the new version.
Next steps
Was this guide helpful?