Labsco
scrape-badger logo

ScrapeBadger

โ˜… 1

from scrape-badger

Access Twitter/X data including user profiles, tweets, followers, trends, lists, and communities via the ScrapeBadger API.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedPaid serviceAdvanced setup

ScrapeBadger

ScrapeBadger MCP Server

Give your AI agents access to Twitter/X data via the Model Context Protocol


What is this?

ScrapeBadger MCP Server is a Model Context Protocol (MCP) server that enables AI assistants like Claude, ChatGPT, Cursor, Windsurf, and other MCP-compatible clients to access Twitter/X data through the ScrapeBadger API.

With this MCP server, your AI can:

  • Get Twitter user profiles, followers, and following lists
  • Search and retrieve tweets
  • Access trending topics globally or by location
  • Explore Twitter lists and communities
  • Search for places and geolocated content

Available Tools

The MCP server provides 17 tools organized into categories:

User Tools

ToolDescription
get_twitter_user_profileGet a user's profile by username (bio, followers, following, etc.)
get_twitter_user_aboutGet extended "About" info (account location, username history)
search_twitter_usersSearch for users by query
get_twitter_followersGet a user's followers
get_twitter_followingGet accounts a user follows

Tweet Tools

ToolDescription
get_twitter_tweetGet a single tweet by ID
get_twitter_user_tweetsGet recent tweets from a user
search_twitter_tweetsSearch for tweets (supports Twitter search operators)

Trend Tools

ToolDescription
get_twitter_trendsGet global trending topics (optionally by category)
get_twitter_place_trendsGet trends for a specific location (by WOEID)

Geo Tools

ToolDescription
search_twitter_placesSearch for Twitter places by name

List Tools

ToolDescription
get_twitter_list_detailGet details about a Twitter list
search_twitter_listsSearch for Twitter lists
get_twitter_list_tweetsGet tweets from a list

Community Tools

ToolDescription
get_twitter_community_detailGet details about a Twitter community
search_twitter_communitiesSearch for communities

Example Conversations

Research a Twitter Account

You: Get the profile and recent tweets from @sama

Claude: I'll fetch Sam Altman's Twitter profile and recent tweets.

Uses get_twitter_user_profile and get_twitter_user_tweets

Sam Altman (@sama)
- 3.2M followers, 1,847 following
- Bio: "ceo of openai"
- Joined: December 2008

Recent tweets:
1. "excited to share..." (245K likes)
2. "the future of ai..." (180K likes)
...

You: What's trending in tech on Twitter today?

Claude: I'll check the current trending topics.

Uses get_twitter_trends with category="news"

Top Tech Trends:
1. #GPT5 - 125,000 tweets
2. Apple Vision Pro - 89,000 tweets
3. #AGI - 45,000 tweets
...

Competitive Analysis

You: Compare the Twitter engagement of Stripe, Square, and PayPal

Claude: I'll gather data on all three companies' Twitter profiles.

Uses get_twitter_user_profile for each company

| Company | Followers | Following | Engagement Rate |
|---------|-----------|-----------|-----------------|
| Stripe  | 892K      | 1,245     | 2.3%           |
| Square  | 1.2M      | 567       | 1.8%           |
| PayPal  | 2.1M      | 234       | 0.9%           |

Error Handling

The MCP server handles common errors gracefully:

ErrorDescriptionSolution
AuthenticationErrorInvalid API keyCheck your SCRAPEBADGER_API_KEY
RateLimitErrorToo many requestsWait and retry, or upgrade your plan
InsufficientCreditsErrorOut of creditsPurchase more at scrapebadger.com
NotFoundErrorUser/tweet not foundVerify the username or tweet ID

Development

Setup

# Clone the repository
git clone https://github.com/scrape-badger/scrapebadger-mcp.git
cd scrapebadger-mcp

# Install dependencies
uv sync --dev

# Set your API key
export SCRAPEBADGER_API_KEY="sb_live_your_key_here"

Running Locally

# Run the MCP server directly
uv run python -m scrapebadger_mcp.server

# Or use the CLI
uv run scrapebadger-mcp

Testing

# Run tests
uv run pytest

# Run with coverage
uv run pytest --cov=src/scrapebadger_mcp

Code Quality

# Lint
uv run ruff check src/

# Format
uv run ruff format src/

# Type check
uv run mypy src/


Support