Home / MCP / Twikit MCP Server
Provides Twitter data access via MCP: search tweets, fetch timelines, and run sentiment analyses.
Configuration
View docs{
"mcpServers": {
"mcp_twikit": {
"command": "uvx",
"args": [
"--from",
"git+https://github.com/adhikasp/mcp-twikit",
"mcp-twikit"
],
"env": {
"TWITTER_USERNAME": "@example",
"TWITTER_EMAIL": "[email protected]",
"TWITTER_PASSWORD": "secret"
}
}
}
}Twikit Twitter Search is an MCP server that lets you interact with Twitter data through a model context protocol client. It enables you to search tweets, analyze sentiment, and incorporate Twitter results into your MCP workflows in a structured, repeatable way.
You connect to the server with an MCP client, send requests that perform Twitter searches or fetch timelines, and receive structured responses that you can use in your own workflows. Typical use cases include comparing sentiments across multiple Twitter handles, retrieving recent tweets from a user’s timeline, and running sentiment analyses on returned tweets. Start with a basic search or timeline query, then compose more complex prompts that leverage the client’s tools to extract insights from Twitter data.
Prerequisites: make sure you have a working Node.js environment and an MCP-capable client installed on your system. You should also have access to an Internet connection to install and run the server. If you prefer a guided setup using a command-line tool, you can install the server through a package that provides MCP server installation flows.
Step 1: Install via Smithery (recommended for automatic setup with a client). Run the following command in your terminal:
npx -y @smithery/cli install mcp-twikit --client claudeStep 2: Manual installation (configures the MCP server to run with uvx). Create a configuration block that defines how to launch the server and the required environment variables. Use the snippet below exactly as shown to configure the MCP server:
{
"mcpServer": {
"command": "uvx",
"args": ["--from", "git+https://github.com/adhikasp/mcp-twikit", "mcp-twikit"],
"env": {
"TWITTER_USERNAME": "@example",
"TWITTER_EMAIL": "[email protected]",
"TWITTER_PASSWORD": "secret"
}
}
}Configuration details shown here include the server launch command and the environment variables required to authenticate with Twitter. You can adapt the env values to your own Twitter account credentials. Ensure you keep credentials secure and do not expose them in shared configurations.
Security note: Treat Twitter credentials as sensitive data. Use your organization’s secret management practices and rotate credentials as needed. If you plan to deploy publicly, consider restricting access to the MCP server endpoint and using scoped tokens or OAuth flows that don’t expose passwords in plain text.
Examples of common usage within an MCP workflow include initiating a search for multiple accounts to assess sentiment, fetching the latest tweets from a specific user, and aggregating sentiment scores into a concise report. You can combine these actions with your existing MCP tools to build automated analysis pipelines.
Query Twitter for tweets matching a specified criteria, returning a list of tweets and metadata for analysis within MCP workflows.
Retrieve the latest tweets from a connected user's home timeline to summarize current activity.