loading…
Search for a command to run...
loading…
Enables Instagram and Facebook analytics via the Meta Graph API, offering account insights, media analytics, and post engagement data.
Enables Instagram and Facebook analytics via the Meta Graph API, offering account insights, media analytics, and post engagement data.
A Model Context Protocol (MCP) server for Instagram and Facebook analytics via the Meta Graph API.
DEBUG=social-analytics-mcpInstall and build
git clone <repository-url>
cd social-analytics-mcp
npm install
npm run build
Get an access token from the Graph API Explorer with permissions:
instagram_basic, instagram_manage_insights, pages_read_engagementread_insights, pages_read_engagementAdd to your MCP client (see configuration below)
| Variable | Required | Default | Description |
|---|---|---|---|
INSTAGRAM_ACCESS_TOKEN |
For Instagram | — | Facebook User Access Token with Instagram permissions |
INSTAGRAM_ACCOUNT_ID |
No | Auto-detected | Instagram Business Account ID |
INSTAGRAM_API_VERSION |
No | v23.0 |
Instagram Graph API version |
FACEBOOK_ACCESS_TOKEN |
For Facebook | — | Facebook User/Page Access Token |
FACEBOOK_PAGE_ID |
No | Use discovery tool | Facebook Page ID |
FACEBOOK_API_VERSION |
No | v22.0 |
Facebook Graph API version |
DEBUG |
No | — | Set to social-analytics-mcp for debug logs |
You only need to configure access tokens for the platforms you want to use. Account and page IDs can be discovered using the built-in tools.
~/Library/Application Support/Claude/claude_desktop_config.json%APPDATA%\Claude\claude_desktop_config.json{
"mcpServers": {
"social-analytics": {
"command": "node",
"args": ["/absolute/path/to/social-analytics-mcp/dist/index.js"],
"env": {
"INSTAGRAM_ACCESS_TOKEN": "your_token_here",
"FACEBOOK_ACCESS_TOKEN": "your_token_here"
}
}
}
}
claude mcp add social-analytics node /absolute/path/to/social-analytics-mcp/dist/index.js \
-e INSTAGRAM_ACCESS_TOKEN=your_token_here \
-e FACEBOOK_ACCESS_TOKEN=your_token_here
| Tool | Description | Required Params |
|---|---|---|
instagram_list_accounts |
List available Instagram Business accounts | — |
instagram_get_profile |
Get account profile info | — |
instagram_get_account_insights |
Get account-level analytics | metrics, metric_type, period |
instagram_list_media |
List recent media posts | — |
instagram_get_media_details |
Get details for a specific post | media_id |
instagram_get_media_insights |
Get insights for a specific post | media_id, metrics |
instagram_get_stories |
Get recent stories | — |
instagram_get_hashtag_search |
Search for a hashtag ID | hashtag |
instagram_get_hashtag_media |
Get media for a hashtag | hashtag_id |
instagram_get_content_publishing_limit |
Check publishing rate limits | — |
instagram_get_mentioned_media |
Get media where account is tagged | — |
| Tool | Description | Required Params |
|---|---|---|
facebook_list_pages |
List accessible Facebook Pages | — |
facebook_get_page_details |
Get page profile information | — |
facebook_get_page_insights |
Get page-level insights | metrics |
facebook_get_post_insights |
Get insights for a specific post | post_id, metrics |
facebook_list_posts_with_insights |
List posts with inline metrics | post_metrics |
facebook_get_page_feed |
Get page feed with engagement data | — |
facebook_list_known_metrics |
List supported metrics reference | — |
facebook_validate_token |
Validate an access token | access_token |
Most Instagram tools accept an optional account_id parameter. If not provided, the account is auto-detected from the INSTAGRAM_ACCOUNT_ID environment variable or discovered automatically if only one account exists.
Most Facebook tools accept an optional page_id parameter with similar auto-detection behavior via FACEBOOK_PAGE_ID.
| Prompt | Description |
|---|---|
analyze_instagram_performance |
Comprehensive Instagram account analysis |
analyze_facebook_performance |
Comprehensive Facebook Page analysis |
compare_post_performance |
Compare recent posts on either platform |
get_audience_demographics |
Audience demographic breakdown |
setup_platform |
Interactive setup guide |
import { InstagramClient, FacebookClient, createServer } from 'social-analytics-mcp';
// Use clients directly
const instagram = new InstagramClient({
accessToken: 'your_token',
accountId: 'optional_account_id',
});
const profile = await instagram.getUserProfile();
// Or create an MCP server programmatically
const server = createServer();
avg_time_watched only works for videos/reels)facebook_list_known_metrics to see supported Facebook metricsSee CONTRIBUTING.md for development setup and guidelines.
MIT
Note: This is an unofficial tool and is not affiliated with Meta, Facebook, or Instagram.
Выполни в терминале:
claude mcp add social-analytics-mcp-server -- npx Безопасность
Низкий рискАвтоматическая эвристика по публичным данным — не гарантия безопасности.