meta-insights-mcp
Offers tools to access Facebook business assets such as ad accounts, pages, and insights like page and post performance through the Facebook Graph API.
Enables retrieval of Instagram business insights and assets (e.g., owned pages) via Meta's APIs, supporting organic and advertising data.
Provides tools for retrieving business insights from Meta's platforms, including ad account performance, page insights, post insights, campaign data, and asset management via the Graph and Marketing APIs.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@meta-insights-mcpshow my ad accounts and their recent performance"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
meta-insights-mcp
An MCP server exposing Meta (Facebook / Instagram) business insights through the Graph and Marketing APIs, using a System User access token.
Install
pip install meta-insights-mcp
# or
uv add meta-insights-mcp
# or run ad-hoc without installing
uvx meta-insights-mcpConfiguration
The server reads its configuration from environment variables:
Var | Required | Default | Purpose |
| yes | — | System User access token |
| no |
| Graph API version |
| no | — | When set, enables business-scoped tools ( |
Connect to Claude
Add one of the following to your MCP client config (Claude Desktop: ~/Library/Application Support/Claude/claude_desktop_config.json; Claude Code: ~/.claude.json or project .mcp.json).
Recommended — zero-install via uvx
{
"mcpServers": {
"meta-insights": {
"command": "uvx",
"args": ["meta-insights-mcp"],
"env": {
"META_ACCESS_TOKEN": "EAAG..."
}
}
}
}After pip install
{
"mcpServers": {
"meta-insights": {
"command": "meta-insights-mcp",
"env": {
"META_ACCESS_TOKEN": "EAAG..."
}
}
}
}Module form (fallback)
{
"mcpServers": {
"meta-insights": {
"command": "python",
"args": ["-m", "meta_insights_mcp"],
"env": {
"META_ACCESS_TOKEN": "EAAG..."
}
}
}
}Tools
User-scoped (always available)
Tool | Purpose |
| Ad accounts + Pages the token can see |
| Token scopes, app, expiry |
| Ads performance for an ad account |
| Insights for a single campaign |
| List campaigns under an ad account |
| Organic Page insights |
| Insights for a single Page post |
| Recent posts from a Page |
Business-scoped (enabled when META_BUSINESS_ID is set)
Tool | Purpose |
| Everything the business owns (ad accounts, Pages, IG, System Users) |
| Ad accounts owned by the business |
| Pages owned by the business |
| Ad accounts shared WITH this business by clients/partners |
| System Users under the business |
Meta setup required
Before the server returns data, you need (in Meta Business Manager):
A Business App in Meta for Developers tied to your Business Manager
A System User with scopes:
ads_readorads_management,pages_read_engagement,business_managementAsset assignment: assign the Ad Account(s) and Page(s) you want to read to the System User (this is the step people most often miss — a valid token with unassigned assets returns empty data)
A System User access token — pass it as
META_ACCESS_TOKEN
Use check_token_status to verify scopes and expiry.
Testing locally with the MCP Inspector
The MCP Inspector is a browser-based UI (provided by Anthropic) that lets you call your tools directly — no AI needed. Great for verifying the server works before connecting it to Claude.
# From the project root, with your venv active
mcp dev meta_insights_mcp/server.pyThis launches:
Your Python MCP server
A local web UI (opens automatically in your browser)
In the Inspector:
Click Connect at the top
Open the Tools tab
Try these in order:
check_token_status— no args; confirms your token is valid and shows scopes/expirylist_meta_assets— no args; lists ad accounts and Pages assigned to the System Userget_ad_account_insights— paste anad_account_idfrom the previous step
Enable business-scoped tools by setting
META_BUSINESS_IDin your shell /.envbefore launching the Inspector, then calllist_business_assets
If list_meta_assets returns empty arrays, the token is fine but the System User has no assets assigned yet — fix that in Meta Business Settings (see "Meta setup required" above).
Development
git clone <repo>
cd meta-mcp-server
python3 -m venv .venv && source .venv/bin/activate
pip install -e . # editable install
# Run the MCP Inspector
mcp dev meta_insights_mcp/server.py
# Or run the server directly (stdio)
meta-insights-mcpPublishing
Build wheel + sdist:
pip install build
python -m build # produces dist/*.whl and dist/*.tar.gzUpload to TestPyPI first (sandbox):
pip install twine
python -m twine upload --repository testpypi dist/*
pip install -i https://test.pypi.org/simple/ meta-insights-mcp # verifyThen to real PyPI:
python -m twine upload dist/*License
MIT
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/excellario/meta-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server