auth_status
Auth Status
Check whether this server has an active X session, without exposing cookies.
無需輸入參數。

io.github.jsilets由 GitHub 帳號 jsilets 發布v0.1.6更新於 Nov 8, 2026
Read-only X/Twitter MCP: posts, threads, replies, search via twscrape. No API key.
唯讀的 X/Twitter MCP 伺服器,讓助理用你自己的已登入工作階段讀取貼文、長推文串、回覆、引用、時間軸與搜尋結果。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
參照 儲存庫 中的啟動說明。
[PyPI] [CI] [Python] [License: MIT] [MCP]
An MCP server that reads X (Twitter): posts, threads, replies, quotes, and search. It wraps twscrape and uses your own logged-in session, so there's no paid X API and no developer account. Tools return clean markdown shaped for an agent to read, including image, video, and GIF URLs and any external links in a post.
Works with any MCP client over the two standard transports — local stdio and hosted Streamable HTTP.
Then authenticate once (next section) and verify:
Reads run against your own X session. Pick one path:
1. Launch a dedicated browser (recommended). Opens a separate Chrome/Brave profile with a DevTools port, you sign in to X once, and the session is captured. It does not touch your daily browser or automate X's login flow.
2. Attach to a dedicated browser profile. Only use this when you already run an isolated Chromium profile with a debug port. Browser debugging exposes browser data, and recent Chrome versions do not enable it for the default profile.
3. Headless / CI (raw cookies). A server can't open your desktop browser, so
add a session from auth_token + ct0 cookies. Run this without cookie flags to
enter values through hidden prompts, rather than leaving secrets in shell history:
The captured session is reused across restarts. Run login --launch-browser chrome again when it expires,
or to add burner sessions for rate-limit rotation. twscrape-twitter-mcp accounts
lists the pool.
Use burner accounts, not your main — see Legal.
The server runs locally over stdio. Most MCP clients take a JSON block like this:
Client-specific equivalents:
Add the JSON block above to claude_desktop_config.json
(Settings → Developer → Edit Config).
~/.codex/config.toml~/.cursor/mcp.json.vscode/mcp.jsonFor a hosted private instance (see Deploy), point a preconfigured client at the HTTP endpoint with a bearer token. This is static bearer auth, not an OAuth sign-in flow.
Then ask, e.g. "read this thread: <url>".
Run the server always-on and reachable over HTTP (POST /mcp). It ships as a
container; Cloudflare Workers won't work because twscrape is Python with native
deps.
A headless container can't open your desktop browser, so authenticate locally
first (login --attach writes storage_state.json under
TWSCRAPE_TWITTER_MCP_HOME), then ship that session to the host — copy the file to
the mounted volume, or run the cookie-based init over SSH. The server reloads a
persisted session on boot.
Always set a token when exposing HTTP — anyone who can reach the endpoint can use your X session:
Point Railway at this repo (it reads railway.json + Dockerfile), add a volume
mounted at /data, set TWSCRAPE_TWITTER_MCP_AUTH_TOKEN, and seed a session via
the Railway shell with twscrape-twitter-mcp init.
Clients send Authorization: Bearer <token>.
The hard part of reading X — GraphQL signing, the x-client-transaction-id
header, TLS fingerprinting — lives entirely in twscrape, which is pinned.
This package is a read-only MCP layer on top and never
touches that machinery. When X changes something and reads break, the fix is a
version bump, not reverse-engineering.
init.Reading X with your own logged-in session may violate X's Terms of Service, and accounts used for scraping can be rate-limited or suspended. Use burner accounts, not your main. Provided as-is for research and personal use; you are responsible for how you use it.
MIT.
The hard scraping work is twscrape by
vladkens. This is a read-only MCP layer on top — go star it.
來源:README.md,提交 dabefb8
Auth Status
Check whether this server has an active X session, without exposing cookies.
無需輸入參數。
Read Tweet
Read a single X post by URL or numeric id. Returns clean markdown.
url_or_id必填User Profile
Read an X user's profile by handle. Returns clean markdown. Pass the handle with or without a leading @.
username必填Read Thread
Read a full X thread as markdown: the root post, the author's self-thread, and top replies. Pass any tweet in the thread.
url_or_id必填max_repliesinclude_repliesRead Replies
Read the replies to an X post as markdown.
limiturl_or_id必填Read Quotes
Read quote-tweets of an X post (best-effort, via search:quoted_tweet_id). Coverage is partial, X does not expose a complete quotes endpoint.
limiturl_or_id必填User Timeline
Read a user's recent posts as markdown, newest first. Pass the handle with or without a leading @. Set include_replies=True to include the user's replies alongside their standalone posts.
limitusername必填include_repliesSearch
Search X and return matching posts as markdown. product: "Latest" | "Top" | "Media". Supports X operators, e.g. from:user, to:user, has:media, -is:retweet, min_faves:100, since:2026-01-01.
limitquery必填product已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
uv tool install twscrape-twitter-mcp # or: pipx install twscrape-twitter-mcptwscrape-twitter-mcp smoke # reads one public tweet end-to-endtwscrape-twitter-mcp login --launch-browser chrome # or: brave# macOS"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" --remote-debugging-port=9222 --user-data-dir=/tmp/x-mcp-browser# Linux: google-chrome --remote-debugging-port=9222 --user-data-dir=/tmp/x-mcp-browser# Windows: "C:\Program Files\Google\Chrome\Application\chrome.exe" --remote-debugging-port=9222 --user-data-dir=%TEMP%\x-mcp-browser
twscrape-twitter-mcp login --attach # add --cdp-url for a non-default porttwscrape-twitter-mcp init{ "mcpServers": { "x": { "command": "twscrape-twitter-mcp", "args": ["serve", "--transport", "stdio"] } }}claude mcp add x --scope user -- twscrape-twitter-mcp serve --transport stdio[mcp_servers.x]command = "twscrape-twitter-mcp"args = ["serve", "--transport", "stdio"]{ "mcpServers": { "x": { "command": "twscrape-twitter-mcp", "args": ["serve", "--transport", "stdio"] } }}{ "servers": { "x": { "command": "twscrape-twitter-mcp", "args": ["serve", "--transport", "stdio"] } }}{ "mcpServers": { "x": { "url": "https://YOUR-APP.example.com/mcp", "headers": { "Authorization": "Bearer YOUR_TOKEN" } } }}export TWSCRAPE_TWITTER_MCP_AUTH_TOKEN=$(openssl rand -hex 32)fly launch --no-deployfly volumes create twscrape_twitter_mcp_data --size 1fly secrets set TWSCRAPE_TWITTER_MCP_AUTH_TOKEN=$(openssl rand -hex 32)fly deploy# seed a session onto the volume through hidden prompts:fly ssh console -C "twscrape-twitter-mcp init"