MCP Twikit

v1.0.0Search & Data Extractionstable

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.

llmmcpmodel-context-protocol
Share:
233
Stars
0
Downloads
0
Weekly
0/5

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

Interact with Twitter/X data
Compare sentiment across accounts
Retrieve timeline content
adhikasp

Maintainer

LicenseMIT License
Languagepython
Versionv1.0.0
UpdatedMay 14, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx mcp-twikit

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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)
1

Install uv if not already present

mcp-twikit is run via uvx, which requires the uv package manager.

pip install uv
2

Install 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-twikit
3

Add 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"
      }
    }
  }
}
4

Restart your MCP client

Restart Claude Desktop or reload MCP servers in Claude Code to initialize the twikit server and establish the Twitter session.

5

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.

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.

Quick Config Preview

{ "mcpServers": { "mcp-twikit": { "command": "npx", "args": ["-y", "mcp-twikit"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides