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

@m8lab/mcp-x-twitter

v1.0.1

Published

MCP server for X (Twitter) — post tweets, upload media, manage interactions via Claude Code/Desktop

Readme

@m8lab/mcp-x-twitter

MCP server for X (Twitter) — post tweets, upload media, and manage interactions via Claude Code or Claude Desktop.

CI npm version License: MIT

Install

npx @m8lab/mcp-x-twitter

Claude Code Configuration

Add to your .claude/mcp.json (or run claude mcp add):

{
  "mcpServers": {
    "x-twitter": {
      "command": "npx",
      "args": ["-y", "@m8lab/mcp-x-twitter"],
      "env": {
        "X_API_KEY": "your_api_key",
        "X_API_SECRET": "your_api_secret",
        "X_ACCESS_TOKEN": "your_access_token",
        "X_ACCESS_SECRET": "your_access_secret"
      }
    }
  }
}

Claude Desktop Configuration

Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

{
  "mcpServers": {
    "x-twitter": {
      "command": "npx",
      "args": ["-y", "@m8lab/mcp-x-twitter"],
      "env": {
        "X_API_KEY": "your_api_key",
        "X_API_SECRET": "your_api_secret",
        "X_ACCESS_TOKEN": "your_access_token",
        "X_ACCESS_SECRET": "your_access_secret"
      }
    }
  }
}

Available Tools

| Tool | Description | Tier Required | |------|-------------|---------------| | post_tweet | Post a tweet with optional media and reply support | Free | | delete_tweet | Delete a tweet by ID | Free | | get_tweet | Fetch a tweet with full details and expansions | Free | | search_tweets | Search recent tweets (last 7 days) by query | Basic+ | | upload_media | Upload image or video and get a media_id | Free | | like_tweet | Like a tweet as the authenticated user | Free | | retweet | Retweet a tweet as the authenticated user | Free | | get_mentions | Retrieve recent mentions of the authenticated user | Free |

Note: search_tweets requires Basic or Pro tier X API access — not available on the free tier.

Environment Variables

| Variable | Required | Description | |----------|----------|-------------| | X_API_KEY | Yes | Your X app API Key (Consumer Key) | | X_API_SECRET | Yes | Your X app API Secret (Consumer Secret) | | X_ACCESS_TOKEN | Yes | Access Token for the authenticated user | | X_ACCESS_SECRET | Yes | Access Token Secret for the authenticated user | | X_BEARER_TOKEN | No | Bearer Token (optional, for app-only auth) |

How to Get X API Credentials

  1. Go to developer.twitter.com and sign in
  2. Create a new Project and App (or use an existing one)
  3. Under your App settings, enable Read and Write permissions (required for posting)
  4. Generate API Key & Secret under "Keys and tokens"
  5. Generate Access Token & Secret (make sure they have Read+Write scope)
  6. Copy all four values into your MCP config or .env file

Development

# Clone the repo
git clone https://github.com/lmtNoLimit/mcp-x-twitter.git
cd mcp-x-twitter

# Install dependencies
npm install

# Copy environment template
cp .env.example .env
# Fill in your credentials in .env

# Type check
npm run typecheck

# Build
npm run build

# Run locally
node dist/index.js

License

MIT — see LICENSE