Skip to content
TwitterTools

TwitterTools MCP

Use X (Twitter) posts and threads directly from AI assistants — Claude Code, Claude Desktop, Cursor, Codex, or any client that speaks the Model Context Protocol.

Install

One command for Claude Code:

claude mcp add twittertools -- npx -y twittertools-mcp

Or paste this into any client that reads an mcpServers config (Claude Desktop's claude_desktop_config.json, Cursor's .cursor/mcp.json, …):

{
  "mcpServers": {
    "twittertools": {
      "command": "npx",
      "args": ["-y", "twittertools-mcp"]
    }
  }
}

Requires Node 18+. The first launch resolves the package from npm; every launch after that is instant.

What your agent gets

  • get_tweet Fetch one public post: text, author, engagement counts, media with direct CDN URLs.
  • get_thread Unroll a thread into its posts in order (partial results are flagged).
  • count_chars Measure text against X's real 280-character limit (CJK ×2, links = 23).
  • split_thread Split long text into numbered, limit-fitting posts.
  • parse_tweet_url Post URL or ID → ID, author handle, posting time, canonical permalink.

count_chars, split_thread and parse_tweet_url run entirely offline, on the same engine as this site's tools.

No login, no API key, no tracking

The server is stateless — no accounts, no keys, no telemetry, no database. It has zero npm dependencies: the entire protocol layer is a few hundred lines you can audit in one sitting. Lookups go straight to X's public endpoint for public posts; deleted, protected or age-restricted posts are not available — to anyone.

Links

Self-hosting: point TWITTERTOOLS_API_BASE at your own instance to keep lookups on your infrastructure.