loading…
Search for a command to run...
loading…
Scrape and analyze replies from any public Threads post right from your AI coding agent.
Scrape and analyze replies from any public Threads post right from your AI coding agent.
Scrape and analyze replies from any public Threads post — right from your AI coding agent.
An MCP server that lets your AI assistant scrape a Threads post URL, then query and analyze the replies — all through natural conversation.
Instead of:
1. Manually open browser
2. Scroll through hundreds of replies
3. Copy-paste into spreadsheet
4. Manually look for patterns
Just say:
"Analyze the replies on this Threads post: https://www.threads.com/@zuck/post/ABC123"
Your AI agent handles the rest.
| Tool | Description |
|---|---|
scrape_thread(url) |
Scrape all replies from a public Threads post |
get_all_replies() |
Return all scraped replies with username and timestamp |
search_replies(keyword) |
Case-insensitive keyword search across replies |
get_reply_stats() |
Reply count, top commenters, avg length, time range |
git clone https://github.com/ethan-tsai-tsai/thread-analyzer.git
cd thread-analyzer
uv sync
uv run playwright install chromium
Add the server to your MCP client config:
{
"mcpServers": {
"thread-analyzer": {
"command": "uv",
"args": ["run", "--directory", "/absolute/path/to/thread-analyzer", "python", "server.py"]
}
}
}
Add to your project's .mcp.json:
{
"mcpServers": {
"thread-analyzer": {
"command": "uv",
"args": ["run", "--directory", "/absolute/path/to/thread-analyzer", "python", "server.py"]
}
}
}
Or run: claude mcp add thread-analyzer -- uv run --directory /absolute/path/to/thread-analyzer python server.py
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"thread-analyzer": {
"command": "uv",
"args": ["run", "--directory", "/absolute/path/to/thread-analyzer", "python", "server.py"]
}
}
}
Go to Cursor Settings > MCP > Add new MCP Server, then add:
{
"mcpServers": {
"thread-analyzer": {
"command": "uv",
"args": ["run", "--directory", "/absolute/path/to/thread-analyzer", "python", "server.py"]
}
}
}
Add to .vscode/mcp.json in your workspace:
{
"servers": {
"thread-analyzer": {
"command": "uv",
"args": ["run", "--directory", "/absolute/path/to/thread-analyzer", "python", "server.py"]
}
}
}
Add to ~/.codeium/windsurf/mcp_config.json:
{
"mcpServers": {
"thread-analyzer": {
"command": "uv",
"args": ["run", "--directory", "/absolute/path/to/thread-analyzer", "python", "server.py"]
}
}
}
You can also use the scraper directly without MCP:
uv run python scraper.py "https://www.threads.com/@user/post/XXXXX"
# Options
uv run python scraper.py "URL" --output custom.csv --max-scrolls 50
┌─────────────┐ MCP (stdio) ┌──────────────┐ Playwright ┌─────────────┐
│ AI Client │ ◄──────────────────► │ server.py │ ◄──────────────► │ Threads.com │
│ (Claude, │ scrape_thread() │ (FastMCP) │ GraphQL API │ (Meta) │
│ Cursor...) │ get_all_replies() │ │ interception │ │
│ │ search_replies() │ replies.csv │ │ │
│ │ get_reply_stats() │ │ │ │
└─────────────┘ └──────────────┘ └─────────────┘
scrape_thread(url) via MCPget_all_replies(), search_replies(), get_reply_stats() to analyze| Technique | Purpose |
|---|---|
| Custom User-Agent | Mimics real Chrome browser |
navigator.webdriver removal |
Hides automation flag |
AutomationControlled disabled |
Prevents Chromium detection |
| Randomized scroll delays (1.5-4.5s) | Avoids behavioral fingerprinting |
| Early stop on idle scrolls | Mimics natural browsing patterns |
scraper.py may need updatingContributions are welcome! Please open an issue or submit a pull request.
Run in your terminal:
claude mcp add thread-analyzer-mcp-server -- npx Security
Low riskAutomated heuristic from public metadata — not a security guarantee.