
This is a Model Context Protocol (MCP) server for the TweetBinder by Audiense API, allowing Claude and other MCP-compatible AI models to access TweetBinder by Audiense analytics data.
Features
- Access TweetBinder analytics directly from Claude
- Analyze hashtags, users, and conversations on Twitter/X
- Get engagement metrics, sentiment analysis, and more
- Create Twitter reports with custom search queries
- Check report generation status
- Retrieve detailed report statistics
- Get account balance and quota information
- Count tweets matching specific queries
- List and manage your TweetBinder reports
- Access tweet content and user information from reports
Installation
Installing via Smithery
To install mcp-tweetbinder for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @AudienseCo/mcp-tweetbinder --client claude
Manual Configuration
Prerequisites
You need a valid TweetBinder API Bearer Token to use this service. Set it in your environment:
export TWEETBINDER_API_TOKEN='your-bearer-token-here'
Usage with Claude Desktop
-
Edit your Claude Desktop configuration file:
-
MacOS:
code ~/Library/Application Support/Claude/claude_desktop_config.json
-
Windows:
code %AppData%Claudeclaude_desktop_config.json
-
Add this configuration:
"mcpServers": {
"tweetbinder": {
"command": "node",
"args": [
"/absolute/path/to/build/index.js"
],
"env": {
"TWEETBINDER_API_TOKEN": "your-bearer-token-here"
}
}
}
- Restart Claude Desktop
Creates a new report that analyzes Twitter/X data based on a search query.
Creates a new report that counts tweets matching a search query.
list-reports
Retrieves a list of all your TweetBinder reports with sorting capabilities.
get-report-content
Retrieves the actual tweets or users from a generated report with advanced filtering and pagination.
When requesting tweets, detailed information is returned, including:
- Tweet ID, text, creation date, language
- Author details (name, username, followers, etc.)
- Engagement metrics (retweets, likes, replies, etc.)
- Media content (hashtags, images, links)
- Sentiment analysis
When requesting users, information includes:
- User ID, name, username
- Profile picture URL
- Follower and following counts
- Verification status
- User value and other metrics
Note: Report must be in 'Generated' status to access content. Use the get-report-status
tool to check if a report is ready.
Query Syntax Examples:
- #apple
: Tweets containing the hashtag #apple
- apple lang:en
: English tweets containing "apple"
- (#apple OR #iphone) -#android
: Tweets with #apple or #iphone but not #android
- @apple
: Tweets mentioning @apple
- from:apple
: Tweets posted by user "apple"
Note: After creating the count report, use the get-report-status
tool to check when it's ready, then use get-report-stats
to get the actual count.
get-report-status
Checks the current status of a TweetBinder report.
Note: You must first create a report using the create-twitter-report
or create-twitter-count
tool to get a report ID.
get-report-stats
Retrieves comprehensive statistics and analytics for a TweetBinder report.
Note: The report must have "Generated" status before statistics can be retrieved. Use the get-report-status
tool to check if a report is ready.
get-account-balances
Retrieves information about your account's credit balance, usage, and remaining quota.
- Parameters:
-
None
-
Returns:
- Raw JSON response containing:
total
: Total credits available
used
: Credits used
available
: Credits currently available
discount
: Any applicable discount
remainingReports
: Number of reports remaining
quota
: Quota information including:
startedAt
: Quota period start date
finishedAt
: Quota period end date
remaining
: Remaining quota
used
: Used quota
total
: Total quota
- Any error or status messages
Troubleshooting
- Check Claude Desktop logs:
tail -f ~/Library/Logs/Claude/mcp*.log
2. Verify environment variables are set correctly.
3. Ensure the absolute path to index.js is correct.
Authentication Issues
- Double-check credentials.
- Ensure the refresh token is still valid.
- Verify that the required API scopes are enabled and that you have enough credits.
Viewing Logs
To check server logs:
For MacOS/Linux:
tail -n 20 -f ~/Library/Logs/Claude/mcp*.log
For Windows:
Get-Content -Path "$env:AppDataClaudeLogsmcp*.log" -Wait -Tail 20
Security Considerations
- Keep API credentials secure – never expose them in public repositories.
- Use environment variables to manage sensitive data.
? License
This project is licensed under the Apache 2.0 License. See the LICENSE file for more details.