Skip to main content
Glama
ishan-parihar

threads-lyr


What it does

  • get_threads_profile — bio, follower/following/post counts for any public profile

  • get_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.

Related MCP server: threads-mcp

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_cffi with 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 readOnlyHint so 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

Profile

Feed

Tools


This project is part of a family of agent-friendly CLI tools for social platforms:

Tool

CLI

Repo

Instagram

instagram-lyr

ishan-parihar/instagram-lyr

Threads

threads-lyr

ishan-parihar/threads-lyr

Facebook

facebook-lyr

ishan-parihar/facebook-lyr

Reddit

reddit-lyr

ishan-parihar/reddit-lyr

LinkedIn

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.


☕ Support & Sponsorship

If you find this project useful, consider supporting ongoing development:

Sponsor Donate

Your support funds new features, releases, and infrastructure for the whole ecosystem.

Available Tools

3 tools
close_sessionClose SessionA
Destructive

Close all active scrape clients and clean up resources.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

While annotations already flag this as destructive, the description adds meaningful context: it closes *all active* scrape clients and cleans up resources. This goes beyond the simple destructive hint by specifying the scope and nature of the cleanup, though it does not detail side effects like termination of ongoing operations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single concise sentence that clearly conveys the action. Every word earns its place, with no redundancy or filler.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-parameter tool with an output schema and a destructive annotation, the description is sufficient. It clearly states what the tool does. It could mention whether calling it without an active session is safe, but this is a minor gap given the tool's simplicity.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has zero parameters, so the description need not add parameter semantics. The input schema is empty and fully covered. A baseline of 4 is appropriate since there is no parameter information to provide.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's action: 'Close all active scrape clients and clean up resources.' It uses a specific verb ('close') and resource ('scrape clients'), distinguishing it from sibling tools that are getter functions for threads profiles and user threads.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage as a cleanup or teardown operation, but it does not explicitly state when to use it (e.g., 'call when done scraping') or contrast it with alternatives. Sibling tools are clearly different in purpose, but no direct guidance on when to invoke this tool is provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_threads_profileGet Threads ProfileA
Read-only

Get a public Threads profile by username.

ParametersJSON Schema
NameRequiredDescriptionDefault
usernameYesThreads username (e.g. 'zuck')

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.1/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already provide readOnlyHint=true and openWorldHint=true. The description adds 'public' which clarifies that no special access or authentication is needed, going slightly beyond the annotations. No other behavioral traits (errors, limits) are disclosed, but the annotation coverage lowers the burden.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence with no filler. It uses the active verb 'Get' and immediately states the target resource and input, making it easy for an agent to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple one-parameter tool with an output schema and annotations, the description is complete. It covers the core action and scope. The output schema handles return values, so no additional description of results is necessary.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% coverage with a clear description and example for the username parameter ('Threads username (e.g. 'zuck')'). The tool description only reiterates 'by username' without adding new meaning. Baseline score of 3 applies because the schema handles parameter semantics.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's function: 'Get a public Threads profile by username.' This identifies a specific verb (Get), resource (Threads profile), and input (username). It distinguishes itself from sibling tools like get_user_threads (which likely retrieves posts) and close_session (session management).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The intended usage is implied: use this when you need a Threads profile by username. However, there is no explicit guidance on when to prefer this over get_user_threads or when not to use it. No alternatives or exclusion criteria are mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_user_threadsGet User ThreadsA
Read-only

Get recent public threads for a user.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum threads to return (1-100, default 25)
usernameYesThreads username

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.9/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already declare readOnlyHint=true and openWorldHint=true. The description adds useful behavioral context by specifying 'public' threads (excluding private) and 'recent' (time-based scoping), which go beyond the annotations. No contradiction with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence with no filler. Every word contributes meaning, making it highly concise and structurally efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is simple, with a complete input schema, output schema present, and annotations covering safety. The description adequately covers the tool's scope ('public', 'recent', 'for a user') without requiring extra explanation of return values or error handling.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% for both parameters (username and limit, including default and range). The description adds no extra parameter details, so the baseline score of 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Get') and resource ('recent public threads') for a user, clearly distinguishing it from sibling tools like get_threads_profile (profile-oriented) and close_session (session management). It unambiguously states what the tool does.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives, no mention of prerequisites, and no exclusions. The name implies it is for user threads, but explicit differentiation from siblings is absent.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 3 tool updatesv0.1.0
    • First observedclose_session
    • First observedget_threads_profile
    • First observedget_user_threads

TDQS

A4.1/5.0

Scored across 3 tools

Disambiguation5/5

The two data-fetching tools are clearly distinct: one retrieves profile metadata, the other retrieves user's posts. The close_session tool is obviously a lifecycle utility and does not overlap with the data access tools.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern: get_threads_profile, get_user_threads, and close_session. This makes the intended action and target clear at a glance.

Tool Count4/5

With only 3 tools, the server is minimal but appropriately scoped for a lightweight Threads reader/API client. It's slightly on the low end but each tool serves a purpose, so the count is reasonable.

Completeness4/5

The server covers the core read-only operations: fetching a profile and fetching recent threads. However, there is no tool for retrieving a single thread's details or replies, which could be a minor gap depending on the use case. Overall, the surface is sufficient for basic public Threads data access.

Maintenance

ActivitySlowing
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • F
    license
    A
    quality
    D
    maintenance
    MCP server for the Threads API, enabling profile management, content reading, publishing, replies, and discovery through 26 tools.
    26
    -
  • A
    license
    A
    quality
    A
    maintenance
    An 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.
    24
    11 npm
    MIT
  • F
    license
    A
    quality
    C
    maintenance
    Enables AI agents to interact with Meta Threads by fetching profile details, recent posts, post and account analytics, and conversation reply trees, as well as exporting posts as JSON for archiving or embedding.
    7
    -
  • A
    license
    A
    quality
    C
    maintenance
    MCP server for the Meta Threads API, enabling profile retrieval, post creation and deletion, insights, and passthrough to other Threads endpoints with optional read-only and no-destructive modes.
    6
    9 npm
    MIT