mcpField
T
TwitterTools MCP

TwitterTools MCP

Local
twittertools.comSocial Media1Updated 3w ago

About TwitterTools MCP

TwitterTools MCP is an MCP server for AI agents that need public X post data or X-compliant text handling. It combines post and thread retrieval with offline URL parsing, character counting, and thread splitting.

Key features

  1. 01Fetch public posts with media URLs
  2. 02Retrieve threads in post order
  3. 03Count characters using X rules
  4. 04Split text into numbered posts
  5. 05Parse post URLs and IDs

Use cases

  1. 01Inspect a public post from its URL
  2. 02Read a thread as an ordered sequence
  3. 03Check whether text fits X's limit
  4. 04Format long text as a post thread

MCP support

Exposes five tools to MCP clients for retrieving public posts and threads, parsing URLs, counting characters, and splitting text. Post retrieval uses the configured twittertools.com API base; the other three tools run offline.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"steley-twittertools": {
"command": "npx",
"args": [
"-y",
"twittertools-mcp"
],
"env": {
"TWITTERTOOLS_API_BASE": "<TWITTERTOOLS_API_BASE>"
}
}
}
}
Run commandnpx -y twittertools-mcp
Environment variables to set
TWITTERTOOLS_API_BASEAPI base of a self-hosted twittertools instance (default: https://twittertools.com)

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npmtwittertools-mcp1.2.2

Tools

5

Saved tool list · updated 2w ago

ParameterTypeRequiredDescription
url_or_idstringYesPost URL (x.com or twitter.com), bare numeric ID, or text containing one

Details

From the project README

twittertools-mcp

Model Context Protocol server for TwitterTools — brings the toolkit to AI agents (Claude, ChatGPT, Cursor, ZCode, …). No login, no tracking, no API keys. Listed in the official MCP Registry as io.github.steley/twittertools-mcp.

Tools

ToolWhat it does
get_tweetFetch a public post by URL or ID: text, author, media with direct CDN URLs
get_threadUnroll a thread into its posts, in order (partial results are flagged)
count_charsMeasure text against X's real 280-character limit (CJK ×2, links = 23)
split_threadSplit long text into numbered, limit-fitting posts
parse_tweet_urlURL/ID → ID, author handle, posting time, canonical permalink

get_tweet / get_thread call the stateless twittertools.com API, which resolves public posts through X's free syndication endpoint. The other three run entirely offline. Media is not proxied: tweet results carry the direct pbs.twimg.com / video.twimg.com URLs, which any client can fetch on its own.

The package has zero dependencies: the MCP protocol layer is hand-rolled (line-delimited JSON-RPC over stdio), so the entire supply-chain surface is the couple hundred lines in this directory — verifiable against Socket or any scanner.

Install

# Claude Code
claude mcp add twittertools -- npx -y twittertools-mcp

Or add it to 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+.

Tip: npx resolves the latest version from the registry on every launch (instant once cached, a few seconds the very first time). For zero startup delay, npm i -g twittertools-mcp once and set "command": "twittertools-mcp".

Self-hosting

Point TWITTERTOOLS_API_BASE at your own instance of server/downloader_server.py to keep lookups entirely on your infrastructure:

{ "command": "npx", "args": ["-y", "twittertools-mcp"], "env": { "TWITTERTOOLS_API_BASE": "https://your-instance.example" } }

Privacy

The server is stateless: nothing is stored, no telemetry, no accounts. It talks only to the configured API base. The API itself is rate-limited per IP and keeps only aggregate, anonymous counters — see twittertools.com/privacy.

Development

npm install
cd .. && npx vitest run mcp   # unit + stdio protocol tests (offline, mock API)

MIT — same as the main project.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.