MCP server for Twitter/X integration
## Twitter MCP Server: X Platform Integration The **Twitter MCP Server** integrates the X platform (formerly Twitter) directly into Google Antigravity, enabling AI assistants to post tweets, manage threads, analyze engagement, and interact with the Twitter API programmatically. This comprehensive integration brings full Twitter automation to your development workflow. ### Why Twitter MCP? - **Full API Access**: Complete access to Twitter API v2 for tweets, users, and spaces - **Thread Management**: Create and manage tweet threads with proper reply chains - **Analytics**: Access tweet performance metrics and audience insights - **Search and Streaming**: Real-time search and streaming for monitoring and engagement - **Media Support**: Upload and attach images, videos, and GIFs to tweets ### Key Features #### 1. Tweet Creation ```python from anthropic import Anthropic client = Anthropic() response = client.messages.create( model="claude-sonnet-4-20250514", max_tokens=1024, messages=[{ "role": "user", "content": "Post a tweet announcing our new feature with relevant hashtags" }], tools=[{ "name": "twitter_tweet", "description": "Create tweets" }] ) ``` #### 2. Thread Creation ```python # Create tweet threads response = client.messages.create( model="claude-sonnet-4-20250514", max_tokens=1024, messages=[{ "role": "user", "content": "Create a thread explaining our new API features with code examples" }], tools=[{"name": "twitter_thread", "description": "Create threads"}] ) ``` #### 3. Engagement Monitoring ```python # Monitor mentions and engagement response = client.messages.create( model="claude-sonnet-4-20250514", max_tokens=1024, messages=[{ "role": "user", "content": "Show me recent mentions and replies that need responses" }], tools=[{"name": "twitter_mentions", "description": "Monitor engagement"}] ) ``` #### 4. Analytics Access ```python # Get tweet analytics response = client.messages.create( model="claude-sonnet-4-20250514", max_tokens=1024, messages=[{ "role": "user", "content": "Get engagement metrics for our tweets this week" }], tools=[{"name": "twitter_analytics", "description": "Access analytics"}] ) ``` ### Configuration ```json { "mcpServers": { "twitter": { "command": "npx", "args": ["-y", "@anthropic/mcp-twitter"], "env": { "TWITTER_API_KEY": "your-api-key", "TWITTER_API_SECRET": "your-api-secret", "TWITTER_ACCESS_TOKEN": "your-access-token", "TWITTER_ACCESS_SECRET": "your-access-secret" } } } } ``` ### Use Cases **Content Publishing**: Automate tweet scheduling and thread creation for content marketing. **Community Engagement**: Monitor and respond to mentions and conversations. **Social Listening**: Track keywords, hashtags, and competitors in real-time. **Analytics Reporting**: Generate performance reports on Twitter engagement. The Twitter MCP Server brings comprehensive X platform integration directly into your development workflow, enabling powerful social automation.
{
"mcpServers": {
"twitter": {
"mcpServers": {
"twitter": {
"env": {
"TWITTER_API_KEY": "YOUR_API_KEY",
"TWITTER_API_SECRET": "YOUR_API_SECRET",
"TWITTER_ACCESS_TOKEN": "YOUR_ACCESS_TOKEN",
"TWITTER_ACCESS_SECRET": "YOUR_ACCESS_SECRET"
},
"args": [
"-y",
"@taazkareem/x-mcp-server"
],
"command": "npx"
}
}
}
}
}