Twitter MCP is an MCP server that connects large language model clients to the Twitter API to read and publish social media content. Built for developers, researchers, and social media managers using Model Context Protocol interfaces like Claude Desktop, the server bridges the gap between natural language prompts and Twitter programmatic interactions. By configuring credentials through the developer portal, users can prompt their assistant to draft and publish updates directly to their feed without switching contexts. In addition to creating posts, the server provides search capabilities, enabling AI assistants to scan Twitter for specific keywords, monitor ongoing trends, and retrieve recent public discussions for research or sentiment evaluation. The tool operates using Node.js execution via npx and standard environment variables for authentication, giving users straightforward control over social automation workflows directly within their daily AI development environments.
Category: Communication & Messaging
Tags: social-media, tweets, twitter, x
To install and configure Twitter MCP in Claude Desktop, follow these steps: 1. Obtain your API credentials (API Key, API Secret Key, Access Token, and Access Token Secret) from the Twitter Developer Portal. 2. Open your Claude Desktop configuration file: - Windows: %APPDATA%\Claude\claude_desktop_config.json - macOS: ~/Library/Application Support/Claude/claude_desktop_config.json 3. Add the following entry to the mcpServers object: json { "mcpServers": { "twitter-mcp": { "command": "npx", "args": ["-y", "@enescinar/twitter-mcp"], "env": { "API_KEY": "your_api_key_here", "API_SECRET_KEY": "your_api_secret_key_here", "ACCESS_TOKEN": "your_access_token_here", "ACCESS_TOKEN_SECRET": "your_access_token_secret_here" } } } } 4. Restart Claude Desktop to load the new tools.
Part of MCP Servers
You can configure Twitter MCP by adding the package to your Claude Desktop configuration file under mcpServers. Specify npx as the command, pass -y and @enescinar/twitter-mcp as arguments, and include your Twitter API credentials in the environment variables.
Twitter MCP exposes two primary tools: post_tweet and search_tweets. These allow compatible AI clients to publish new tweets to your account and perform keyword searches across Twitter to gather and summarize recent discussions.
The server works with Claude Desktop and any client supporting the Model Context Protocol standard over stdio. Configuration details and troubleshooting logs are officially provided for macOS and Windows versions of Claude Desktop.
Yes, Twitter MCP is open source and licensed under the MIT License. The code and evaluation scripts can be viewed, cloned, and modified via its official GitHub repository.