
twscrape Twitter/X (read-only)
io.github.jsiletsPublished by GitHub account jsiletsv0.1.2Updated Oct 24, 2026
Read-only X/Twitter MCP: posts, threads, replies, search via twscrape. No API key.
Overview
Read-only X/Twitter MCP server that lets an assistant fetch posts, threads, replies, quotes, timelines, profiles and search results using your own logged-in…
- What you can do
- Read single posts as clean markdown, including media and external links
- Read threads, replies and quote-tweets for a given post
- List a user's recent posts, optionally including replies
- Search X with operators such as from:, has:media and min_faves:
- Look up a user profile with bio, location, counts and join date
- When to use it
- Useful when you want an assistant to research or summarize public X conversations, follow a specific account's recent posts, or pull replies and quotes around a post without paying for the X API or holding a developer account.
- Requirements
- Runs locally over stdio as a Python package installed with uv tool install or pipx (uvx also listed). Needs a one-time authentication step: launching a dedicated Chrome/Brave profile to sign in to X, attaching to an isolated Chromium profile with a debug port, or supplying auth_token and ct0 cookies via hidden prompts. Optional environment variables cover the data directory, account database, proxy, CDP URL, default result limit and HTTP bearer token.
Installation
In SourceWeft
- Open twscrape Twitter/X (read-only) in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
twscrape-twitter-mcp
[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.
Tools
Install
Then authenticate once (next section) and verify:
Authenticate
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.
Connect your client
The server runs locally over stdio. Most MCP clients take a JSON block like this:
Client-specific equivalents:
Claude Code
Claude Desktop
Add the JSON block above to claude_desktop_config.json
(Settings → Developer → Edit Config).
Codex — ~/.codex/config.toml
Cursor — ~/.cursor/mcp.json
VS Code — .vscode/mcp.json
Remote (Streamable HTTP)
For 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>".
Deploy
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:
Fly.io
Railway
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>.
Configuration
How it works
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.
Limits
- X can expire, rate-limit, or suspend the account behind your session.
- Protected, deleted, geo-blocked, or otherwise restricted posts may not be readable.
- Quote-tweet coverage is search-based and incomplete.
- Search results depend on X's current search behavior and can vary by session.
- It does not decrypt browser cookie stores — use browser attach or cookie
init.
Legal
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.
License
MIT.
Credits
The hard scraping work is twscrape by
vladkens. This is a read-only MCP layer on top — go star it.
Source: README.md at commit dabefb8
Tools
0Version history
1- v0.1.2LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts
