Skip to content
MCP server

TwitterTools MCP

Fetch public X posts and threads and count or split text with X's real limits

Runs locallyStatus and history
Install
Pricing
Open source
Platforms
CLI, self-hosted
Runs
Locally
Version
1.2.2
Listing updated
1 day ago

About TwitterTools MCP

TwitterTools MCP is an open-source MCP server for developer tools. It runs locally on your machine and is started by your AI client.

Two of the five tools call the stateless twittertools.com API, which resolves public posts through X's free syndication endpoint; the other three run offline on your machine. Media is not proxied: post results carry direct pbs.twimg.com and video.twimg.com URLs that any client can fetch itself.

The character counter applies X's actual rules, with CJK characters counted double and every link counted as 23. The thread splitter breaks long text into numbered posts that fit the limit, and the URL parser returns the ID, author handle, posting time and canonical permalink.

The package has zero dependencies, with a hand-rolled line-delimited JSON-RPC layer over stdio, which the README presents as a small supply-chain surface. It needs Node 18 or newer. It stores nothing and has no telemetry, accounts or API keys. Set TWITTERTOOLS_API_BASE to point lookups at your own self-hosted instance. The project is MIT licensed and independent of X Corp.

Install

Run in a terminal

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

Add to claude_desktop_config.json

{
  "mcpServers": {
    "twittertools-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "twittertools-mcp"
      ]
    }
  }
}
Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "twittertools-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "twittertools-mcp"
      ]
    }
  }
}
Install in VS CodeOpens VS Code, which asks you to confirm. Or add it by hand:

Add to .vscode/mcp.json

{
  "servers": {
    "twittertools-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "twittertools-mcp"
      ]
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json

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

Add to your client's MCP settings (most use this shape)

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

Configuration

  • TWITTERTOOLS_API_BASEAPI base of a self-hosted twittertools instance (default: https://twittertools.com)

Tools this server provides (5)

Taken from the project documentation; the running server may differ.

get_tweet
Fetch a public post by URL or ID.
get_thread
Unroll a thread into its posts.
count_chars
Measure text against X's 280-character limit.
split_thread
Split long text into numbered posts.
parse_tweet_url
Turn a URL or ID into ID, handle, time and permalink.

What it does

Post fetching
Get a public post by URL or ID with text, author and direct media URLs.
Thread unrolling
Returns a thread's posts in order and flags partial results.
Real character counting
Applies the 280 limit with CJK doubled and links fixed at 23.
Thread splitting
Turns long text into numbered posts that fit the limit.
URL parsing
Extracts ID, handle, time and permalink from a post link.
Self-hostable API
Point the server at your own instance to keep lookups on your infrastructure.

Good for

  • Have an assistant read a linked post or thread
  • Draft a long post and split it into a numbered thread
  • Check whether text fits X's limit before posting
  • Extract the author and timestamp from a post URL
  • Run lookups through a self-hosted instance

Pricing

Open source

MIT licensed; free to use

Prices change. Check twittertools.com before you buy.

TwitterTools MCP FAQ

Do I need an X login or API key?

No. It needs no login, tracking or API keys.

Which tools work offline?

count_chars, split_thread and parse_tweet_url run offline; get_tweet and get_thread call the twittertools.com API.

What do I need to run it?

Node 18 or newer; launch it with npx -y twittertools-mcp.

What is the licence?

MIT.

Is TwitterTools MCP free?

Yes. TwitterTools MCP is open source, so you can use and self-host it for free.

How do I add TwitterTools MCP to Claude Code?

Run this command in your terminal: claude mcp add twittertools-mcp -- npx -y twittertools-mcp

What are the best alternatives to TwitterTools MCP?

The closest alternatives to TwitterTools MCP are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.

Alternatives to TwitterTools MCP

  1. REA

    MCP server

    CLI and MCP server that lets coding agents reverse engineer apps and binaries

    Runs locally
    • Open source
    • 464K GitHub stars
    • Developer tools
  2. Codebase Memory

    MCP server

    Local MCP server that builds a code knowledge graph for AI coding agents

    Runs locally
    • Open source
    • 48.7K GitHub stars
    • Knowledge and memory
  3. GitHub

    MCP server

    Official MCP server connecting AI assistants to GitHub repos, issues and workflows

    Not checked yet
    • Remote
    • Open source
    • 34.5K GitHub stars
    • Developer tools
  4. MCP toolkit giving coding agents symbol-level code retrieval and editing

    Runs locally
    • Open source
    • 31.5K GitHub stars
    • Developer tools
  5. XERJ

    MCP server

    Local search engine for AI agents with cited answers over your code and docs

    Runs locally
    • Open source
    • 19.2K GitHub stars
    • Knowledge and memory
  6. Ouroboros

    MCP server

    Spec-first layer that pins requirements and verifies results of AI coding agent work

    Runs locally
    • Open source
    • 6.4K GitHub stars
    • Developer tools