threads-mcp
Provides tools for managing Threads profiles, publishing content (text, image, video, carousel), reading posts and replies, and discovering content through the Threads API.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@threads-mcp post a text saying Hello World"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
threads-mcp
A Model Context Protocol (MCP) server for the Threads API. Exposes 26 tools covering profile management, content reading, publishing, replies, and discovery.
Quick Start
1. Get a Threads Access Token
You can start using Threads API immediately for your own account via the Threads Tester — no App Review required for self-use.
Select your Threads App from the app dropdown (or create one at developers.facebook.com/apps with the Threads product)
In the Threads Tester, generate a short-lived token
To get a long-lived token (60 days), call:
curl "https://graph.threads.net/access_token?grant_type=th_exchange_token&client_id=YOUR_APP_ID&client_secret=YOUR_APP_SECRET&access_token=SHORT_LIVED_TOKEN"To refresh a long-lived token before it expires:
curl "https://graph.threads.net/refresh_access_token?grant_type=th_refresh_token&access_token=LONG_LIVED_TOKEN"Note: Long-lived tokens expire after 60 days. Refresh them at least once per 60 days. There is no refresh token — you must always refresh before expiry.
2. Set Environment Variables
export THREADS_ACCESS_TOKEN=your_access_token_here
# Optional: skip the GET /me call at startup by providing your user ID directly
export THREADS_USER_ID=your_threads_user_id3. Run the Server
# Install globally
npm install -g threads-mcp
# Or run directly
npx threads-mcpOr build from source:
git clone https://github.com/your-repo/threads-mcp
cd threads-mcp
pnpm install
pnpm build
THREADS_ACCESS_TOKEN=your_token node dist/index.jsRelated MCP server: meta-threads-mcp
Claude Desktop Configuration
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS):
{
"mcpServers": {
"threads": {
"command": "npx",
"args": ["-y", "threads-mcp"],
"env": {
"THREADS_ACCESS_TOKEN": "your_access_token_here"
}
}
}
}Or if installed globally:
{
"mcpServers": {
"threads": {
"command": "threads-mcp",
"env": {
"THREADS_ACCESS_TOKEN": "your_access_token_here",
"THREADS_USER_ID": "your_user_id_optional"
}
}
}
}Cursor Configuration
Add to .cursor/mcp.json in your project root, or ~/.cursor/mcp.json globally:
{
"mcpServers": {
"threads": {
"command": "npx",
"args": ["-y", "threads-mcp"],
"env": {
"THREADS_ACCESS_TOKEN": "your_access_token_here"
}
}
}
}Tools Reference
Profile Tools
Tool | Description | Required Permission |
| Get your Threads profile (username, bio, follower count) |
|
| Check remaining publishing quota (250 posts/24h) |
|
| Account-level analytics (views, likes, followers) |
|
Content Tools
Tool | Description | Required Permission |
| Paginated list of your posts |
|
| Paginated list of your replies |
|
| Get details of a specific post |
|
| Engagement metrics for a post |
|
| Posts where you've been @mentioned |
|
Publishing Tools
Tool | Description | Required Permission |
| Create/publish a text post |
|
| Create/publish a post with an image |
|
| Create a video post container |
|
| Create a multi-media carousel post |
|
| Publish a container created with |
|
| Check if a video container finished processing |
|
| Delete one of your posts |
|
| Repost another user's thread |
|
| Quote-post another thread with your commentary |
|
Replies Tools
Tool | Description | Required Permission |
| Get direct replies to a post |
|
| Get full conversation thread |
|
| Post a reply to a thread |
|
| Hide or unhide a reply on your posts |
|
Discovery Tools
Tool | Description | Required Permission |
| Search posts by keyword |
|
| Look up a user profile by username |
|
| List posts from any public user |
|
| Search for location tags |
|
| Get details about a location |
|
⚠️ App Review required for
threads_keyword_searchandthreads_profile_discovery. These permissions require Meta's App Review process before they can be used in production. For self-use development, you may be able to use them in Development mode with your own account only.
Publishing Workflow
Text Post (simplest)
Tool: create_text_post
text: "Hello, Threads!"
publish: true ← publishes immediatelyVideo Post (requires polling)
1. Tool: create_video_post
video_url: "https://..."
publish: false ← don't auto-publish; get container ID
2. Tool: get_container_status
container_id: "from step 1"
→ poll until status = FINISHED
3. Tool: publish_thread
container_id: "from step 1"Carousel Post
1. Tool: create_carousel_post
items: [{type: IMAGE, url: "..."}, {type: IMAGE, url: "..."}]
publish: true ← auto-publish carouselRate Limits
Publishing: 250 posts per 24 hours (use
get_publishing_limitto check)API rate limits: Follow standard Meta API rate limits (~200 calls/hour per user for most endpoints)
Video processing: Videos typically take 10–30 seconds; poll with
get_container_status
Security
The
THREADS_ACCESS_TOKENis never logged or included in tool responsesAll outgoing URLs with the token are built internally and never surfaced to the MCP layer
Error messages from the API that may reference the token URL are automatically redacted
Development
pnpm install
pnpm test # run all tests
pnpm test:watch # watch mode
pnpm typecheck # TypeScript check
pnpm build # build dist/Running locally
THREADS_ACCESS_TOKEN=your_token pnpm build && node dist/index.jsVerify tool count
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}' \
| THREADS_ACCESS_TOKEN=test node dist/index.js 2>/dev/null \
| python3 -c "import sys,json; d=json.load(sys.stdin); print(len(d['result']['tools']), 'tools')"Available Tools
26 toolscreate_carousel_postA
Create a carousel post with multiple images or videos. Set publish:true to immediately publish after container creation.
Inputs: items (required), text, publish, reply_control.
create_image_postC
Create a Threads post with an image. Set publish:true to immediately publish.
Inputs: image_url (required), text, publish, reply_control, +1 more.
create_text_postA
Create a text-only Threads post. Set publish:true to immediately publish, or false to get a container_id for later publishing.
Inputs: text (required), publish, reply_control, reply_to_id.
create_video_postA
Create a Threads post with a video. Videos require processing time — use get_container_status to check readiness, then publish_thread when FINISHED.
Inputs: video_url (required), text, publish, reply_control, +1 more.
delete_threadB
Delete a Threads post by ID
Inputs: thread_id (required).
get_account_insightsB
Get insights/analytics for the authenticated user's Threads account
Inputs: metric (required), period (required), breakdown, since, +1 more.
get_container_statusB
Check the processing status of a media container (useful for videos)
Inputs: container_id (required).
get_conversationA
Get the full conversation thread (all replies at any level) for a Threads post
Inputs: thread_id (required), fields, limit, after.
get_locationA
Get details about a specific location tag by its ID
Inputs: location_id (required), fields.
get_mentionsA
Get threads where the authenticated user has been @mentioned
Inputs: fields, limit, after.
get_profileB
Get the authenticated user's Threads profile information
Inputs: fields, user_id.
get_publishing_limitB
Get the current publishing quota usage and limits for the authenticated user
Inputs: fields.
get_repliesC
Get direct replies to a specific Threads post
Inputs: thread_id (required), fields, limit, after, +1 more.
get_threadB
Get details of a specific Threads post by ID
Inputs: thread_id (required), fields.
get_thread_insightsC
Get engagement insights for a specific Threads post
Inputs: thread_id (required), metric (required).
list_my_repliesB
List all replies made by the authenticated user
Inputs: fields, limit, after, before.
list_my_threadsB
List all Threads posts by the authenticated user
Inputs: fields, limit, after, before.
list_profile_postsC
List public Threads posts from a specific user by their user ID
Inputs: user_id (required), fields, limit, after, +1 more.
lookup_profileA
Look up a Threads user profile by username. Requires threads_profile_discovery permission.
Inputs: username (required), fields.
manage_replyB
Hide or unhide a reply on the authenticated user's threads
Inputs: thread_id (required), hide (required).
publish_threadA
Publish a previously created media container. Use after create_*_post with publish:false, or after a video finishes processing.
Inputs: container_id (required).
quote_threadB
Create a quote post that references another thread
Inputs: thread_id (required), text, publish, reply_control.
reply_to_threadA
Post a reply to a Threads post. Creates and immediately publishes a text reply.
Inputs: thread_id (required), text (required), reply_control.
repost_threadB
Repost (share) a Threads post from another user
Inputs: thread_id (required).
search_keywordB
Search Threads posts by keyword. Requires threads_keyword_search permission.
Inputs: q (required), search_type, search_mode, fields, +2 more.
search_locationsA
Search for location tags that can be attached to Threads posts
Inputs: q (required), limit.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 26 tools
Each tool targets a distinct action and resource, with clear descriptions that differentiate overlapping concepts like get_thread vs get_conversation vs get_replies. No two tools are easily confused.
All tools follow a consistent verb_noun pattern in snake_case (e.g., create_text_post, get_thread_insights). No mixing of styles or ambiguous verbs.
With 26 tools, the set is on the higher end but each tool serves a specific and necessary function for the Threads API, covering posting, reading, searching, analytics, and moderation without unnecessary redundancy.
The tool surface covers core CRUD and lifecycle operations for posts, plus searching and analytics. A notable gap is the lack of an update/edit tool for posts, but most workflows are supported.
Maintenance
Related MCP Connectors
Twitter/X read-only MCP server — 12 tools: search, users, tweets, followers, timelines, trends.
Hosted X (Twitter) MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Social media MCP server: your Instagram, TikTok, YouTube, LinkedIn and Threads history for your AI.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA stdio MCP server for the official Threads API, enabling publishing, reading, moderation, insights, discovery, locations, and setup diagnostics.2MIT
- AlicenseAqualityDmaintenanceUnofficial MCP server for Meta's Threads API. Enables LLMs like Claude to publish posts, manage replies, and track insights through the Model Context Protocol.15MIT
- AlicenseAqualityCmaintenanceCustom MCP server for Threads (Meta) — post, reply, and read insights via the official free Threads API.59 npmMIT
- AlicenseAqualityCmaintenanceAn MCP server for Meta's Threads that acts as your own account, enabling reading profiles, posts, replies, timeline, search, and performing actions like posting, replying, liking, following, and scheduling, using a real logged-in browser session.2415 npm3MIT