Threads API MCP Server
Provides tools for interacting with a user's Threads account via the Meta Threads Graph API, including fetching profile info, recent posts, post details, engagement analytics, and replies.
Click on "Install 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 API MCP Servershow me my recent Threads posts with their engagement metrics"
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 API MCP Server
A lightweight, production-ready FastMCP server in Python that interfaces with the Meta Threads Graph API (https://graph.threads.net/v1.0).
This server exposes specialized MCP tools for AI agents (such as Hermes Agent, Claude Desktop, Cursor, or Antigravity) to fetch profile details, inspect recent posts, retrieve post engagement analytics (views, likes, replies, reposts, quotes), and traverse conversation reply trees.
Features & MCP Tools
Tool Name | Parameters | Description |
| None | Retrieves authenticated user ID, username, bio, avatar URL, and web profile URL. |
|
| Fetches recent user posts with full text, media type, timestamps, permalinks, and pagination cursor. |
|
| Retrieves detailed metadata for a single Threads post. |
|
| Returns breakdown of views, likes, replies, reposts, and quotes for a given post. |
|
| Fetches aggregated account-level metrics over a timeframe. |
|
| Retrieves top-level and nested replies for a post. |
|
| Exports posts as a flat, clean JSON list ready for archiving or vector embedding indexing. |
Related MCP server: meta-mcp
Tech Stack & Architecture
Python 3.11+ managed with
uvMCP SDK:
mcp(FastMCP interface)HTTP Client:
httpx(async client with exponential backoff & rate limit handling)Validation & Schemas:
pydanticv2Configuration:
pydantic-settings/.env
Quickstart & Setup
1. Prerequisites
Ensure you have Python 3.11+ and uv installed:
# Verify uv installation
uv --version2. Environment Configuration
Copy the sample .env.example file and provide your Meta Threads Graph API credentials:
cp .env.example .envEdit .env:
# Meta Threads User Access Token (Required)
THREADS_ACCESS_TOKEN=your_long_lived_threads_token_here
# User ID (Optional, default: "me")
THREADS_USER_ID=me
# API Base URL (Optional)
THREADS_API_BASE_URL=https://graph.threads.net/v1.0To obtain a long-lived Threads Access Token, create an application in theMeta for Developers Portal, add the Threads API use case, and grant the following permissions:
threads_basicthreads_content_publishthreads_read_repliesthreads_manage_repliesthreads_manage_insights
Running the Server
Stdio Transport (Standard MCP)
uv run python -m threads_mcp.serverOr using the CLI entrypoint:
uv run threads-mcpAgent Configurations
1. Hermes Agent (~/.hermes/config.yaml)
mcp_servers:
threads:
command: "uv"
args:
- "--directory"
- "/absolute/path/to/threads-mcp"
- "run"
- "python"
- "-m"
- "threads_mcp.server"
env:
THREADS_ACCESS_TOKEN: "your_long_lived_threads_token_here"2. Claude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"threads": {
"command": "uv",
"args": [
"--directory",
"C:\\Users\\Влад\\Desktop\\treads-mcp",
"run",
"python",
"-m",
"threads_mcp.server"
],
"env": {
"THREADS_ACCESS_TOKEN": "your_long_lived_threads_token_here"
}
}
}
}Running Tests
Run the test suite with uv run pytest:
uv run pytest tests/ -vError Handling
OAuth & Auth Expiration (401 / code 190): Caught and returned as readable instructions to refresh tokens.
Rate Limiting (429 / codes 4, 17, 32, 613): Automatic exponential backoff retries.
Unsupported Insights: Gracefully handles media types that do not support specific insight metrics without crashing.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceManage Threads and Bluesky social media from AI assistants. Schedule posts, check analytics, and automate follow-up replies.3MIT
- AlicenseAqualityCmaintenanceEnables AI assistants to manage Instagram and Threads accounts — publish content, handle comments, view insights, search hashtags, and manage DMs through the Meta Graph API.594610MIT
- AlicenseAqualityDmaintenanceScrape and analyze replies from any public Threads post right from your AI coding agent.4MIT
- AlicenseCqualityFmaintenanceEnables professional Threads management with enterprise-grade analytics, AI-powered content optimization, and automation features, including posting, scheduling, audience insights, and bulk operations.453812MIT
Related MCP Connectors
Social media analytics, post insights, and competitor benchmarking for AI agents.
Instagram for AI agents: publish, read comments and DMs, insights, and engage from your account.
Twitter/X, Instagram, Reddit & TikTok data for AI agents. Billions of posts. No API keys.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/VladMontana/treads-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server