Post, delete & read on X (Twitter) using your own logged-in web session β no paid API.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Post, delete & read on X (Twitter) β from Python and as an MCP server β using your own logged-in browser session.
No paid API. No developer app. No OAuth dance. Just your session cookie.
Quick start Β· Get your cookie Β· Python Β· CLI Β· MCP server Β· How it works Β· Disclaimer
Since February 6, 2026, X's official API has no free tier for new developers β it's pay-per-use: ~$0.015 per post, ~$0.20 per post with a link, plus per-read charges. For publishing your own tweets (a bot posting your content, a scheduled thread, a cleanup script that deletes old posts), that's a recurring bill for something your browser already does for free.
tweetkit-x skips the API entirely. It replays the exact internal HTTP calls your browser makes when you click Post, Delete, or scroll your profile β authenticated with the session cookie you already have. Post, delete, and read the full timeline, at zero API cost.
β οΈ Automating your web session is against X's Terms of Service. This is a grey-area tool for personal automation. Account risk is entirely yours. See the Disclaimer.
SearchTimeline (operators like from:, min_faves:, filter:media), plus local regex over your own tweetsCookie: header, drop a HAR file, or a storage-dump zip; store in a file or the macOS Keychaintweetkit β¦)The only secret tweetkit needs is your X session cookie β the same Cookie: header your logged-in browser sends. It must contain at least two values:
| Cookie | What it is | Required | HttpOnly? |
|---|---|---|---|
auth_token | your login/session token | yes | yes (hidden from document.cookie) |
ct0 | CSRF token (sent back as x-csrf-token) | yes | no |
twid | your user id (u=<id>) β lets tweetkit read your timeline with no extra lookup | recommended | no |
guest_id, kdt, att, personalization_id | misc session state | optional | mixed |
β
auth_tokenis HttpOnly, so adocument.cookiecopy in the JS console will NOT include it. Use one of the reliable methods below.
Cookie: header (most reliable, one paste)x.com (e.g. HomeTimeline).cookie: and copy the entire value.Modern Chrome can redact cookies from exported HARs. If tweetkit reports
auth_tokenmissing, either enable "Allow to generate HAR with sensitive data" in the Network settings, or fall back to Method A / Method C.
The easiest no-DevTools route. storagedump (a Chrome extension built by this project's author) exports a tab's browser storage β including the HttpOnly auth_token, which document.cookie can't reach β as a .zip containing cookies.json. On x.com (logged in), click the extension β export, then:
tweetkit reads the extension's native format, { "data": [ { "key": "...", "value": "..." }, ... ] }, and also accepts a plain list or a {name: value} map. Cookie-Editor / EditThisCookie JSON exports (--file export.json) work too.
Install: storagedump on the Chrome Web Store.
By default tweetkit import writes ~/.config/tweetkit/cookie.txt (chmod 600; also git-ignored). Prefer the macOS Keychain? Add --keychain <slug>:
Resolution order at runtime (first hit wins): explicit arg β TWEETKIT_COOKIE β TWEETKIT_COOKIE_FILE β ./cookie.txt β ~/.config/tweetkit/cookie.txt β Keychain (TWEETKIT_COOKIE_KEYCHAIN).
Every write returns {'ok': True, 'id': '...', 'url': '...'} on success, or {'ok': False, 'status': ..., 'error': '...'} on failure β easy to log or retry.
See examples/ for a full "find my $XMR tweets and delete them" cleanup loop.
A thread.txt is just tweets separated by blank lines.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/tweetkit-x)<a href="https://allmcps.com/mcp/tweetkit-x"><img src="https://allmcps.com/api/badge/tweetkit-x?style=directory" alt="Tweetkit X on AllMCPs" /></a>