MCP Twikit
A Model Context Protocol server that enables AI to interact with Twitter, allowing functions like searching tweets, comparing sentiments across accounts, and retrieving timeline content.
What is MCP Twikit?
MCP Twikit is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to model context protocol server that enables ai to interact with twitter, allowing functions like searching tweets, comparing sentiments across accounts, and retrieving timeline content.
A Model Context Protocol server that enables AI to interact with Twitter, allowing functions like searching tweets, comparing sentiments across accounts, and retrieving timeline content.
This server falls under the Search & Data Extraction category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- A Model Context Protocol server that enables AI to interact
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx mcp-twikitConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use MCP Twikit
MCP Twikit is a Model Context Protocol server that enables AI assistants to interact with Twitter/X through the twikit Python library, without requiring official Twitter API credentials or paid developer access. It exposes tools for searching tweets with filtering options and retrieving your home timeline, allowing AI agents to analyze Twitter content, compare sentiment across accounts, and surface trending discussions on demand. Developers and researchers use it to let Claude or other LLMs query Twitter data and perform sentiment analysis as part of larger workflows.
Prerequisites
- Python 3.10 or later and uv package manager installed (`pip install uv`)
- A Twitter/X account (username, email, and password — twikit uses cookie-based session login, not the official API)
- Claude Desktop, Claude Code, or another MCP-compatible client
- Git (for installing directly from GitHub)
Install uv if not already present
mcp-twikit is run via uvx, which requires the uv package manager.
pip install uvInstall mcp-twikit via Smithery (easiest) or manually
The fastest way is via the Smithery CLI. Alternatively, install directly from the GitHub repository using uvx.
# Via Smithery (recommended)
npx -y @smithery/cli install mcp-twikit --client claude
# Or manually via uvx
uvx --from git+https://github.com/adhikasp/mcp-twikit mcp-twikitAdd the server to your MCP client configuration
Add mcp-twikit to your Claude Desktop config with your Twitter credentials as environment variables. Note: twikit logs in via cookie session, so your actual Twitter username, email, and password are required.
{
"mcpServers": {
"mcp-twikit": {
"command": "uvx",
"args": ["--from", "git+https://github.com/adhikasp/mcp-twikit", "mcp-twikit"],
"env": {
"TWITTER_USERNAME": "@your_handle",
"TWITTER_EMAIL": "[email protected]",
"TWITTER_PASSWORD": "your_password"
}
}
}
}Restart your MCP client
Restart Claude Desktop or reload MCP servers in Claude Code to initialize the twikit server and establish the Twitter session.
Test with a basic search
Ask Claude to search for a topic on Twitter to verify the connection is working.
MCP Twikit Examples
Client configuration
Claude Desktop configuration for mcp-twikit. Replace the Twitter credentials with your own account details.
{
"mcpServers": {
"mcp-twikit": {
"command": "uvx",
"args": ["--from", "git+https://github.com/adhikasp/mcp-twikit", "mcp-twikit"],
"env": {
"TWITTER_USERNAME": "@your_handle",
"TWITTER_EMAIL": "[email protected]",
"TWITTER_PASSWORD": "your_password"
}
}
}
}Prompts to try
These prompts use the search_twitter and get_timeline tools exposed by mcp-twikit.
- "Search Twitter for the 20 most recent tweets about 'Claude AI' and summarize the sentiment"
- "What is happening on my Twitter timeline right now?"
- "Compare the 20 latest tweets directed at @OpenAI and @Anthropic — what sentiment do people have toward each?"
- "Find the top tweets about the latest iPhone release and identify the main complaints"
- "Search Twitter for 'Python MCP' and summarize what developers are saying"Troubleshooting MCP Twikit
Login fails with 'Wrong credentials' or twikit authentication error
Verify that TWITTER_USERNAME includes the @ symbol (e.g., @yourhandle), TWITTER_EMAIL matches your account's registered email, and TWITTER_PASSWORD is correct. If your account has two-factor authentication enabled, you may need to temporarily disable it or use an app-specific workaround.
uvx fails to install from the GitHub URL
Ensure git is installed and accessible. Try running the uvx command manually in a terminal to see the full error: `uvx --from git+https://github.com/adhikasp/mcp-twikit mcp-twikit`. If git is missing, install it with your OS package manager.
Twitter rate limiting or account suspension
twikit uses cookie-based session login which mimics browser behavior. Excessive automated requests can trigger Twitter's rate limits or account review. Space out searches, keep request counts reasonable (the search tool accepts a count parameter), and avoid running very high-frequency queries.
Frequently Asked Questions about MCP Twikit
What is MCP Twikit?
MCP Twikit is a Model Context Protocol (MCP) server that model context protocol server that enables ai to interact with twitter, allowing functions like searching tweets, comparing sentiments across accounts, and retrieving timeline content. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install MCP Twikit?
Follow the installation instructions on the MCP Twikit GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with MCP Twikit?
MCP Twikit works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is MCP Twikit free to use?
Yes, MCP Twikit is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.
MCP Twikit Alternatives — Similar Search & Data Extraction Servers
Looking for alternatives to MCP Twikit? Here are other popular search & data extraction servers you can use with Claude, Cursor, and VS Code.
TrendRadar
★ 58.0kA real-time hotspot monitoring and news aggregation assistant that provides AI-powered analysis of trending topics across multiple platforms via the Model Context Protocol. It enables users to track news and receive automated notifications through va
Scrapling
★ 52.7k🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl!
PDF Math Translate
★ 33.9k[EMNLP 2025 Demo] PDF scientific paper translation with preserved formats - 基于 AI 完整保留排版的 PDF 文档全文双语翻译,支持 Google/DeepL/Ollama/OpenAI 等服务,提供 CLI/GUI/MCP/Docker/Zotero
GPT Researcher
★ 27.2kAn autonomous agent that conducts deep research on any data using any LLM providers
Agent Reach
★ 20.1kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
Xiaohongshu
★ 13.7kMCP for xiaohongshu.com
Browse More Search & Data Extraction MCP Servers
Explore all search & data extraction servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up MCP Twikit in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use MCP Twikit?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.