social-mcp
Provides read-only access to Instagram analytics via the Instagram Graph API, including account overviews, recent media with engagement rates and outlier detection, Reels vs. feed post splits, and top media for a hashtag.
Provides read-only access to YouTube analytics via the YouTube Data API v3, including channel overviews, recent uploads with engagement rates and outlier detection, video search with filters, video details, and top-level comments for sentiment and content ideas.
social-mcp
An MCP server that gives LLM agents (Claude Desktop, Claude Code, Cursor, custom LangGraph agents, etc.) read-only access to YouTube and Instagram analytics.
Most social media APIs return raw counts. Raw counts can't answer "is this video doing well?", so the server also computes the numbers a content strategist would actually look at:
Engagement rate: (likes + comments) / views on YouTube, / followers on Instagram
Performance vs. the channel's own median: a 20k-view video is a hit on a channel with a 3k median and a flop on a 500k one
Outlier detection: items at 2× the median or more
Format split: Shorts vs. long-form, Reels vs. feed posts
Tools
Tool | What it does | YouTube quota |
| Subscribers, total views, upload count; accepts | 1 |
| Latest uploads with stats, median views and outliers | 3 |
| Search with ordering, date and region filters, stats included | ~101 |
| Stats, duration and tags for up to 50 IDs | 1 per 50 |
| Top-level comments, for sentiment and content ideas | 1 |
| Followers, following and post counts | — |
| Recent posts, engagement, outliers, Reels vs. feed split | — |
| Top posts for a hashtag (Instagram limits this to 30 hashtags per 7 days) | — |
All tools are annotated readOnlyHint: true. The server never posts, comments or edits anything.
There is also a content_audit prompt that walks the model through auditing a channel and proposing five data-backed video ideas.
Related MCP server: YouTube MCP Server
Setup
git clone https://github.com/nilaydatta1234/mcp-social-tools.git
cd mcp-social-tools
python -m venv .venv && source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -e ".[dev]"
cp .env.example .env # then fill in your keysYouTube: create an API key in Google Cloud Console and enable YouTube Data API v3. The default quota is 10,000 units per day. Responses are cached for CACHE_TTL_SECONDS (default 300), so an agent that asks the same thing twice doesn't pay twice.
Instagram: needs an Instagram Business or Creator account linked to a Facebook Page, plus a long-lived token with instagram_basic and pages_show_list (and instagram_manage_insights if you extend it). IG_USER_ID is the Instagram business account ID, not the Page ID.
Either platform can be left unconfigured. Its tools will then return a clear "not configured" error instead of crashing the server.
Using it
Claude Desktop / Claude Code
{
"mcpServers": {
"social": {
"command": "/absolute/path/to/mcp-social-tools/.venv/bin/social-mcp",
"env": { "YOUTUBE_API_KEY": "..." }
}
}
}For Claude Code: claude mcp add social -- /absolute/path/to/.venv/bin/social-mcp
MCP Inspector (for poking at tools by hand)
npx @modelcontextprotocol/inspector social-mcpOver HTTP
social-mcp --transport streamable-httpDesign notes
Structured output. Tools return JSON objects, not prose, so the model can compare numbers across calls instead of re-parsing text.
Errors the model can act on. Quota exhaustion, expired Instagram tokens, disabled comments and rate limits come back as specific messages instead of a raw 403, so the agent can explain or back off.
Quota awareness.
searchcosts 100× more than other calls, and the tool description says so; models do read tool descriptions. Video stats are fetched in batches of 50.Hidden counts. Creators can hide likes and subscriber counts. Those come back as
nullrather than0, so engagement rates aren't silently wrong.
Development
pytest # all HTTP is mocked with httpx.MockTransport, so no keys needed
ruff check .Project layout:
src/social_mcp/
server.py MCP tool/prompt registration and entrypoint
youtube.py YouTube Data API v3 client
instagram.py Instagram Graph API client
metrics.py engagement, outlier and duration helpers (pure functions)
cache.py TTL cache for API responses
tests/Roadmap
TikTok Research API tools
YouTube Analytics API (watch time, retention) via OAuth for your own channel
Instagram media insights (reach, saves, shares)
Optional SQLite snapshotting to track growth over time
License
MIT
Available Tools
8 toolsinstagram_account_overviewARead-only
Follower, following and post counts for the configured Instagram account.
Inputs: no named parameters. Returns: object
instagram_hashtag_top_mediaBRead-only
Top posts for a hashtag. Instagram allows 30 unique hashtag lookups per 7 days.
Inputs: hashtag (required), limit. Returns: object
instagram_recent_mediaBRead-only
Recent posts with engagement rate, outliers and average engagement per format.
The per-format split (Reels vs feed) is usually the most actionable number.
Inputs: limit. Returns: object
youtube_channel_overviewCRead-only
Subscriber, view and upload totals for a YouTube channel.
Inputs: channel (required). Returns: object
youtube_recent_uploadsARead-only
Latest uploads with views, engagement rate and which videos beat the channel median.
Use this to answer "what is working on this channel right now".
Inputs: channel (required), max_results. Returns: object
youtube_search_videosARead-only
Search YouTube videos and return them with statistics.
Costs ~101 quota units per call (search is expensive), so prefer narrow queries.
Inputs: query (required), order, max_results, region_code, +1 more. Returns: result
youtube_top_commentsBRead-only
Top-level comments on a video. Useful for audience sentiment and content ideas.
Inputs: video_id (required), order, max_results. Returns: result
youtube_video_detailsBRead-only
Statistics, duration and tags for up to 50 video IDs.
Inputs: video_ids (required). Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Each tool targets a clearly distinct platform and resource/action: channel overview vs. recent uploads vs. search vs. video details vs. comments for YouTube, and account overview vs. recent media vs. hashtag media for Instagram. The descriptions further clarify boundaries (e.g., search for arbitrary queries, video details for specific IDs). No two tools appear to do the same thing.
All tools follow a consistent platform_<object>_<descriptor> snake_case pattern: youtube_channel_overview, youtube_recent_uploads, instagram_account_overview, etc. The convention is predictable and readable throughout.
With 8 tools covering two platforms, the set is well-scoped and each tool earns its place. It provides a focused analytics surface without unnecessary bulk or thinness.
Core analytical workflows are covered for both platforms: overview, recent content, search/details, and comments for YouTube; overview, recent media, and hashtag media for Instagram. Minor gaps exist, such as Instagram post comments or individual media details, but agents can work around them for most common tasks.
Maintenance
Related MCP Connectors
Your YouTube channels’ private analytics for AI assistants: revenue, views, retention. Read-only.
YouTube for AI agents: transcripts, comments, video stats, channel monitor, Shorts captions.
SEO & marketing toolkit for AI agents: GA4, Search Console, AdSense, GTM, PageSpeed, Trends.
YouTube transcripts, search, channel/playlist listings and upload tracking for AI agents.
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables AI assistants to access YouTube organic analytics, including channel stats, video performance, watch time, and audience engagement, via the YouTube Data API v3 and Analytics API v2.632 npmMIT
- FlicenseAqualityDmaintenanceEnables AI assistants to analyze YouTube channels, videos, transcripts, and content strategy through structured tool calls.17-
- AlicenseAqualityCmaintenanceEnables AI assistants to retrieve YouTube channel overviews, Studio analytics, video performance, traffic source breakdowns, and comments for sentiment analysis using natural language prompts.82MIT
- AlicenseAqualityBmaintenanceEnables AI agents to read transcripts of any public video, research channels, analyze performance, read comments, and manage multiple owned channels.1679 npm2MIT