Skip to main content
Glama
threads-socialcrawl-mcp

threads-socialcrawl-mcp

README.md
# threads-socialcrawl-mcp

An MCP server that lets Claude (or any MCP client) search **public Threads posts** through the
[SocialCrawl](https://www.socialcrawl.dev) API, draft comments and new posts in the voice of an account you choose, and
**tell you the price before it spends a single credit.**

You use **your own SocialCrawl account and balance**. Nothing goes through the author of this tool. Русская версия: [README.ru.md](README.ru.md).

## What it does

- **Find posts** by hashtag, by Threads topic tag, or by words; filter by engagement (likes + comments); export to CSV.
- **Discover tags** for a broad theme, browse a date window, see the most popular posts with their top replies.
- **Look up accounts**: followers and bios.
- **Draft a comment** under a found post, in the voice of any account.
- **Draft new posts** from the most engaging posts of a topic inside a window *you* choose, in the voice of any account.
- **Safe by design:** the server asks for the balance and the price first and waits for your yes. It only reads: it never posts, likes or messages.

## Quick start (5 minutes)

1. Register at [socialcrawl.dev](https://www.socialcrawl.dev), top up the balance and copy your API key (`sc_...`).
2. Install [uv](https://docs.astral.sh/uv/getting-started/installation/) (or use `pip install threads-socialcrawl-mcp`).
3. Check your setup (free, reads the balance only):
   ```bash
   SOCIALCRAWL_API_KEY=sc_your_key uvx --from threads-socialcrawl-mcp threads-mcp --check
   ```
4. Add the server to your MCP client. `threads-mcp --print-config` prints the snippet; it looks like this:

   **Claude Desktop** (`claude_desktop_config.json`) and most other clients:
   ```json
   { "mcpServers": { "threads": {
       "command": "uvx",
       "args": ["--from", "threads-socialcrawl-mcp", "threads-mcp"],
       "env": { "SOCIALCRAWL_API_KEY": "sc_your_key" } } } }
   ```
   **Claude Code:**
   ```bash
   claude mcp add threads -e SOCIALCRAWL_API_KEY=sc_your_key -- uvx --from threads-socialcrawl-mcp threads-mcp
   ```
5. Restart the client and ask: *"What can you do with Threads?"*, then *"Find posts about business, show me the price first."*

If you installed with `pip`, use `threads-mcp` as the command (no `uvx`).

## Toolsets

One server, four toolsets. Run all (default) or pick some: `"env": {"THREADS_TOOLSETS": "research,comments"}` or `threads-mcp --toolsets research`.

| Toolset | Tools | What it is for |
|---|---|---|
| `research` | `threads_search_hashtag`, `threads_search_topic`, `threads_search_keyword`, `threads_discover_tags`, `threads_browse_posts`, `threads_top_posts`, `threads_post_comments` | find and rank posts |
| `accounts` | `threads_search_users`, `threads_enrich_authors` | followers and bios |
| `comments` | `threads_comment_context` | material for a comment in a chosen voice |
| `writing` | `threads_post_brief`, `threads_style_profile` | material for new posts in a chosen voice |

Free helpers in every server (once per server): `threads_balance`, `threads_price_list`, `threads_capabilities`.
Each toolset can also run alone: `threads-mcp-research`, `threads-mcp-accounts`, `threads-mcp-comments`, `threads-mcp-writing`.

### Search modes

The three searches take `mode` instead of a dozen knobs:

| Mode | Depth | Budget cap |
|---|---|---|
| `quick` (default) | one page | 30 credits |
| `deep` | scroll until about 30 matches (up to 20 pages) | 200 credits |
| `bulk` | up to 50 pages, for exports | 500 credits |

`target_matches` and `max_credits` override the preset.

### Prices (credits, measured on the live API)

Tag search about 1-2 per page · words search 3 per post · a post's replies 1 · a profile lookup about 3 · a style account's posts 1
(cached 24 hours). `dry_run=true` on a tool returns the exact estimate for your arguments without spending anything.

## Safety and privacy

- **Spending guard.** Every paid tool first shows your balance and the estimated cost. Clients that support MCP *elicitation* show **you** a yes/no dialog (the model cannot answer for you); other clients use a `confirmed=true` protocol where the model must show you both numbers and wait for your yes. `THREADS_CONFIRM=0` switches the guard off: do not, unless you know why.
- **Your key** stays on your machine: it is read from your client's `env` block (or a `.env` file) and sent only to SocialCrawl. It is never shown to the model or written to logs. Keep `.env` out of git.
- **What is stored locally:** CSV exports and two small caches (your comments, a style account's recent posts for 24 hours) in your per-user data folder (`threads-mcp --check` shows where; change with `THREADS_DATA_DIR`).
- **Third-party text.** Posts, bios and replies are written by other people; the server tells the model to treat them as data, never as instructions.

## Limits you should know

- Threads search returns a **sampled window**: the same query can give different posts. Fewer results than asked is normal.
- Search matches **tags or words, not meaning**, and cannot filter by city.
- Views are not used; engagement means likes + comments.
- There is no way to list all comments a person wrote under other people's posts; comments must be given as links.
- Nothing is ever posted for you.

## Settings

| Variable | Meaning |
|---|---|
| `SOCIALCRAWL_API_KEY` | your SocialCrawl key (required) |
| `THREADS_TOOLSETS` | comma separated subset of `research,accounts,comments,writing` (default all) |
| `THREADS_CONFIRM` | `1` (default) ask before paid calls, `0` do not |
| `THREADS_HELPERS` | `1` adds balance/price/capabilities to a lone accounts, comments or writing server |
| `THREADS_DATA_DIR` | folder for exports and caches |

The key can also live in a `.env` file in the working directory or in `~/.config/threads-mcp/.env`.

## Responsibility

This tool reads public data. You are responsible for how you use it: follow SocialCrawl's terms, Meta's terms for Threads,
and the privacy laws that apply to you (for example GDPR) when you store or process data about people. Do not use drafts to
spam or impersonate anyone. No warranty (MIT license).

## Develop

See [CONTRIBUTING.md](CONTRIBUTING.md). Tests run offline: `pip install -e ".[dev]" && python -m unittest discover -s tests -t .`.
A map of how it all fits together is in [docs/architecture.html](docs/architecture.html) (open it in a browser).

TDQS

A4.1/5.0

Scored across 15 tools

Disambiguation3/5

There are five post-search tools (search_hashtag, search_topic, search_keyword, browse_posts, top_posts) whose boundaries rest entirely on subtle distinctions — tag vs keyword vs 'Threads order' vs engagement-ranked — that an agent can easily get wrong, even though the long descriptions do try to steer. The content-creation trio (style_profile, comment_context, post_brief) also overlaps heavily, since comment_context is essentially post_comments plus style analysis and post_brief is top_posts plus style analysis. Users and post/replies tools are otherwise clearly distinct.

Naming Consistency4/5

All tools share a consistent `threads_` prefix and snake_case, and most are verb_noun (search_users, discover_tags, browse_posts, enrich_authors, post_comments). A few fall back to noun or adjective phrases (top_posts, comment_context, style_profile, post_brief, balance, price_list, capabilities), which are readable but break the pattern slightly.

Tool Count3/5

At 15 tools this sits at the top of the well-scoped band, and the redundancy suggests bloat: three separate search modes plus browse_posts and top_posts, and three overlapping 'voice/style' tools. A tighter set (merging the search variants and folding style_profile into the bundles) would be easier to use.

Completeness4/5

Coverage is strong for a read/analytics crawl surface: user search, tag discovery, three search modes, post browsing, replies, top-post ranking, author enrichment, style analysis, drafting material, plus cost/balance/capability introspection. Gaps are modest — there is no direct 'get one post by URL' or 'list a user's posts' primitive outside the style/brief bundles, and posting is deliberately out of scope.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues