tweetkit-x — Claude Code MCP server: what it does, how to install
Manages posts, deletes entries, and reads timelines on X through your logged-in browser session without paid API access.
claude mcp add --env TWEETKIT_COOKIE_KEYCHAIN=<TWEETKIT_COOKIE_KEYCHAIN> --env TWEETKIT_COOKIE=<TWEETKIT_COOKIE> --transport stdio tweetkit-x -- uvx tweetkit-xWhat tweetkit-x does
This server connects an AI assistant to X by exposing 40 MCP tools. It handles text posts, threads, media uploads with up to 4 images, quote posts, and timeline searches without official developer credentials.
No headless browser is required. The program replays standard web client HTTP calls directly. Authentication relies on your active browser session cookies, specifically auth_token and ct0. You supply them through the TWEETKIT_COOKIE environment variable, an imported file, or the macOS Keychain.
Automating a regular web session directly conflicts with the X terms of service. Account suspension risks remain entirely with the user.
What it helps with
- publish tweets, threads, and media attachments without paid API fees
- batch delete past posts matching specific identifiers
- read home timelines, conversation threads, and bookmark collections
- trigger likes, reposts, blocks, and pin actions via an agent
Example prompts for the agent
- Post a tweet saying "Release v1.2 is live" with release-card.png attached
- Find my old posts mentioning deprecated-tool and remove them
- Fetch the latest posts from my home timeline
How to install tweetkit-x
Platform CLI
claude mcp add --env TWEETKIT_COOKIE_KEYCHAIN=<TWEETKIT_COOKIE_KEYCHAIN> --env TWEETKIT_COOKIE=<TWEETKIT_COOKIE> --transport stdio tweetkit-x -- uvx tweetkit-xReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from tweetkit-x <command>
Platform CLI
codex mcp add tweetkit-x --env TWEETKIT_COOKIE_KEYCHAIN=<TWEETKIT_COOKIE_KEYCHAIN> --env TWEETKIT_COOKIE=<TWEETKIT_COOKIE> -- uvx tweetkit-xReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from tweetkit-x <command>
Config file
{
"mcpServers": {
"tweetkit-x": {
"command": "uvx",
"args": [
"tweetkit-x"
],
"env": {
"TWEETKIT_COOKIE_KEYCHAIN": "<TWEETKIT_COOKIE_KEYCHAIN>",
"TWEETKIT_COOKIE": "<TWEETKIT_COOKIE>"
}
}
}
}Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from tweetkit-x <command>
Config file
{
"servers": {
"tweetkit-x": {
"type": "stdio",
"command": "uvx",
"args": [
"tweetkit-x"
],
"env": {
"TWEETKIT_COOKIE_KEYCHAIN": "<TWEETKIT_COOKIE_KEYCHAIN>",
"TWEETKIT_COOKIE": "<TWEETKIT_COOKIE>"
}
}
}
}Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from tweetkit-x <command>
Platform CLI
gemini mcp add -e TWEETKIT_COOKIE_KEYCHAIN=<TWEETKIT_COOKIE_KEYCHAIN> -e TWEETKIT_COOKIE=<TWEETKIT_COOKIE> tweetkit-x uvx tweetkit-xReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from tweetkit-x <command>
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about tweetkit-x
How do I install tweetkit-x in Claude Code?
Run claude mcp add tweetkit-x -e TWEETKIT_COOKIE=<TWEETKIT_COOKIE> -- uvx tweetkit-x. Replace <TWEETKIT_COOKIE> with your raw session cookie string from the browser.
What does tweetkit-x do?
It exposes 40 MCP tools that run Twitter actions by mimicking browser network calls. The server publishes updates, reads timelines, searches posts, and cleans up profile history.
Does tweetkit-x require an official X developer key?
No developer account or paid tier is necessary. Authentication relies exclusively on active web session cookies containing auth_token and ct0.