twikit-mcp
twikit-mcp is an MCP server that lets AI agents interact with Twitter/X using browser cookies—no official API key required. It supports:
Tweet management: post, reply, fetch by ID/URL, delete, schedule tweets, create/vote on polls, like/unlike, retweet/unretweet, bookmark/unbookmark.
Search & discovery: search tweets (latest/top), users, communities; get trending topics by category; fetch X Articles (preview/plain/full); download tweet videos via yt-dlp.
User & social graph: get user profiles, tweets, followers/following (paginated), follow/unfollow, block/unblock, mute/unmute, view users who liked/retweeted a tweet.
Timeline & notifications: home timeline; notifications (All, Verified, Mentions, paginated).
DMs & XChat: send/delete DMs, read DM history; XChat encrypted conversations read locally (status, list, decrypted history).
Lists: create/edit lists, view list tweets/members/subscribers, add/remove members, get your lists.
Communities: view info, tweets, members, moderators; search community tweets; join, leave, request to join; joined-communities timeline.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@twikit-mcp Search tweets about AI"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
twikit-mcp
Twitter/X MCP Server — No API Key Required
An MCP server that lets Claude (or any MCP-compatible AI agent) interact with Twitter/X using browser cookies. No Twitter API key needed. Free forever.
English
Why twikit-mcp?
twikit-mcp (this project) | Other Twitter MCP servers | |
Auth | Browser cookies | Twitter API Key |
Cost | Free | $200+/month |
Setup | 2 steps, 2 minutes | Apply for developer account, wait for approval |
API | twikit (reverse-engineered) | X API (official, paid) |
Quick Start
1. Create cookies.json
Log in to x.com in your browser
Open DevTools (F12) → Application → Cookies →
https://x.comCopy
ct0andauth_token
mkdir -p ~/.config/twitter-mcp
cat > ~/.config/twitter-mcp/cookies.json << 'EOF'
{"ct0": "YOUR_CT0", "auth_token": "YOUR_AUTH_TOKEN"}
EOF
chmod 600 ~/.config/twitter-mcp/cookies.jsonWhat are these?
ct0is the CSRF token (~160 hex chars),auth_tokenis your session token (40 hex chars). They are found in your browser cookies after logging in to x.com. Cookies expire —auth_tokentypically lasts several months,ct0may be shorter. Re-extract from your browser when expired.
2. Install & register
Choose one of the following methods:
Option A: uvx — zero-install, fetches each call (slow first run, fast after; cache shared with other uv tools). Best for quick try-out.
# Claude Code
claude mcp add twitter -s user \
-e "TWITTER_COOKIES=$HOME/.config/twitter-mcp/cookies.json" \
-- uvx twikit-mcp
# Or run directly
uvx twikit-mcpOption B: uv tool install (recommended for daily use) — pinned isolated venv, instant startup, simple upgrade path.
# Install once. Drops a `twikit-mcp` binary on PATH (~/.local/bin).
uv tool install twikit-mcp
# List your installed uv tools (sanity check)
uv tool list
# Upgrade when a new version ships
uv tool upgrade twikit-mcp
# Or upgrade ALL uv-tool-managed binaries at once:
uv tool upgrade --all
# Uninstall (clean removal of the venv + binary)
uv tool uninstall twikit-mcpThen register with Claude Code (uses the binary on PATH — no uvx prefix):
claude mcp add twitter -s user \
-e "TWITTER_COOKIES=$HOME/.config/twitter-mcp/cookies.json" \
-- twikit-mcpThe cookies file is the same as for every other option: ~/.config/twitter-mcp/cookies.json (or wherever TWITTER_COOKIES env var points). uv tool install doesn't change where config lives — only where the binary lives.
uvx vs
uv tool installquick rule: use uvx if you'll call it once or twice (e.g. one-off script). Useuv tool installif it's part of your dev workflow (e.g. wired into Claude Code daily) — startup is instant after the one-time install.
Option C: pip
pip install twikit-mcp
# Claude Code
claude mcp add twitter -s user \
-e "TWITTER_COOKIES=$HOME/.config/twitter-mcp/cookies.json" \
-- twikit-mcp
# Or run directly
TWITTER_COOKIES=~/.config/twitter-mcp/cookies.json twikit-mcpOption D: pipx (isolated install — same idea as uv tool install, but with pipx)
pipx install twikit-mcp
# Claude Code
claude mcp add twitter -s user \
-e "TWITTER_COOKIES=$HOME/.config/twitter-mcp/cookies.json" \
-- twikit-mcpUsing with other MCP clients
This is a standard MCP server (stdio transport). It works with any MCP-compatible client — not just Claude Code.
Add to your MCP client config (e.g. mcp.json, settings.json):
{
"mcpServers": {
"twitter": {
"command": "twikit-mcp",
"env": {
"TWITTER_COOKIES": "/home/YOU/.config/twitter-mcp/cookies.json"
}
}
}
}Works with: Claude Code, Claude Desktop, Cursor, Windsurf, opencode, Cline, Pi, DeepSeek Harness (dsh), etc. — see the Install page.
That's it. Start talking:
> Search tweets about AI
> What did @elonmusk post recently?
> Send a tweet saying: Hello from Claude!CLI mode (no MCP client needed)
The same twikit-mcp binary doubles as a one-shot CLI. Two modes:
Human-friendly subcommands — pretty-print tweets, profiles, timeline directly:
twikit-mcp tweet 20 # show tweet 20 (Jack's first one)
twikit-mcp tweet https://x.com/u/status/123 # URL works too
twikit-mcp user elonmusk # pretty profile
twikit-mcp tl 10 # last 10 tweets from your home timeline
twikit-mcp search "AI" 5 # 5 top results for "AI"
twikit-mcp trends 20 # top 20 trending topicsOutput is plain text — readable in any terminal, native unicode (no \uXXXX escapes).
Machine-friendly subcommands — raw JSON, key=value args, every one of the 57 MCP tools:
twikit-mcp list # all 57 tool names
twikit-mcp call get_user_info screen_name=elonmusk
twikit-mcp call search_tweets query=AI count=5 product=Top
twikit-mcp call get_user_info screen_name=elonmusk | jq .followers_countMCP server mode — the default when no subcommand is given:
twikit-mcp # stdio JSON-RPC for MCP clients
twikit-mcp serve # explicit, same behaviorAll three modes share the same ~/.config/twitter-mcp/cookies.json — no separate config.
Available Tools
Tool | Description |
| Post a tweet or reply |
| Fetch a tweet by ID or URL |
| Get home timeline |
| Search tweets (Latest/Top) |
| Like a tweet |
| Retweet a tweet |
| Get a user's profile metadata by |
| Get tweets from a specific user |
| List a user's followers (paginated via |
| List who a user follows (paginated via |
| Follow a user by screen name |
| Unfollow a user by screen name |
| Delete a tweet by ID |
| Unlike a tweet by ID |
| Un-retweet a tweet by ID |
| Bookmark a tweet (optional |
| Remove a tweet from bookmarks |
| List bookmarked tweets (paginated via |
| List users who liked a tweet (paginated via |
| List users who retweeted a tweet (paginated via |
| Search for users by query (paginated via |
| Get trending topics by category ( |
| Get title / preview / cover of an X Article embedded in a tweet (no auth) |
| Fetch an X Article's body — |
| Block a user by screen name (rate-limited — avoid bulk) |
| Unblock a user by screen name |
| Mute a user by screen name (rate-limited — avoid bulk) |
| Unmute a user by screen name |
| Fetch notifications — |
| ⚠️ Send a PRIVATE DM to a user — do not bulk-call |
| ⚠️ Send a PRIVATE DM to a group conversation — do not bulk-call |
| ⚠️ Get DM conversation history with a user (private — paginate via |
| ⚠️ Delete a DM by message ID (private) |
| Check whether XChat (encrypted DMs) is readable from the local browser store |
| ⚠️ List XChat conversations with previews (private — read locally, never marks read) |
| ⚠️ Read one XChat conversation's decrypted messages (private — local only) |
| Get a Twitter List by ID |
| Get authenticated user's Lists (paginated via |
| Get tweets from a List (paginated via |
| Get members of a List (paginated via |
| Get subscribers of a List (paginated via |
| Create a new Twitter List ( |
| Edit a List's metadata — at least one of |
| Add a user to a List by |
| Remove a user from a List by |
| Schedule a tweet at a future Unix timestamp ( |
| Get all scheduled tweets for the authenticated user |
| Delete a scheduled tweet by its |
| Create an X poll card (2-4 |
| Vote on a poll — requires |
| Get a Twitter Community by ID |
| Search for Communities by query (paginated via |
| Get tweets from a Community — |
| Get the joined-communities feed (paginated via |
| Get members of a Community (paginated via |
| Get moderators of a Community (paginated via |
| Search tweets within a Community by query (paginated via |
| Join a Community by ID |
| Leave a Community by ID |
| Request to join a Community — optional |
X Articles note: long-form posts at
https://x.com/i/article/<id>live in a different ID namespace than tweets.get_tweetrefuses them with a clear error pointing toget_article.get_article_previewworks without auth via the public syndication endpoint.get_articleruns a two-hop reader flow internally:ArticleRedirectScreenQueryresolves the article rest_id to the underlying tweet rest_id, thenTweetResultByRestIdfetches the tweet's article body. Theformatarg controls how much of the response makes it through to the LLM:
"preview"(~1 KB) —rest_id,title,preview_text,cover_image. Card-display use case.
"plain"(~20 KB, default) — addsplain_text, flatmediaURL list,lifecycle_state. The 80% LLM-reading-an-article case; fits inside Claude Code'sMAX_MCP_OUTPUT_TOKENS.
"full"(~150 KB+) — raw GraphQL payload including the heavycontent_stateblock tree. Only ask for this if you actually need rich-content rendering / archiving / structure analysis.Both queryIds are hardcoded like the 80+ other twikit endpoints; if X rotates them, refresh from the public
bundle.Articles.*.js/bundle.TwitterArticles.*.jschunks onabs.twimg.com(no auth needed for discovery).
Check version
twikit-mcp --version
# or: twikit-mcp -v
# or: python -m twitter_mcp.server --versionHow It Works
You: "Search tweets about AI"
→ Claude Code (understands intent)
→ MCP Protocol (JSON-RPC over stdio)
→ twikit-mcp (this server)
→ twikit (browser-like requests)
→ Twitter GraphQL APIClaude Code automatically manages the server process — it starts when Claude Code launches and stops when it exits. No background services, no manual setup.
Windows
mkdir %APPDATA%\twitter-mcp
# Create cookies.json with your ct0 and auth_token
# uvx
claude mcp add twitter -s user ^
-e "TWITTER_COOKIES=%APPDATA%\twitter-mcp\cookies.json" ^
-- uvx twikit-mcp
# Or with pip
pip install twikit-mcp
claude mcp add twitter -s user ^
-e "TWITTER_COOKIES=%APPDATA%\twitter-mcp\cookies.json" ^
-- twikit-mcpDocumentation
Technical Guide — Architecture, MCP internals, configuration details
Contributing — Testing, CI/CD, how to add new tools
Related MCP server: x-mcp
中文
为什么选 twikit-mcp?
twikit-mcp(本项目) | 其他 Twitter MCP | |
认证 | 浏览器 Cookies | Twitter API Key |
费用 | 免费 | $200+/月 |
配置 | 2 步,2 分钟 | 申请开发者账号,等审批 |
API | twikit(逆向工程) | X API(官方,付费) |
快速开始
1. 创建 cookies.json
用浏览器登录 x.com
F12 打开 DevTools → Application → Cookies →
https://x.com复制
ct0和auth_token
mkdir -p ~/.config/twitter-mcp
cat > ~/.config/twitter-mcp/cookies.json << 'EOF'
{"ct0": "你的ct0", "auth_token": "你的auth_token"}
EOF
chmod 600 ~/.config/twitter-mcp/cookies.json这两个值是什么?
ct0是 CSRF token(约160位十六进制),auth_token是会话 token(40位十六进制),都在浏览器 Cookies 中。Cookies 会过期——auth_token通常有效数月,ct0可能更短。过期后从浏览器重新提取即可。
2. 安装 & 注册
选择以下 任一 方式:
方式 A: uvx — 零安装,每次调用拉一份。第一次慢,之后用 cache,跟其他 uv 工具共享。适合临时试用。
# Claude Code
claude mcp add twitter -s user \
-e "TWITTER_COOKIES=$HOME/.config/twitter-mcp/cookies.json" \
-- uvx twikit-mcp
# 或直接运行
uvx twikit-mcp方式 B: uv tool install (日常使用推荐) — 隔离 venv,启动瞬间,升级简单。
# 一次性安装,在 PATH 上注册一个 `twikit-mcp` 二进制(默认路径 ~/.local/bin)
uv tool install twikit-mcp
# 列出当前 uv 管理的工具(确认装上了)
uv tool list
# 有新版本时升级
uv tool upgrade twikit-mcp
# 或一键升级所有 uv 装的工具:
uv tool upgrade --all
# 卸载(连 venv 一起清掉)
uv tool uninstall twikit-mcp然后用 PATH 上的二进制注册到 Claude Code(不要再加 uvx 前缀):
claude mcp add twitter -s user \
-e "TWITTER_COOKIES=$HOME/.config/twitter-mcp/cookies.json" \
-- twikit-mcpcookies 文件位置不变 — 仍然是 ~/.config/twitter-mcp/cookies.json(或者 TWITTER_COOKIES 环境变量指的地方)。uv tool install 只改变二进制的安装位置,不改 config 路径。
uvx vs
uv tool install的简单选择: 一次性 / 偶尔用 → uvx;天天接到 Claude Code 里用 →uv tool install(启动快很多)。
方式 C: pip
pip install twikit-mcp
# Claude Code
claude mcp add twitter -s user \
-e "TWITTER_COOKIES=$HOME/.config/twitter-mcp/cookies.json" \
-- twikit-mcp
# 或直接运行
TWITTER_COOKIES=~/.config/twitter-mcp/cookies.json twikit-mcp方式 D: pipx(隔离安装,跟 uv tool install 思路一样,但换工具)
pipx install twikit-mcp
# Claude Code
claude mcp add twitter -s user \
-e "TWITTER_COOKIES=$HOME/.config/twitter-mcp/cookies.json" \
-- twikit-mcp在其他 MCP 客户端中使用
这是标准的 MCP server(stdio 传输),不限于 Claude Code,任何支持 MCP 的客户端都能用。
在你的 MCP 客户端配置中添加(如 mcp.json、settings.json):
{
"mcpServers": {
"twitter": {
"command": "twikit-mcp",
"env": {
"TWITTER_COOKIES": "/home/你的用户名/.config/twitter-mcp/cookies.json"
}
}
}
}兼容:Claude Code、Claude Desktop、Cursor、Windsurf、opencode、Cline、Pi、DeepSeek Harness(dsh)等 —— 详见安装页。
搞定。直接说人话:
> 搜一下关于 AI 的推文
> 看看 @elonmusk 最近发了什么
> 发一条推说:Hello from Claude!可用工具
工具 | 功能 | 怎么用 |
| 发推/回复 | "发一条推说..." |
| 获取推文 | "看看这条推文 [链接]" |
| 刷时间线 | "看看我的时间线" |
| 搜索推文 | "搜一下关于 XX 的推文" |
| 点赞 | "点赞这条推" |
| 转推 | "转推这个" |
| 查看用户资料( | "查一下 @xxx 的资料" |
| 看某人的推 | "看看 @xxx 最近发了什么" |
| 拉某人的粉丝列表( | "看看 @xxx 的粉丝" |
| 拉某人关注的人( | "@xxx 都关注谁?" |
| 关注用户 | "关注 @xxx" |
| 取消关注 | "取关 @xxx" |
| 删除推文 | "删除这条推文" |
| 取消点赞 | "取消对这条推的点赞" |
| 取消转推 | "取消转推这条" |
| 收藏推文(可选 | "收藏这条推文" |
| 取消收藏推文 | "取消收藏这条推文" |
| 获取收藏列表( | "看看我的收藏" |
| 获取点赞某推文的用户( | "谁点赞了这条推?" |
| 获取转推某推文的用户( | "谁转推了这条?" |
| 搜索用户( | "搜一下叫 xxx 的用户" |
| 获取热门话题(分类: | "现在有哪些热门话题?" |
| 拿 X Article 的标题/摘要/封面(无需登录) | "这篇文章在讲什么 [链接]" |
| 拿 X Article 的正文, | "把这篇文章读给我听 [链接]" |
| 屏蔽用户(受频率限制,避免批量操作) | "屏蔽 @xxx" |
| 取消屏蔽用户 | "取消屏蔽 @xxx" |
| 静音用户(受频率限制,避免批量操作) | "静音 @xxx" |
| 取消静音用户 | "取消静音 @xxx" |
| 获取通知( | "看看我的通知" |
| ⚠️ 发送私信给用户,勿批量调用 | "私信 @xxx:..." |
| ⚠️ 发送私信到群组,勿批量调用 | "发消息到群组..." |
| ⚠️ 获取与某用户的私信记录(私密,通过 | "看看和 @xxx 的私信记录" |
| ⚠️ 删除某条私信(私密) | "删除这条私信" |
| 检查本地浏览器里的 XChat(加密私信)能不能读 | "XChat 能读吗" |
| ⚠️ 列出 XChat 会话和预览(私密,纯本地读,不会标记已读) | "看看加密私信有哪些会话" |
| ⚠️ 读某个 XChat 会话的解密消息(私密,纯本地) | "读一下和 xxx 的加密私信" |
| 通过 ID 获取 Twitter 列表 | "查看列表 xxx" |
| 获取当前用户的所有列表( | "我有哪些列表?" |
| 获取列表中的推文( | "查看列表推文" |
| 获取列表成员( | "列表成员有哪些?" |
| 获取列表订阅者( | "谁订阅了这个列表?" |
| 创建新列表( | "新建列表 xxx" |
| 编辑列表信息( | "重命名列表" |
| 将用户加入列表( | "把 @xxx 加入列表" |
| 将用户从列表移除( | "从列表移除 @xxx" |
| 定时发推( | "明天发推" |
| 获取当前用户的所有定时推文 | "有哪些定时推?" |
| 删除定时推文(需提供 | "取消定时推" |
| 创建投票(2-4 个选项, | "发起投票" |
| 对投票投票(需提供 | "给这个选项投票" |
| 通过 ID 获取 Twitter 社区 | "查看社区 xxx" |
| 搜索社区( | "搜索 Python 社区" |
| 获取社区推文( | "看看社区最新推文" |
| 获取已加入社区的时间线( | "看看社区动态" |
| 获取社区成员( | "社区有哪些成员?" |
| 获取社区版主( | "社区版主是谁?" |
| 在社区内搜索推文( | "在社区里搜 xxx" |
| 加入社区 | "加入这个社区" |
| 退出社区 | "退出这个社区" |
| 申请加入社区(受限社区可选 | "申请加入这个社区" |
X Articles 说明:
https://x.com/i/article/<id>这种长文与普通推文是两个 ID 命名空间。get_tweet遇到 article URL 会直接拒绝并提示用get_article。get_article_preview走公共 syndication 端点,不需要登录。get_article内部是两跳 reader 流程,通过format参数控制返回大小:
"preview"(~1 KB) —rest_id/title/preview_text/cover_image,卡片场景
"plain"(~20 KB,默认) — 上面 +plain_text+ 扁平化mediaURL 列表 +lifecycle_state,LLM 读全文的 80% 场景,刚好放得下 Claude Code 的MAX_MCP_OUTPUT_TOKENS
"full"(~150 KB+) — 原始 GraphQL 响应,含庞大的content_state富文本块树,只在做富文本渲染/归档/结构分析时才需要两个 queryId 都跟其他 80+ 端点一样硬编码 — 如果 X 改了 hash,从公开的
bundle.Articles.*.js/bundle.TwitterArticles.*.jschunk 里 grep 出新值即可,无需登录态。
查看版本
twikit-mcp --version
# 或:twikit-mcp -v
# 或:python -m twitter_mcp.server --version工作原理
你:"搜一下关于 AI 的推文"
→ Claude Code(理解意图)
→ MCP 协议(JSON-RPC,stdio 通信)
→ twikit-mcp(本 server)
→ twikit(模拟浏览器请求)
→ Twitter GraphQL APIClaude Code 自动管理 server 进程——启动时拉起,退出时关闭。不需要手动运行任何东西,不占后台资源。
Windows
mkdir %APPDATA%\twitter-mcp
# 创建 cookies.json,写入 ct0 和 auth_token
# uvx
claude mcp add twitter -s user ^
-e "TWITTER_COOKIES=%APPDATA%\twitter-mcp\cookies.json" ^
-- uvx twikit-mcp
# 或使用 pip
pip install twikit-mcp
claude mcp add twitter -s user ^
-e "TWITTER_COOKIES=%APPDATA%\twitter-mcp\cookies.json" ^
-- twikit-mcp文档
日本語
なぜ twikit-mcp?
twikit-mcp(本プロジェクト) | 他の Twitter MCP | |
認証 | ブラウザ Cookie | Twitter API Key |
料金 | 無料 | $200+/月 |
セットアップ | 2ステップ、2分 | 開発者アカウント申請、承認待ち |
API | twikit(リバースエンジニアリング) | X API(公式、有料) |
クイックスタート
1. cookies.json の作成
ブラウザで x.com にログイン
F12 で DevTools を開く → Application → Cookies →
https://x.comct0とauth_tokenをコピー
mkdir -p ~/.config/twitter-mcp
cat > ~/.config/twitter-mcp/cookies.json << 'EOF'
{"ct0": "あなたのct0", "auth_token": "あなたのauth_token"}
EOF
chmod 600 ~/.config/twitter-mcp/cookies.jsonこれは何?
ct0は CSRF トークン(約160桁の16進数)、auth_tokenはセッショントークン(40桁の16進数)で、ブラウザの Cookie から取得します。Cookie は有効期限があります —auth_tokenは通常数ヶ月、ct0はより短い場合があります。期限切れの際はブラウザから再取得してください。
2. インストール & 登録
以下の いずれか の方法を選んでください:
方法 A: uvx — ゼロインストール、毎回フェッチ。初回のみ遅い、以降はキャッシュで高速。お試し向け。
# Claude Code
claude mcp add twitter -s user \
-e "TWITTER_COOKIES=$HOME/.config/twitter-mcp/cookies.json" \
-- uvx twikit-mcp
# または直接実行
uvx twikit-mcp方法 B: uv tool install(日常利用に推奨)— 専用 venv で隔離インストール、起動が瞬時、アップグレードも簡単。
# 一度だけインストール。PATH (~/.local/bin) に `twikit-mcp` バイナリを配置
uv tool install twikit-mcp
# uv tool 管理下のツール一覧(確認用)
uv tool list
# 新バージョンが出たらアップグレード
uv tool upgrade twikit-mcp
# uv で入れた全ツールを一括アップグレード:
uv tool upgrade --all
# アンインストール(venv ごと削除)
uv tool uninstall twikit-mcpPATH 上のバイナリで Claude Code に登録(uvx プレフィックス不要):
claude mcp add twitter -s user \
-e "TWITTER_COOKIES=$HOME/.config/twitter-mcp/cookies.json" \
-- twikit-mcpcookies ファイルの場所は他のオプションと同じ — ~/.config/twitter-mcp/cookies.json (もしくは TWITTER_COOKIES 環境変数)。uv tool install が変えるのはバイナリの場所だけで、設定ファイルの場所は変わりません。
uvx と
uv tool installの使い分け: 一回だけ / たまに → uvx;Claude Code に組み込んで毎日使う →uv tool install(起動が圧倒的に速い)。
方法 C: pip
pip install twikit-mcp
# Claude Code
claude mcp add twitter -s user \
-e "TWITTER_COOKIES=$HOME/.config/twitter-mcp/cookies.json" \
-- twikit-mcp
# または直接実行
TWITTER_COOKIES=~/.config/twitter-mcp/cookies.json twikit-mcp方法 D: pipx(隔離インストール — uv tool install と同じ思想、ツール違い)
pipx install twikit-mcp
# Claude Code
claude mcp add twitter -s user \
-e "TWITTER_COOKIES=$HOME/.config/twitter-mcp/cookies.json" \
-- twikit-mcp他の MCP クライアントでの使用
これは標準的な MCP サーバー(stdio トランスポート)です。Claude Code 専用ではなく、MCP 対応のすべてのクライアントで使用できます。
MCP クライアントの設定ファイル(mcp.json、settings.json など)に追加:
{
"mcpServers": {
"twitter": {
"command": "twikit-mcp",
"env": {
"TWITTER_COOKIES": "/home/ユーザー名/.config/twitter-mcp/cookies.json"
}
}
}
}対応クライアント:Claude Code、Claude Desktop、Cursor、Windsurf、opencode、Cline、Pi、DeepSeek Harness(dsh)など —— インストールページを参照。
以上です。自然言語で話しかけてください:
> AIに関するツイートを検索して
> @elonmusk の最近の投稿を見せて
> 「Hello from Claude!」とツイートして利用可能なツール
ツール | 機能 | 使い方 |
| ツイート投稿・返信 | 「〜とツイートして」 |
| ツイート取得 | 「このツイートを見て [URL]」 |
| タイムライン取得 | 「タイムラインを見せて」 |
| ツイート検索 | 「〜について検索して」 |
| いいね | 「このツイートにいいねして」 |
| リツイート | 「これをリツイートして」 |
| ユーザープロフィール取得( | 「@xxx のプロフィールを見せて」 |
| ユーザーのツイート取得 | 「@xxx の最近の投稿を見せて」 |
| フォロワー一覧取得( | 「@xxx のフォロワーを見せて」 |
| フォロー中の一覧取得( | 「@xxx は誰をフォローしてる?」 |
| ユーザーをフォロー | 「@xxx をフォロー」 |
| フォロー解除 | 「@xxx をフォロー解除」 |
| ツイート削除 | 「このツイートを削除して」 |
| いいね取り消し | 「このツイートのいいねを取り消して」 |
| リツイート取り消し | 「このリツイートを取り消して」 |
| ブックマーク追加( | 「このツイートをブックマークして」 |
| ブックマーク削除 | 「このブックマークを削除して」 |
| ブックマーク一覧取得( | 「ブックマークを見せて」 |
| ツイートにいいねしたユーザー一覧( | 「このツイートにいいねした人は?」 |
| ツイートをリツイートしたユーザー一覧( | 「誰がリツイートした?」 |
| ユーザー検索( | 「〜というユーザーを検索して」 |
| トレンド取得(カテゴリ: | 「今のトレンドを見せて」 |
| X Article のタイトル/プレビュー/カバー画像取得(認証不要) | 「この記事の概要を教えて [URL]」 |
| X Article の本文取得、 | 「この記事を読んで [URL]」 |
| ユーザーをブロック(レート制限あり — 一括使用禁止) | 「@xxx をブロック」 |
| ユーザーのブロックを解除 | 「@xxx のブロックを解除」 |
| ユーザーをミュート(レート制限あり — 一括使用禁止) | 「@xxx をミュート」 |
| ユーザーのミュートを解除 | 「@xxx のミュートを解除」 |
| 通知取得( | 「通知を見せて」 |
| ⚠️ ユーザーにダイレクトメッセージを送信 — 一括送信禁止 | 「@xxx にDMして:...」 |
| ⚠️ グループにダイレクトメッセージを送信 — 一括送信禁止 | 「グループにメッセージ送信...」 |
| ⚠️ ユーザーとの DM 履歴取得(プライベート、 | 「@xxx との DM 履歴を見せて」 |
| ⚠️ DM を削除(プライベート) | 「この DM を削除して」 |
| ローカルブラウザの XChat(暗号化 DM)が読めるか確認 | 「XChat は読める?」 |
| ⚠️ XChat 会話一覧とプレビュー(プライベート、ローカル読み取り、既読にしない) | 「暗号化 DM の一覧を見せて」 |
| ⚠️ XChat 会話の復号済みメッセージを読む(プライベート、ローカルのみ) | 「@xxx との暗号化 DM を読んで」 |
| ID でリストを取得 | 「リスト xxx を見せて」 |
| 自分のリスト一覧取得( | 「自分のリストは?」 |
| リストのツイート取得( | 「リストのツイートを見せて」 |
| リストのメンバー取得( | 「リストのメンバーは?」 |
| リストの購読者取得( | 「誰がリストを購読している?」 |
| リストを作成( | 「リスト xxx を作成して」 |
| リスト情報を編集( | 「リスト名を変更して」 |
| リストにユーザーを追加( | 「@xxx をリストに追加して」 |
| リストからユーザーを削除( | 「@xxx をリストから削除して」 |
| 予約投稿( | 「明日ツイートして」 |
| 予約中のツイート一覧を取得 | 「予約ツイートは?」 |
| 予約ツイートを削除( | 「予約を取り消して」 |
| 投票を作成(選択肢 2-4 個、 | 「投票を作って」 |
| 投票する( | 「この選択肢に投票して」 |
| ID でコミュニティを取得 | 「コミュニティ xxx を見せて」 |
| クエリでコミュニティを検索( | 「Python コミュニティを探して」 |
| コミュニティのツイートを取得( | 「コミュニティの最新投稿を見せて」 |
| 参加済みコミュニティのタイムラインを取得( | 「コミュニティのフィードを見せて」 |
| コミュニティのメンバー一覧を取得( | 「コミュニティのメンバーは?」 |
| コミュニティのモデレーター一覧を取得( | 「モデレーターは誰?」 |
| コミュニティ内のツイートを検索( | 「このコミュニティで xxx を検索して」 |
| コミュニティに参加 | 「このコミュニティに参加して」 |
| コミュニティを退出 | 「このコミュニティを退出して」 |
| コミュニティへの参加申請(審査制コミュニティは | 「このコミュニティへの参加を申請して」 |
X Articles について:
https://x.com/i/article/<id>の長文記事はツイートとは別の ID 名前空間に属します。get_tweetは article URL を渡されると拒否し、get_articleを案内します。get_article_previewは公開 syndication エンドポイント経由で認証不要。get_articleは内部で 2 ホップ reader フローを走り、format引数で出力サイズを制御:
"preview"(~1 KB) —rest_id/title/preview_text/cover_image、カード表示用途
"plain"(~20 KB、デフォルト) — 上記 +plain_text+ フラットなmediaURL リスト +lifecycle_state、LLM が記事を読む 80% のケース、Claude Code のMAX_MCP_OUTPUT_TOKENSに収まる
"full"(~150 KB+) — 重いcontent_stateブロックツリーを含む生 GraphQL レスポンス、リッチコンテンツのレンダリング・アーカイブ・構造解析が必要な場合のみどちらの queryId も他の 80+ エンドポイント同様ハードコードされており、X がハッシュをローテートした場合は公開されている
bundle.Articles.*.js/bundle.TwitterArticles.*.jsチャンクから新しいハッシュを取得できます(認証不要)。
バージョン確認
twikit-mcp --version
# または: twikit-mcp -v
# または: python -m twitter_mcp.server --version仕組み
あなた:「AIに関するツイートを検索して」
→ Claude Code(意図を理解)
→ MCP プロトコル(JSON-RPC、stdio 通信)
→ twikit-mcp(本サーバー)
→ twikit(ブラウザリクエストをシミュレート)
→ Twitter GraphQL APIClaude Code がサーバープロセスを自動管理します。起動時にプロセスを立ち上げ、終了時に自動停止。手動操作やバックグラウンドサービスは不要です。
Windows
mkdir %APPDATA%\twitter-mcp
# cookies.json を作成し、ct0 と auth_token を記入
# uvx
claude mcp add twitter -s user ^
-e "TWITTER_COOKIES=%APPDATA%\twitter-mcp\cookies.json" ^
-- uvx twikit-mcp
# または pip
pip install twikit-mcp
claude mcp add twitter -s user ^
-e "TWITTER_COOKIES=%APPDATA%\twitter-mcp\cookies.json" ^
-- twikit-mcpドキュメント
技術ドキュメント — アーキテクチャ、MCP の仕組み、設定詳細
コントリビューションガイド — テスト、CI/CD、新しいツールの追加方法
License
MIT
Available Tools
62 toolsadd_list_memberA
Add a user to a Twitter List.
Caller must provide exactly one of screen_name / user_id.
Args: list_id: The list ID (required). screen_name: Twitter username (without @). user_id: Twitter numeric user ID.
Inputs: list_id (required), user_id, screen_name. Returns: result
block_userA
Block a user by screen name.
Note: X aggressively rate-limits / risk-scans block + mute. Avoid bulk usage or your account may be temporarily restricted.
Args: screen_name: Twitter username (without @).
Inputs: screen_name (required). Returns: result
bookmark_tweetB
Bookmark a tweet. Optionally add it to a bookmark folder.
Args: tweet_id: The tweet ID to bookmark. folder_id: Optional bookmark folder ID.
Inputs: tweet_id (required), folder_id. Returns: result
create_listA
Create a new Twitter List.
Args: name: The name for the new list (required, must not be empty). description: Description for the list (default empty). is_private: If True, the list is private (default False = public).
Inputs: name (required), is_private, description. Returns: result
create_pollA
Create an X poll and return its card URI.
X polls have 2-4 choices and a duration in minutes. Pass the returned card_uri to send_tweet's poll_uri parameter to attach the poll.
Args: choices: Poll choices (2-4 entries required; each must be non-empty). duration_minutes: Poll duration in minutes (must be > 0).
Inputs: choices (required), duration_minutes (required). Returns: result
create_scheduled_tweetA
Schedule a tweet to be posted at a future Unix timestamp.
Scheduled tweets follow X's standard rate limits, no special caveats needed.
Args: scheduled_at: Unix epoch seconds when the tweet should be posted (must be in the future). text: Tweet text. At least one of text or media_ids must be provided. media_ids: List of media IDs to attach to the scheduled tweet.
Inputs: scheduled_at (required), text, media_ids. Returns: result
delete_bookmarkA
Remove a tweet from bookmarks.
Args: tweet_id: The tweet ID to un-bookmark.
Inputs: tweet_id (required). Returns: result
delete_dmA
Delete a direct message by ID.
Note: Deletes a PRIVATE message. Do not bulk-call. X has aggressive anti-spam on DMs and may suspend the account.
Args: message_id: The message ID to delete.
Inputs: message_id (required). Returns: result
delete_retweetA
Un-retweet a tweet by ID.
Args: tweet_id: The tweet ID to un-retweet.
Inputs: tweet_id (required). Returns: result
delete_scheduled_tweetA
Delete a scheduled tweet by its scheduled tweet ID.
Scheduled tweets follow X's standard rate limits, no special caveats needed.
Args: scheduled_tweet_id: The ID of the scheduled tweet (from create_scheduled_tweet or get_scheduled_tweets). This is NOT a regular tweet ID.
Inputs: scheduled_tweet_id (required). Returns: result
delete_tweetB
Delete a tweet by ID.
Args: tweet_id: The tweet ID to delete.
Inputs: tweet_id (required). Returns: result
download_tweet_videoA
Download video(s) attached to a tweet via yt-dlp.
Args: tweet_id: Tweet ID (numeric string) or full URL. output_dir: Where to save. Default: $TWIKIT_DOWNLOAD_DIR or ~/Downloads/twikit-mcp/. format: yt-dlp format selector. Default "best[ext=mp4]" (single muxed mp4, no ffmpeg required). Pass "bestvideo+bestaudio" for separate-stream max-quality merge (requires ffmpeg).
Returns: JSON with path, size_bytes, duration_sec, format, width, height, url, tweet_id. Raises ToolError if yt-dlp / ffmpeg is missing, the tweet has no video, or download fails.
Inputs: tweet_id (required), format, output_dir. Returns: result
edit_listA
Edit a Twitter List's metadata.
At least one of name, description, or is_private must be provided.
Pass an empty string for description to clear it.
Args: list_id: The list ID (required). name: New name for the list. description: New description (empty string clears it). is_private: True to make private, False to make public.
Inputs: list_id (required), name, is_private, description. Returns: result
follow_userA
Follow a user by screen name.
Note: X aggressively rate-limits follow / unfollow — avoid bulk usage or your account may be temporarily restricted.
Args: screen_name: Twitter username (without @).
Inputs: screen_name (required). Returns: result
get_articleA
Fetch an X Article (long-form post) by rest_id or URL.
Two-hop reader flow (issue #10):
ArticleRedirectScreenQueryresolves the article rest_id to the underlying tweet rest_id.TweetResultByRestId(twikit's existing helper) fetches the tweet with article fieldToggles enabled. The body lives attweet.article.article_results.result.
Requires authentication via cookies — same as every other authenticated tool here. No env-var setup.
Args: article_id: Article rest_id (numeric string) or full /i/article/ URL. format: Output shape, one of: - "preview" (~1 KB) — rest_id, title, preview_text, cover_image - "plain" (~20 KB, default) — above + plain_text + media URL list + lifecycle_state. The LLM-friendly shape. - "full" (~150 KB+) — raw GraphQL payload including the heavy content_state rich-block tree. Use only when you need it (rich-content rendering, archiving, structure analysis).
Inputs: article_id (required), format. Returns: result
get_article_previewA
Get title/preview/cover of an X Article embedded in a tweet.
Uses X's public syndication endpoint — no authentication required.
Args: tweet_id: ID (numeric string) or full URL of a tweet that links to an article.
Inputs: tweet_id (required). Returns: result
get_bookmarksB
Get bookmarked tweets (paginated).
Args:
count: Number of bookmarks to fetch (default 20, max 100).
cursor: Pagination cursor from a previous response's next_cursor.
Inputs: count, cursor. Returns: result
get_communities_timelineA
Get tweets from communities the authenticated user has joined (paginated).
Args:
count: Number of tweets to fetch (default 20, max 100).
cursor: Pagination cursor from a previous response's next_cursor.
Inputs: count, cursor. Returns: result
get_communityA
Get a Twitter Community by ID.
Args: community_id: The community ID.
Inputs: community_id (required). Returns: result
get_community_membersA
Get members of a Twitter Community (paginated).
Args:
community_id: The community ID.
count: Number of members to fetch (default 20, max 100).
cursor: Pagination cursor from a previous response's next_cursor.
Inputs: community_id (required), count, cursor. Returns: result
get_community_moderatorsA
Get moderators of a Twitter Community (paginated).
Args:
community_id: The community ID.
count: Number of moderators to fetch (default 20, max 100).
cursor: Pagination cursor from a previous response's next_cursor.
Inputs: community_id (required), count, cursor. Returns: result
get_community_tweetsA
Get tweets from a Twitter Community (paginated).
Args:
community_id: The community ID.
tweet_type: One of "Top", "Latest", or "Media".
count: Number of tweets to fetch (default 40, max 100).
cursor: Pagination cursor from a previous response's next_cursor.
Inputs: tweet_type (required), community_id (required), count, cursor. Returns: result
get_dm_historyA
Get DM conversation history with a user.
Note: Retrieves PRIVATE messages. Do not bulk-call. X has aggressive anti-spam on DMs and may suspend the account.
Returns JSON with messages (id/text/sender_id/recipient_id/time),
next_cursor for pagination via max_id, and when present:
timeline_events (non-message entries such as trust_conversation)
and warnings (e.g. incomplete history for end-to-end encrypted /
X Chat conversations — legacy DM history does not return ciphertext
bodies after upgrade).
Args:
screen_name: Twitter username (without @).
max_id: If specified, retrieves messages older than this ID (for pagination).
Pass the value from a previous response's next_cursor here on the
next call to walk further back in time.
Inputs: screen_name (required), max_id. Returns: result
get_favoritersA
Get users who liked a tweet (paginated).
Args:
tweet_id: The tweet ID.
count: Number of users to fetch (default 40, max 100).
cursor: Pagination cursor from a previous response's next_cursor.
Inputs: tweet_id (required), count, cursor. Returns: result
get_listC
Get a Twitter List by ID.
Args: list_id: The list ID.
Inputs: list_id (required). Returns: result
get_list_membersA
Get members of a Twitter List (paginated).
Args:
list_id: The list ID.
count: Number of members to fetch (default 20, max 100).
cursor: Pagination cursor from a previous response's next_cursor.
Inputs: list_id (required), count, cursor. Returns: result
get_listsA
Get the authenticated user's Twitter Lists (paginated).
Args:
count: Number of lists to fetch (default 20, max 100).
cursor: Pagination cursor from a previous response's next_cursor.
Inputs: count, cursor. Returns: result
get_list_subscribersA
Get subscribers of a Twitter List (paginated).
Args:
list_id: The list ID.
count: Number of subscribers to fetch (default 20, max 100).
cursor: Pagination cursor from a previous response's next_cursor.
Inputs: list_id (required), count, cursor. Returns: result
get_list_tweetsA
Get tweets from a Twitter List (paginated).
Args:
list_id: The list ID.
count: Number of tweets to fetch (default 20, max 100).
cursor: Pagination cursor from a previous response's next_cursor.
Inputs: list_id (required), count, cursor. Returns: result
get_notificationsA
Fetch notifications (paginated).
Args:
notification_type: One of "All", "Verified", "Mentions" (default "All").
count: Number to fetch (default 40, max 100).
cursor: Pagination cursor from a previous response's next_cursor.
Inputs: count, cursor, notification_type. Returns: result
get_retweetersA
Get users who retweeted a tweet (paginated).
Args:
tweet_id: The tweet ID.
count: Number of users to fetch (default 40, max 100).
cursor: Pagination cursor from a previous response's next_cursor.
Inputs: tweet_id (required), count, cursor. Returns: result
get_scheduled_tweetsA
Return all scheduled tweets for the authenticated user.
Note: returns the FULL list in one call — twikit's API does not paginate scheduled tweets. This is fine in practice since X caps scheduled tweets per account at a small number.
Scheduled tweets follow X's standard rate limits, no special caveats needed.
Inputs: no named parameters. Returns: result
get_timelineB
Fetch home timeline tweets.
Args: count: Number of tweets to fetch (default 20).
Inputs: count. Returns: result
get_trendsA
Get trending topics by category.
Args: category: One of "trending", "for-you", "news", "sports", "entertainment" (default "trending"). count: Number of trends to fetch (default 20).
Inputs: count, category. Returns: result
get_tweetA
Fetch a tweet by ID.
Args: tweet_id: The tweet ID (numeric string) or full URL.
Inputs: tweet_id (required). Returns: result
get_tweet_repliesA
Fetch replies (comments) to a tweet (issue #94).
Uses X's TweetDetail GraphQL endpoint via vendored twikit's
Client.get_tweet_by_id, which populates tweet.replies as a
paginated Result[Tweet]. One page per call; pass the returned
next_cursor to fetch more.
Args:
tweet_id: The tweet ID (numeric string) or full URL.
cursor: Pagination cursor from a previous response's
next_cursor; omit for the first page.
Returns: JSON with tweet_id, replies (compact list — id/author/text/ created_at/likes/retweets), next_cursor, count.
Inputs: tweet_id (required), cursor. Returns: result
get_user_followersA
Get a user's followers list.
Note: X aggressively rate-limits follower / following requests — use
sparingly, paginate via cursor, don't loop without backoff.
Caller must provide exactly one of screen_name / user_id.
Args:
screen_name: Twitter username (without @).
user_id: Twitter numeric user ID.
count: Number of followers to fetch (default 20, max 100).
cursor: Pagination cursor from a previous response's next_cursor.
Inputs: count, cursor, user_id, screen_name. Returns: result
get_user_followingA
Get accounts that a user follows (their following list).
Note: X aggressively rate-limits follower / following requests — use
sparingly, paginate via cursor, don't loop without backoff.
Caller must provide exactly one of screen_name / user_id.
Args:
screen_name: Twitter username (without @).
user_id: Twitter numeric user ID.
count: Number to fetch (default 20, max 100).
cursor: Pagination cursor from a previous response's next_cursor.
Inputs: count, cursor, user_id, screen_name. Returns: result
get_user_infoA
Get a user's profile metadata by screen name OR numeric user ID.
Caller must provide exactly one of screen_name / user_id.
Args: screen_name: Twitter username (without @). user_id: Twitter numeric user ID.
Inputs: user_id, screen_name. Returns: result
get_user_tweetsB
Get recent tweets from a specific user.
Args: screen_name: Twitter username (without @). count: Number of tweets to fetch (default 20).
Inputs: screen_name (required), count. Returns: result
join_communityC
Join a Twitter Community.
Args: community_id: The community ID to join.
Inputs: community_id (required). Returns: result
leave_communityA
Leave a Twitter Community.
Args: community_id: The community ID to leave.
Inputs: community_id (required). Returns: result
like_tweetC
Like a tweet by ID.
Args: tweet_id: The tweet ID.
Inputs: tweet_id (required). Returns: result
mute_userA
Mute a user by screen name.
Note: X aggressively rate-limits / risk-scans block + mute. Avoid bulk usage or your account may be temporarily restricted.
Args: screen_name: Twitter username (without @).
Inputs: screen_name (required). Returns: result
remove_list_memberA
Remove a user from a Twitter List.
Caller must provide exactly one of screen_name / user_id.
Args: list_id: The list ID (required). screen_name: Twitter username (without @). user_id: Twitter numeric user ID.
Inputs: list_id (required), user_id, screen_name. Returns: result
request_to_join_communityA
Request to join a Twitter Community.
For communities with restricted join policies that require moderator
approval, an answer to the join request question may be required.
Args: community_id: The community ID to request to join. answer: Optional answer to the join request question (required for some communities with moderator approval policy).
Inputs: community_id (required), answer. Returns: result
retweetC
Retweet a tweet by ID.
Args: tweet_id: The tweet ID.
Inputs: tweet_id (required). Returns: result
search_communityB
Search for Twitter Communities by query (paginated).
Note: twikit's search_community does not support a count parameter.
Args:
query: Search query string.
cursor: Pagination cursor from a previous response's next_cursor.
Inputs: query (required), cursor. Returns: result
search_community_tweetA
Search tweets within a Twitter Community (paginated).
Args:
community_id: The community ID.
query: Search query string.
count: Number of tweets to fetch (default 20, max 100).
cursor: Pagination cursor from a previous response's next_cursor.
Inputs: query (required), community_id (required), count, cursor. Returns: result
search_tweetsB
Search tweets.
Args: query: Search query string. count: Number of results (default 20). product: "Latest" or "Top" (default "Latest").
Inputs: query (required), count, product. Returns: result
search_userA
Search for users by query (paginated).
Args:
query: Search query string.
count: Number of users to fetch (default 20, max 100).
cursor: Pagination cursor from a previous response's next_cursor.
Inputs: query (required), count, cursor. Returns: result
send_dmA
Send a direct message to a user by screen name.
Note: Sends a PRIVATE message. Do not bulk-call. X has aggressive anti-spam on DMs and may suspend the account.
Args: screen_name: Twitter username (without @) to send the DM to. text: Message content (required, must not be empty). media_id: Optional media ID to attach.
Inputs: text (required), screen_name (required), media_id. Returns: result
send_dm_to_groupA
Send a direct message to a group conversation.
Note: Sends a PRIVATE message. Do not bulk-call. X has aggressive anti-spam on DMs and may suspend the account.
Args: group_id: The group conversation ID. text: Message content (required, must not be empty). media_id: Optional media ID to attach.
Inputs: text (required), group_id (required), media_id. Returns: result
send_tweetA
Send a tweet. Optionally reply to a tweet by ID.
Args: text: Tweet content (max 280 chars). reply_to: Optional tweet ID to reply to.
Inputs: text (required), reply_to. Returns: result
unblock_userA
Unblock a user by screen name.
Note: X aggressively rate-limits / risk-scans block + mute. Avoid bulk usage or your account may be temporarily restricted.
Args: screen_name: Twitter username (without @).
Inputs: screen_name (required). Returns: result
unfavorite_tweetA
Unlike a tweet by ID.
Args: tweet_id: The tweet ID to unlike.
Inputs: tweet_id (required). Returns: result
unfollow_userA
Unfollow a user by screen name.
Note: X aggressively rate-limits follow / unfollow — avoid bulk usage or your account may be temporarily restricted.
Args: screen_name: Twitter username (without @).
Inputs: screen_name (required). Returns: result
unmute_userA
Unmute a user by screen name.
Note: X aggressively rate-limits / risk-scans block + mute. Avoid bulk usage or your account may be temporarily restricted.
Args: screen_name: Twitter username (without @).
Inputs: screen_name (required). Returns: result
voteA
Vote on an X poll.
X polls have 2-4 choices and a duration in minutes. The card_uri and card_name come from the tweet's poll card metadata (obtainable via get_tweet).
Args: selected_choice: The label of the choice to vote for (must be non-empty). card_uri: The poll card URI (from the tweet's poll card metadata). tweet_id: The ID of the tweet containing the poll. card_name: The name of the poll card (from the tweet's poll card metadata).
Inputs: card_uri (required), tweet_id (required), card_name (required), selected_choice (required). Returns: result
xchat_get_historyA
Read messages from one XChat (encrypted DM) conversation.
Note: returns PRIVATE decrypted message text from your own machine. Reading here does NOT mark the conversation read on X.
Returns JSON messages oldest-first: text, timestamp,
direction (incoming/outgoing), sender_screen_name,
sequence_number, has_attachment.
Args: conversation_id: From xchat_list_conversations. limit: Max messages, most recent kept (1-500, default 50).
Inputs: conversation_id (required), limit. Returns: result
xchat_list_conversationsA
List XChat (encrypted DM) conversations, newest activity first.
Note: returns PRIVATE message previews from your own machine.
Returns JSON conversations: conversation_id, name, screen_name,
preview (latest message text; [image attachment]-style placeholder
when the message carried no text), timestamp, unread.
Args: limit: Max conversations to return (1-500, default 50). unread_only: Only conversations with unread messages.
Inputs: limit, unread_only. Returns: result
xchat_statusA
Check whether XChat (encrypted DMs) can be read on this machine.
Reads X's locally decrypted store — the browser did the decryption; this only opens the resulting SQLite file read-only. Nothing is sent, marked read, or modified.
Returns JSON with state, and when a store is readable:
database_path, conversation_count, last_updated. When no store
is configured, returns discovery listing the XChat databases found
in local browser profiles so you can pick one.
Configure with XCHAT_BROWSER (auto/chrome/chromium/edge/brave/aside),
XCHAT_BROWSER_PROFILE, or XCHAT_DATABASE_PATH.
Inputs: no named parameters. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 62 tools
Most tools map to clear resource+action pairs, but a few seams are ambiguous: get_article_preview vs get_article, get_dm_history vs xchat_get_history, and join_community vs request_to_join_community could all mislead an agent. The detailed descriptions help, but the near-overlapping purposes are not obvious from names alone.
The overwhelming majority follow a clean verb_noun snake_case pattern, e.g. get_tweet, delete_tweet, create_list, follow_user. Minor asymmetries like unfavorite_tweet vs like_tweet, delete_bookmark vs bookmark_tweet, and search_community_tweet vs search_tweets prevent a perfect score.
With 62 tools, this server far exceeds the 25+ threshold and bundles many distinct subdomains: tweets, DMs, lists, communities, scheduled posts, polls, articles, and XChat. Even if each tool is individually useful, the sheer volume makes the toolset unwieldy and hard for an agent to navigate efficiently.
The surface is broad but has notable dead ends: there is no delete_list despite full list CRUD otherwise, no media upload tool even though media_ids appear in several args, and create_poll returns a poll_uri that send_tweet does not actually accept. These are significant gaps that will cause real agent workflow failures.
Maintenance
Related MCP Connectors
Hosted X (Twitter) MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Twitter/X read-only MCP server — 12 tools: search, users, tweets, followers, timelines, trends.
Official twitterapi.io hosted MCP: Twitter/X tweets, users, followers, trends. OAuth or API key.
Official MCP server for twitterapis.com. Twitter/X search, users, DMs, Grok, monitoring and writes.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server for interacting with the Twitter/X API v2, enabling AI assistants to retrieve tweets, post content, reply, quote, and more programmatically.1,950 npm13MIT
- FlicenseAqualityDmaintenanceAn MCP server for interacting with X/Twitter, enabling posting tweets, searching, user info, timeline, liking, retweeting, and deleting tweets.712 npm1-
- AlicenseNot gradedqualityDmaintenanceAn MCP server that enables posting tweets, reading timelines, searching posts, and interacting with X (Twitter) API.18 npm2MIT
- AlicenseAqualityBmaintenanceMCP server for the Twitter/X API, enabling search, user profiles, tweets, followers, and more via natural language.941,114 npm6MIT