npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

x-client-mcp

v1.0.0-draft.1770992906137

Published

MCP server for X/Twitter HTTP API operations - posting, engagement, warming, timeline reading

Downloads

83

Readme

x-client-mcp

MCP server for X/Twitter HTTP API operations -- posting, engagement, account warming, and timeline reading. Uses cookie-based auth from harvested browser sessions.

Features

  • Post tweets and threads from any vault account
  • Engagement actions -- like, reply, follow
  • Media uploads (image/video)
  • Timeline and notification reading
  • Account warming scheduler with graduated daily action limits (browse -> like -> follow -> reply -> post)
  • Account import for externally-created accounts with known cookies
  • Shared vault with x-browser-mcp for seamless browser-to-API handoff
  • Built on agent-twitter-client for HTTP API calls

Install

npm install x-client-mcp

Requires Node.js >= 18.

Usage

As an MCP server (stdio)

npx x-client-mcp

In MCP client config

{
  "mcpServers": {
    "x-client": {
      "command": "npx",
      "args": ["x-client-mcp"],
      "env": {
        "X_VAULT_PASSPHRASE": "...",
        "X_VAULT_PATH": "~/.claude-workflow/x-accounts.json"
      }
    }
  }
}

Tools

Posting

| Tool | Description | |------|-------------| | x_post_tweet | Post a tweet (max 280 chars). Optionally reply to a tweet via reply_to ID. Requires account in warming (day 8+) or active state. | | x_post_thread | Post a thread (array of tweet texts) as chained replies. | | x_reply_tweet | Reply to a specific tweet by ID. |

Engagement

| Tool | Description | |------|-------------| | x_like_tweet | Like a tweet by ID. | | x_follow_user | Follow a user by handle. |

Media

| Tool | Description | |------|-------------| | x_upload_media | Upload an image or video file. Returns a media_id for use in tweets. |

Reading

| Tool | Description | |------|-------------| | x_get_timeline | Read the home timeline. Returns tweet text, author, engagement counts. count defaults to 20. | | x_get_notifications | Search for tweets mentioning the account handle (uses search, not notifications API -- only @mentions, not likes/follows/retweets). count defaults to 20. |

Warming

| Tool | Description | |------|-------------| | x_warming_step | Execute one warming action based on the account's day in the warming schedule. Automatically graduates from passive actions (browse, like) to active ones (reply, post). |

Account Management

| Tool | Description | |------|-------------| | x_list_accounts | List all accounts with state, warming progress, and cookie status. Optionally filter by state. | | x_import_account | Import an existing account with known auth_token and ct0 cookies. Default state is active. |

Tool Reference

x_post_tweet

Post a tweet from a specific account. Optionally reply to another tweet.

| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | account_id | string | yes | Account ID in the vault | | text | string | yes | Tweet text (max 280 chars) | | reply_to | string | no | Tweet ID to reply to |

x_post_thread

Post a thread (multiple tweets) as chained replies.

| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | account_id | string | yes | Account ID in the vault | | tweets | string[] | yes | Array of tweet texts for the thread |

x_reply_tweet

Reply to a specific tweet.

| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | account_id | string | yes | Account ID in the vault | | tweet_id | string | yes | Tweet ID to reply to | | text | string | yes | Reply text |

x_like_tweet

Like a tweet by ID.

| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | account_id | string | yes | Account ID in the vault | | tweet_id | string | yes | Tweet ID to like |

x_follow_user

Follow a user by handle.

| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | account_id | string | yes | Account ID in the vault | | username | string | yes | Username (handle) to follow |

x_upload_media

Upload media (image/video) for use in tweets.

| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | account_id | string | yes | Account ID in the vault | | file_path | string | yes | Path to the media file | | media_type | string | yes | MIME type (e.g. image/jpeg, video/mp4) |

x_get_timeline

Read the home timeline for a specific account.

| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | account_id | string | yes | Account ID in the vault | | count | number | no | Number of tweets to fetch (default: 20) |

x_get_notifications

Search for tweets mentioning the account handle. Uses tweet search (@handle), not the notifications API -- only returns @mentions, not likes/follows/retweets.

| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | account_id | string | yes | Account ID in the vault | | count | number | no | Number of results to fetch (default: 20) |

x_warming_step

Execute one warming action for an account based on its day in the warming schedule. Automatically graduates from passive actions (browse, like) to active ones (reply, post).

| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | account_id | string | yes | Account ID in the vault |

x_list_accounts

List all accounts in the vault with their current state and warming progress. Returns a summary (no sensitive data).

| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | state | string | no | Filter by account state |

x_import_account

Import an existing X account into the vault with known cookies. Useful for accounts created manually or whose cookies were harvested externally.

| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | handle | string | yes | X handle (without @) | | auth_token | string | yes | auth_token cookie value | | ct0 | string | yes | ct0 cookie value (CSRF token) | | user_id | string | no | X user ID (from twid cookie). Used as account ID if provided. | | state | string | no | Initial account state: warming, active, or profile_setup (default: active) | | email | string | no | Email used for the account | | password | string | no | Account password |

Configuration

| Variable | Description | Default | |----------|-------------|---------| | X_VAULT_PASSPHRASE | Encryption passphrase for the account vault | - | | X_VAULT_PATH | Path to vault file | ~/.claude-workflow/x-accounts.json |

This server has minimal config because it operates entirely via HTTP using cookies already stored in the vault. Accounts and cookies are created by x-browser-mcp or imported with x_import_account.

Warming Schedule

New accounts go through a graduated warming period to avoid triggering X's anti-spam systems:

| Day | Max Actions | Allowed | |-----|-------------|---------| | 0-2 | Low | Browse, like | | 3-5 | Medium | Browse, like, follow | | 6-7 | Medium | Browse, like, follow, reply | | 8+ | Full | Browse, like, follow, reply, post |

Once warming completes, the account state transitions from warming to active.

Account State Machine

Shared with x-browser-mcp:

created -> email_verified -> phone_verified -> profile_setup -> warming -> active
                                                                           |
                                                                    suspended / locked

x_import_account can place accounts directly into warming, active, or profile_setup state.

License

MIT