Allows monitoring of Dogecoin mentions in tweets through the search functionality and Elon Musk's tweets about Dogecoin are specifically mentioned as an example use case.
Supports environment variable management for storing API keys securely with an .env.example template provided.
Allows connecting to GitHub through the sponsor link functionality for supporting the developer of the SocialData MCP server.
Provides direct integration with GitHub Sponsors to financially support the development of the SocialData MCP server.
Serves as the runtime environment for the SocialData MCP server, enabling execution of the server and its API functionality.
SocialData MCP Server
A comprehensive Model Context Protocol (MCP) server that provides tools for interacting with the SocialData API. This server allows you to fetch Twitter/X data, monitor user activity, and analyze social media engagement programmatically.
Features
Data Retrieval
- Search: Advanced Twitter search with operators
- User Profiles: Get detailed user information by username or ID
- Followers/Following: Retrieve follower and following lists
- Tweets: Get user tweets, mentions, highlights, and threads
- Lists & Communities: Access Twitter Lists and Community data
- Spaces: Get Twitter Space details
Social Actions Verification
- Following Verification: Check if one user follows another
- Retweet Verification: Verify if a user retweeted a tweet
- Comment Verification: Check if a user commented on a tweet
Monitoring & Alerts
- User Tweet Monitors: Get alerts for new tweets
- Following Monitors: Monitor when users follow new accounts
- Profile Monitors: Track profile changes
- Pump.fun Monitors: Monitor cryptocurrency mentions
Account Management
- Balance Tracking: Check remaining API credits
- Webhook Management: Set up notification endpoints
Installation
Option 1: Automated Setup (Recommended)
Run the setup script which will create a virtual environment and install dependencies:
Then activate the virtual environment:
Option 2: Manual Setup
- Clone or download this repository
- Create a virtual environment:
- Install the required dependencies:
- Set up your SocialData API key as an environment variable:
You can get an API key from your SocialData dashboard.
MCP Client Configuration
To use this server with an MCP client (like Claude Desktop, Continue, or other MCP-compatible tools), add the following configuration:
For MCP Clients
Add this to your MCP client configuration file (usually config.json
or similar):
Configuration Options
Replace the paths and API key with your actual values:
/path/to/your/socialdata/
- Replace with the full path to where you installed this serveryour_actual_api_key_here
- Replace with your SocialData API key from your dashboard
Example Configurations
Option 1: Using Virtual Environment Python (Recommended)
Option 2: Using System Python
Option 3: Using a Wrapper Script
Create a run script:
Then configure:
Finding Your Installation Path
To find the correct path for your installation:
Use this full path in your MCP client configuration.
Usage
Running the Server Standalone
Make sure your virtual environment is activated first:
When you're done, you can deactivate the virtual environment:
Available Tools
Search & Discovery
search_twitter
Search Twitter with advanced operators.
Parameters:
query
(required): Search query with Twitter operatorscursor
(optional): Pagination cursorsearch_type
(optional): "Top" or "Latest"
Example:
User Information
get_user_by_username
Get user profile by Twitter username.
get_user_by_id
Get user profile by Twitter user ID.
get_multiple_users_by_usernames
Get up to 100 user profiles by usernames.
get_user_complete_profile
Get comprehensive user data including bio, recent tweets, and extended information.
Example:
User Connections
get_user_followers
Get followers of a user.
get_user_verified_followers
Get only verified followers.
get_user_following
Get users that someone is following.
Example:
Tweet Operations
get_tweet
Get complete tweet details.
get_tweet_comments
Get comments/replies to a tweet.
get_tweet_retweeters
Get users who retweeted a tweet.
get_tweet_quotes
Get quote tweets.
get_twitter_thread
Get all tweets in a thread.
analyze_tweet_engagement
Get comprehensive engagement data (comments, retweets, quotes).
Example:
Social Verification
verify_user_following
Check if one user follows another.
verify_user_retweeted
Verify if a user retweeted a specific tweet.
verify_user_commented
Check if a user commented on a tweet.
Example:
Monitoring
create_user_tweets_monitor
Monitor new tweets from a user.
create_user_following_monitor
Monitor when a user follows new accounts.
create_user_profile_monitor
Monitor profile changes.
list_monitors
List all active monitors.
delete_monitor
Remove a monitor.
Example:
Account Management
get_account_balance
Check remaining API credits.
set_global_webhook
Set default webhook URL for all monitors.
Advanced Usage Examples
1. Comprehensive User Analysis
2. Monitor Competitor Activity
3. Engagement Campaign Verification
4. Trending Topic Analysis
Testing Your Setup
To verify your server is working correctly:
- Test the server standalone:
- Test with your MCP client: Once configured, try using one of the available tools like
get_account_balance
to verify the connection and API key. - Check API balance:
Error Handling
The server includes comprehensive error handling for:
- Invalid API keys
- Rate limiting
- Network errors
- Invalid parameters
- Missing data
All errors are returned as descriptive exception messages.
API Costs
SocialData API charges based on usage. Check your balance regularly:
Rate Limits
SocialData handles rate limiting automatically. The API is designed to be reliable and scalable without requiring proxy management.
Webhook Configuration
For monitoring features, you can set up webhooks to receive real-time notifications:
- Global webhook (applies to all monitors):
- Monitor-specific webhooks (overrides global):
API Key Management
The server looks for the API key in the SOCIALDATA_API_KEY
environment variable. Make sure to:
- Get your API key from your SocialData dashboard
- Set it in your MCP client configuration or as an environment variable
- Keep your API key secure and never commit it to version control
Development
Project Structure
Adding New Features
The server is built using FastMCP and follows the SocialData API specification. To add new endpoints:
- Add the tool function with proper type hints
- Use the
@mcp.tool()
decorator - Include comprehensive docstrings
- Handle errors appropriately
- Update the config.json with the new tool
Support
If you find this project helpful, consider:
- ⭐ Starring this repository
- Supporting my work on GitHub Sponsors
- 🌐 Visiting my website at SethRose.dev
Compliance
When using this server:
- Respect Twitter's Terms of Service
- Follow data privacy regulations
- Use monitoring responsibly
- Don't exceed reasonable request rates
- Comply with user privacy expectations
License
This project is open source and available under the MIT License.
Related MCP Servers
- Python
- -securityAlicense-qualitySharePoint MCP Server by CDataLast updated -MIT License
- -securityAlicense-qualitySalesforce MCP Server by CDataLast updated -MIT License
- -securityAlicense-qualityMicrosoft SQL Server MCP Server by CDataLast updated -MIT License