
MCP-Twikit
Search Twitter/X and read your home timeline from an MCP client, using the twikit library.
Add to your client
Copy the config for your MCP client and paste it into its config file.
npx -y @smithery/cli install mcp-twikit --client claudePaste into ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"mcp-twikit": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/adhikasp/mcp-twikit",
"mcp-twikit"
],
"env": {
"TWITTER_USERNAME": "@example",
"TWITTER_EMAIL": "me@example.com",
"TWITTER_PASSWORD": "secret"
}
}
}
}Requires `uv` (the Python package runner). Install it from https://docs.astral.sh/uv/ if `uvx` is not found.
Step-by-step guides: Add to Claude Desktop · Add to Cursor · Add to Windsurf
Before you start
- uv / uvx (to run the server from the GitHub repo)
- A Twitter account (username, email, and password supplied as environment variables)
About MCP-Twikit
A Model Context Protocol server that exposes Twitter functionality to MCP-compatible clients such as Claude Desktop. Built on the twikit Python library, it authenticates with a Twitter account using username/email/password environment variables and provides tools to search tweets and fetch the user's home timeline. It is installed via Smithery or run manually with uvx from the GitHub repository.
Tools & capabilities (2)
search_twitterSearch Twitter for tweets matching a query. Demonstrated with arguments query (e.g. 'to:IndiHomeCare'), count (number of tweets), and sort_by (e.g. 'Latest').
get_timelineRetrieve the latest tweets from the authenticated user's home timeline.
When to use it
- Compare public sentiment across multiple Twitter accounts by searching recent tweets directed at each
- Summarize the latest highlights from your own Twitter home timeline
- Pull recent tweets matching a query for analysis by an LLM
Security notes
Authenticates by logging in with your real Twitter account credentials (TWITTER_USERNAME, TWITTER_EMAIL, TWITTER_PASSWORD) supplied as environment variables, rather than an official API token. Storing and using account credentials this way carries account-security and Twitter terms-of-service risk; use a dedicated/secondary account and keep credentials out of source control.
MCP-Twikit FAQ
Does this require the official Twitter API?
No. It uses the twikit library and logs in with your own Twitter account credentials (username, email, password) provided as environment variables.
How do I install it?
Automatically via Smithery (`npx -y @smithery/cli install mcp-twikit --client claude`), or manually by adding the provided config that runs `uvx --from git+https://github.com/adhikasp/mcp-twikit mcp-twikit` with your Twitter credentials in env.
What tools does it expose?
The documented tools are search_twitter (search for tweets by query, count, and sort order) and get_timeline (read your home timeline).
Alternatives to MCP-Twikit
Compare all alternatives →Connect your personal WhatsApp: search, read and send messages and media locally
Powerful Slack MCP with stdio/SSE/HTTP, DMs, group DMs and no-admin token auth
Full Telegram user-account MCP via MTProto: read chats, manage groups, send messages