TwitterTools MCP

io.github.steleyv1.2.0更新於 Oct 7, 2026

Fetch public X posts and threads; count and split text with X's real rules. No login, no tracking.

概覽

AI 產生的概覽

讓助理取得公開的 X 貼文與長推文串,並依 X 的真實規則計算或拆分文字。

功能
提供五個工具:get_tweet 依 URL 或 ID 取得公開貼文,回傳文字、作者與媒體直連網址;get_thread 依序展開長推文串,並標示不完整的結果;count_chars 依 X 的 280 字元上限計算文字,中日韓字元以 2 計、連結以 23 計;split_thread 把長文字拆成附編號且不超限的貼文;parse_tweet_url 把 URL 或 ID 解析為 ID、作者帳號、發文時間與標準永久連結。前兩個工具會呼叫無狀態的遠端 API,透過 X 的 syndication 端點解析公開貼文;其餘三個完全離線執行。
適用情境
適合助理需要在不登入的情況下讀取公開 X 貼文或長推文串,或需要依 X 的真實字元規則草擬並拆分貼文的情境。用於社群媒體研究、內容草擬或連結解析流程時值得加入。
執行需求
透過 npx 以 stdio 方式在本機執行(npm 套件 twittertools-mcp),需要 Node 18 或更新版本。get_tweet 與 get_thread 需要網路連線,預設呼叫 twittertools.com 的 API;可用選用環境變數 TWITTERTOOLS_API_BASE 指向自架執行個體。不需要帳號或 API 金鑰。
安裝前請注意
兩個取得工具會把請求的貼文 URL 或 ID 傳送到所設定的 API 位址,預設是第三方服務;可設定 TWITTERTOOLS_API_BASE 讓查詢留在自己的基礎設施上。此伺服器被描述為無狀態、無遙測,API 只保留彙總的匿名計數。媒體不經代理,回傳的 CDN 連結由用戶端直接取得。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 TwitterTools MCP,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

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

sh
# Claude Codeclaude 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, …):

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:

json
{ "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

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

MIT — same as the main project.

來源:mcp/README.md,提交 5540d11

工具

0
工具後設資料尚未被收錄。

版本歷史

1
  1. v1.2.0最新Oct 7, 2026