JSPM

rapidapi-twitter-mcp

1.1.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5
  • Score
    100M100P100Q38603F
  • License MIT

A Model Context Protocol (MCP) server that provides Twitter API access via RapidAPI

Package Exports

  • rapidapi-twitter-mcp
  • rapidapi-twitter-mcp/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (rapidapi-twitter-mcp) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

RapidAPI Twitter MCP Server

A Model Context Protocol (MCP) server that provides Twitter API access via RapidAPI Twitter AIO.

Installation

npx rapidapi-twitter-mcp

Setup

1. Install Python Dependencies

Due to Python's externally-managed-environment protection, you need to install dependencies first:

Option A (Recommended - UV):

brew install uv
uv tool install --python 3.8 --with aiohttp mcp

Option B (User install):

pip install --user mcp aiohttp

Option C (Break system packages):

pip install --break-system-packages mcp aiohttp

2. Get RapidAPI Key

3. Configure Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "rapidapi-twitter-mcp": {
      "command": "npx",
      "args": ["-y", "rapidapi-twitter-mcp"],
      "env": {
        "RAPIDAPI_KEY": "your_rapidapi_key_here"
      }
    }
  }
}

4. Restart Claude Desktop

Features

  • Search Tweets: Advanced search with filters (language, date range, minimum likes/retweets)
  • User Information: Get detailed user profiles
  • User Tweets: Fetch tweets from specific users
  • Tweet Details: Get comprehensive tweet information
  • Trending Topics: Current trending hashtags and topics
  • Username Conversion: Convert usernames to user IDs

Available Tools

search_tweets

Search for tweets with optional filters:

{
  "query": "artificial intelligence",
  "category": "Latest",
  "limit": 20,
  "filters": {
    "lang": "en",
    "since": "2024-01-01",
    "minimumLikesCount": 10,
    "removeReplies": true
  }
}

get_user_details

Get comprehensive user information:

{
  "username": "elonmusk"
}

get_user_tweets

Fetch tweets from a specific user:

{
  "username": "elonmusk",
  "limit": 20
}

get_tweet_details

Get detailed information about a specific tweet:

{
  "tweet_id": "1234567890"
}

Get current trending topics:

{
  "location": "worldwide"
}

convert_username_to_id

Convert Twitter username to user ID:

{
  "username": "elonmusk"
}

Requirements

  • Python 3.8+: Required for MCP server execution
  • RapidAPI Key: For Twitter AIO API access
  • Python packages: mcp, aiohttp (auto-installed)

Security

  • API keys are never logged or exposed
  • All requests use secure HTTPS
  • Environment variables for configuration
  • No sensitive data stored locally

Rate Limits

Respects Twitter AIO API rate limits. The server handles errors gracefully and returns appropriate error messages when limits are exceeded.

Troubleshooting

"RAPIDAPI_KEY environment variable is required"

  • Ensure you've set the RAPIDAPI_KEY in your Claude config
  • Restart Claude Desktop after configuration changes

"Required Python packages are not installed"

  • The server auto-checks dependencies
  • Run: pip install mcp aiohttp if needed

"Python is not installed"

  • Install Python 3.8+ from python.org
  • Ensure Python is in your system PATH

License

MIT License