threads-lyr
Provides read-only access to public Threads.net profiles and threads via anonymous scraping, with tools for profile info, user threads, and session management.
README
<!-- T2I HERO SPEC — Subject: a Threads data engine — a threaded conversation strand (spiral threads) feeding posts through a pipeline into structured JSON for agents. Composition: thread helix → extraction → JSON cards. Palette: threads off-white #111111 / #f5f5f4 → dark slate → accent purple. Style: dark flat vector, helix motif, no text. 16:9. -->
<p align="center">
<img src="https://img.shields.io/badge/python-3.11+-2b6cb0?style=flat&logo=python&logoColor=white" alt="Python 3.11+">
<img src="https://img.shields.io/badge/uv-0.6%2B-7c3aed?style=flat&logo=astral&logoColor=white" alt="uv">
<img src="https://img.shields.io/badge/license-MIT-059669?style=flat" alt="MIT">
</p>
<h1 align="center">threads-lyr</h1>
<p align="center"> <strong>A Threads.net MCP server for AI agents</strong> — read public profiles and recent threads the same way an anonymous visitor would. No login, no cookies, no session state, no Threads API app. </p>
<p align="center"> <code>curl -fsSL https://raw.githubusercontent.com/ishan-parihar/threads-lyr/main/install.sh | bash</code> </p>
What it does
get_threads_profile— bio, follower/following/post counts for any public profileget_user_threads— recent public threads (text, url, created_at, engagement)close_session— release scrape clients- Agent-first CLI — AXI-compliant (
--list-tools,--tool-info,--json,--hook,--install-hook,--install-skill) - Two MCP transports — stdio and streamable-http
Threads posts and profiles are public, so the client fetches threads.net/@username
directly — Chrome TLS impersonation gets through, no credentials required. Cloned from
facebook-lyr and stripped to Threads only.
Why anonymous scraping?
The official Threads API requires Meta app registration and access tokens, and writing tools need authorized credentials. For reading public content, that's heavy machinery for a problem an anonymous fetch already solves.
curl_cffiwith Chrome TLS impersonation defeats JA3 fingerprint detection.- Profiles and feeds are parsed from Threads' embedded JSON with a resilient deep-scan — no fragile selectors.
- Tools are annotated
readOnlyHintso agents know not to attempt writes.
Quick install
./install.sh # or: uv sync
uv run threads-lyr --status # anonymous — always valid
Direct CLI tool execution
uv run threads-lyr get_threads_profile --username zuck
uv run threads-lyr get_user_threads --username zuck --limit 10
uv run threads-lyr get_user_threads --username zuck --limit 5 --json
uv run threads-lyr --list-tools
MCP server
Spawn with no args on a pipe (as Claude Code / other MCP clients do):
threads-lyr # starts the JSON-RPC stdio server
For the streamable-http transport:
TRANSPORT=streamable-http PORT=8000 threads-lyr
Honest platform limits
- Read-only. Publishing on Threads requires the official Threads API — out of scope for anonymous scraping.
- Anonymous. Only public profiles are reachable; private profiles return not-found/empty.
Layout
threads_mcp_server/
scraping/ curl_cffi Chrome-impersonation client + embedded-JSON parsers
tools/ FastMCP tool registration (threads_tools.py)
server.py FastMCP server assembly
cli_main.py AXI-compliant CLI
config/ layered config (CLI args > env > defaults)
Visual proof
| Profile | Threads feed | MCP tools |
|---|---|---|
![]() |
![]() |
![]() |
Related CLI Tools
This project is part of a family of agent-friendly CLI tools for social platforms:
| Tool | CLI | Repo |
|---|---|---|
instagram-lyr |
ishan-parihar/instagram-lyr | |
| Threads | threads-lyr |
ishan-parihar/threads-lyr |
facebook-lyr |
ishan-parihar/facebook-lyr | |
reddit-lyr |
ishan-parihar/reddit-lyr | |
linkedin-lyr |
ishan-parihar/linkedin-lyr | |
| Twitter/X | twitter-lyr |
ishan-parihar/twitter-lyr |
| Discord | discord |
ishan-parihar/discord-cli |
| Telegram | tg |
ishan-parihar/tg-cli |
License
MIT — see LICENSE.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。


