TweetBinder MCP server

Integrates with Twitter/X analytics through the TweetBinder API, enabling report creation, status checking, statistics retrieval, and sentiment analysis for social media campaign tracking and audience research.
Back to servers
Provider
Audiense
Release date
Mar 20, 2025
Language
TypeScript
Stats
3 stars

This MCP server enables Claude and other MCP-compatible AI models to access TweetBinder by Audiense analytics data from Twitter/X directly. It provides Twitter analytics capabilities including hashtag analysis, engagement metrics, sentiment analysis, and report generation with various filtering options.

Installation

Installing via Smithery

The simplest way to install mcp-tweetbinder for Claude Desktop is via Smithery:

npx -y @smithery/cli install @AudienseCo/mcp-tweetbinder --client claude

Manual Installation

Prerequisites

  • Node.js v18 or higher
  • Claude Desktop App
  • TweetBinder by Audiense account with API credentials

Steps

  1. Clone the repository
  2. Install dependencies:
    npm install
    
  3. Build the project:
    npm run build
    
  4. Set your TweetBinder API Bearer Token:
    export TWEETBINDER_API_TOKEN='your-bearer-token-here'
    

Configuration

To configure Claude Desktop to use the MCP server:

  1. Edit your Claude Desktop configuration file:

    MacOS:

    code ~/Library/Application\ Support/Claude/claude_desktop_config.json
    

    Windows:

    code %AppData%\Claude\claude_desktop_config.json
    
  2. Add this configuration:

    "mcpServers": {
      "tweetbinder": {
        "command": "node",
        "args": [
          "/absolute/path/to/build/index.js"
        ],
        "env": {
          "TWEETBINDER_API_TOKEN": "your-bearer-token-here"
        }
      }
    }
    
  3. Restart Claude Desktop

Available Tools

Working with Reports

Creating Reports

You can create new Twitter analytics reports with:

create-twitter-report

Parameters:

  • query (string): Search query for Twitter data. Can include operators like AND, OR, hashtags, etc.
  • limit (number, optional): Maximum tweets to retrieve (up to 50,000)
  • startDate (number, optional): Start date as Unix timestamp
  • endDate (number, optional): End date as Unix timestamp
  • reportType (enum, optional): "7-day" or "historical". Default: "7-day"

For just counting tweets, use:

create-twitter-count

Parameters:

  • query (string): Search query
  • reportType (enum, optional): "7-day" or "historical". Default: "7-day"

Managing Reports

List all your reports:

list-reports

Parameters:

  • order (string, optional): Sort parameter. Example: 'createdAt|-1' for newest first

Check a report's status:

get-report-status

Parameters:

  • reportId (string): ID of the report to check

Retrieving Report Data

Get report statistics:

get-report-stats

Parameters:

  • reportId (string): ID of the report to retrieve statistics for

Get report content (tweets or users):

get-report-content

Parameters:

  • reportId (string): Report ID
  • contentType (enum): 'tweets' or 'users'
  • page (number, optional): Page number for pagination
  • perPage (number, optional): Number of items per page
  • sortBy (string, optional): Field to sort by
  • sortDirection (enum, optional): '1' for ascending, '-1' for descending
  • filter (string, optional): JSON string with filter criteria

Account Management

Check your account balance and quota:

get-account-balances

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"

Troubleshooting

Tools Not Appearing in Claude

  1. Check Claude Desktop logs:
    tail -f ~/Library/Logs/Claude/mcp*.log
    
  2. Verify environment variables are correctly set
  3. Ensure the absolute path to index.js is correct

Authentication Issues

  • Double-check your TweetBinder API credentials
  • Verify you have enough credits in your account

Viewing Logs

MacOS/Linux:

tail -n 20 -f ~/Library/Logs/Claude/mcp*.log

Windows:

Get-Content -Path "$env:AppData\Claude\Logs\mcp*.log" -Wait -Tail 20

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later