Skip to main content
Glama
Social Trends MCP

Social Trends MCP

by caicai-yao

🌍 Social Trends MCP

Real-time trending topics from X, TikTok, YouTube & Instagram β€” as an MCP Server

MIT License Python 3.11+ MCP

Ask Claude "What's trending on TikTok right now?" and get real answers.

Quick Start Β· MCP Setup Β· REST API Β· Docker Deploy Β· Contributing


What is this?

A social media trends aggregator that works in two modes:

  1. MCP Server β€” Plug into Claude Desktop, Cursor, or any MCP client. Ask trending questions in natural language.

  2. REST API β€” Self-hosted API service with auto-refresh every 6 hours, PostgreSQL storage, and WebSocket push.

Supported Platforms

Platform

Method

API Key Required?

🎬 YouTube

Data API v3

βœ… Free (10K units/day)

🎡 TikTok

Creative Center API

❌ No

🐦 X (Twitter)

Web scraping fallback

❌ No (API optional, $200/mo)

πŸ“Έ Instagram

Meta Graph API + fallback

❌ No (API optional)

Every scraper has multi-level fallback β€” if one method fails, it automatically tries the next.


Related MCP server: Upriver MCP

⚑ Quick Start

Claude Desktop β€” Add to claude_desktop_config.json:

{
  "mcpServers": {
    "social-trends": {
      "command": "uvx",
      "args": ["social-trends-mcp"],
      "env": {
        "YOUTUBE_API_KEY": "your_youtube_api_key"
      }
    }
  }
}

Then just ask:

  • "What's trending on YouTube right now?"

  • "Show me TikTok trends"

  • "Is AI trending on any social platform?"

  • "Give me a full overview of what's trending globally"

Install from source

git clone https://github.com/YOUR_USERNAME/social-trends-mcp.git
cd social-trends-mcp
pip install -e .
python mcp_server.py

πŸ”§ MCP Tools

Tool

Description

get_trends

Get trending topics from a specific platform (twitter, tiktok, youtube, instagram)

get_all_trends

Get trends from ALL platforms at once

search_trends

Search for a keyword across all platform trends

Example: get_trends

Input:  { "platform": "youtube", "limit": 10 }
Output: Ranked list of trending videos with view counts and URLs

Example: search_trends

Input:  { "query": "AI" }
Output: All trending topics mentioning "AI" across every platform

🌐 REST API

For production use, deploy the full API service with PostgreSQL and auto-refresh.

Method

Path

Description

GET

/api/v1/trends

All platforms latest data

GET

/api/v1/trends/{platform}

Single platform trends

GET

/api/v1/trends/history/{platform}

Historical trends

POST

/api/v1/refresh

Manual refresh trigger

GET

/api/v1/health

Service health + stats

GET

/docs

Interactive Swagger UI

WS

/ws/trends

WebSocket real-time push


🐳 Docker Deployment

Full production stack in one command:

git clone https://github.com/YOUR_USERNAME/social-trends-mcp.git
cd social-trends-mcp
cp .env.example .env
# Edit .env β€” at minimum set YOUTUBE_API_KEY

docker-compose up -d

This starts PostgreSQL + App (4 workers) + Nginx.


βš™οΈ Configuration

Variable

Required

Description

YOUTUBE_API_KEY

Recommended

Get free β€” 10K units/day

TWITTER_BEARER_TOKEN

Optional

$200/mo β€” fallback works without it

INSTAGRAM_ACCESS_TOKEN

Optional

Meta Developer β€” fallback works without it

TIKTOK_PROXY

Optional

Proxy URL if TikTok blocks your IP

SCRAPE_INTERVAL_HOURS

Optional

Auto-refresh interval (default: 6)

Zero-config is possible β€” every platform has fallback scrapers that work without API keys.


🀝 Contributing

We welcome contributions! See CONTRIBUTING.md.

Easy wins: Add a new platform (Threads, Bluesky...), improve scraper quality, add MCP tools, translations.

πŸ“„ License

MIT

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      F
      maintenance
      Provides AI agents with real-time social trends, cross-platform sentiment, viral content velocity, and brand mentions from Reddit, Hacker News, and Google Trends.
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides AI applications with real-time, evidence-backed context on creators, audiences, brands, trends, and sponsorships, including breakout topic search and browsing tools.
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables AI agents to query live trend data and historical search volume across 30+ platforms like Google, TikTok, YouTube, Amazon, and Reddit, including growth comparisons and top-ranking trends.
      3
      18
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Enables AI-driven analysis of aggregated news and hot topics from 35+ platforms, providing tools for trend tracking, sentiment analysis, and similar-content retrieval through natural language conversations.
      27
      GPL 3.0