Meta Business MCP
Allows listing Instagram accounts associated with a Meta Business, with read-only access.
Provides tools for inspecting Meta Business assets, including ad accounts, campaigns, ads insights, and pages, as well as creating reviewable proposals for budget or delivery status changes.
Intended for WhatsApp Business API integration, but write operations including messaging are excluded from the initial version.
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 Business MCPlist my ad accounts"
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 Business MCP
Meta Business MCP is an open-source-ready Model Context Protocol gateway over allowlisted Meta Business APIs.
The goal is not to build an autonomous marketing agent. The goal is a safe, self-hosted operations gateway that lets MCP clients inspect Meta Business assets, normalize performance data, draft/propose changes, and execute only explicitly approved named actions without exposing broad Graph API access.
This project is not affiliated with, endorsed by, or sponsored by Meta or OpenAI.
Current status
This repository has a local stdio MCP server for Codex, a Streamable HTTP /mcp path for remote MCP clients, broad live read handlers, sanitized local search/fetch, and durable proposal state.
Included:
TypeScript workspace with strict builds.
Broad MCP tool contracts for Ads, Pages, Instagram, leads metadata, health/context, search/fetch, and proposals.
Real stdio MCP server entrypoint.
Streamable HTTP MCP server entrypoint with OAuth bearer verification hooks.
Default-safe policy primitives.
Allowlisted Meta API client boundary.
Proposal hashing, approval, and execution state.
Audit redaction helpers.
Docs, examples, and tests.
Live when configured:
meta_connection_statusmeta_ad_accounts_listmeta_campaigns_listmeta_adsets_listmeta_ads_listmeta_ad_creatives_listmeta_pixels_listmeta_custom_conversions_listmeta_ads_insights_querymeta_pages_listmeta_page_getmeta_page_posts_listmeta_page_post_comments_listmeta_page_insights_querymeta_page_post_insights_querymeta_page_conversations_listmeta_instagram_accounts_listmeta_instagram_media_listmeta_instagram_media_insights_querymeta_lead_forms_listmeta_allowed_assets_listmeta_permission_probemeta_token_health_checksearchfetchproposal create/list/get/cancel/approve tools
Opt-in and guarded:
meta_proposal_executecan execute approved named writes only whenMETA_BUSINESS_MCP_WRITES_ENABLED=1.Default public/local configuration keeps Meta writes disabled.
Excluded by default:
Arbitrary Graph proxy tools.
Deletes, WhatsApp, raw lead export, browser automation, and arbitrary URL fetch.
Raw lead export or lead PII retrieval.
Company-specific prompts, account IDs, workflows, thresholds, CRM integrations, or private playbooks.
Related MCP server: meta-mcp
Tool contracts
See docs/tool-reference.md for the current tool list, schemas, and safety behavior. Live Meta tools require META_ADS_TOKEN plus explicit asset allowlists.
Configuration
The server reads credentials and allowlists from environment/config only. Do not pass tokens as tool arguments.
export META_ADS_TOKEN="EAAR_fake_replace_me"
export META_ADS_API_VERSION="v25.0"
export META_BUSINESS_MCP_AD_ACCOUNTS_FILE="/private/path/ad-accounts.json"
export META_BUSINESS_MCP_PAGES_FILE="/private/path/pages.json"
export META_BUSINESS_MCP_INSTAGRAM_ACCOUNTS_FILE="/private/path/instagram-accounts.json"Allowlist file format:
{
"accounts": [
{
"account_id": "act_1234567890",
"account_name": "Example Account",
"status": "active"
}
]
}Alternatives:
META_BUSINESS_MCP_AD_ACCOUNTS_JSON: inline JSON in the same shape.META_AD_ACCOUNT_IDS: comma-separated account IDs for simple local testing.META_BUSINESS_MCP_PAGES_JSON/META_PAGE_IDS: Page allowlist.META_BUSINESS_MCP_INSTAGRAM_ACCOUNTS_JSON/META_INSTAGRAM_ACCOUNT_IDS: Instagram account allowlist.META_BUSINESS_MCP_PIXELS_JSON/META_PIXEL_IDS: pixel allowlist.META_BUSINESS_MCP_TIMEOUT_MS: request timeout, default20000.META_BUSINESS_MCP_STORAGE_DIR: local sanitized cache/proposal storage.META_BUSINESS_MCP_WRITES_ENABLED: opt-in approved execution switch, default off.
For private deployments, keep account allowlists and token sourcing outside this public repo. Point META_BUSINESS_MCP_AD_ACCOUNTS_FILE at a private file if needed.
Development
npm install
npm run typecheck
npm test
npm run buildRun the stdio server:
npm --workspace @meta-business-mcp/server run dev:stdioRun the HTTP server locally:
npm --workspace @meta-business-mcp/server run dev:httpFor ChatGPT or other remote MCP clients, deploy the HTTP server behind HTTPS and enable:
export META_BUSINESS_MCP_HTTP_AUTH_ENABLED=1
export META_BUSINESS_MCP_AUTH_ISSUER="https://issuer.example"
export META_BUSINESS_MCP_AUTH_AUDIENCE="https://your-domain.example/mcp"
export META_BUSINESS_MCP_AUTH_JWKS_URL="https://issuer.example/.well-known/jwks.json"
export META_BUSINESS_MCP_AUTH_REQUIRED_SCOPES="meta_business.read,meta_business.write"
export META_BUSINESS_MCP_ALLOWED_ORIGINS="https://chatgpt.com"Run the opt-in live smoke test:
META_BUSINESS_MCP_LIVE_TEST=1 npm run smoke:liveThe live smoke test is skipped unless META_BUSINESS_MCP_LIVE_TEST=1 is set and prints redacted JSON.
Install it in Codex:
codex mcp add meta-business -- \
npm --prefix /absolute/path/to/meta-business-mcp \
--workspace @meta-business-mcp/server \
run dev:stdioSee docs/install.md for Codex and ChatGPT setup notes.
Security defaults
Meta writes disabled by default.
Draft/proposal operations are local and auditable.
Execution accepts only
proposal_id, never free-form write arguments.No raw Meta token in tool arguments or outputs.
No generic Graph proxy.
No live credentials required for tests.
No raw lead values.
See docs/threat-model.md and docs/architecture.md.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceProvides Meta (Facebook/Instagram) business insights through the Graph and Marketing APIs, enabling access to ad accounts, pages, campaigns, and business assets using a System User access token.MIT
- AlicenseCqualityCmaintenanceRead-only MCP server for Meta (Facebook) Graph API, enabling access to Marketing API, Pages, Instagram, and WhatsApp Business data through Claude Code and any MCP-compatible client.3071MIT
- AlicenseBqualityBmaintenanceRead-only MCP server for Meta Ads that lists and reads ad accounts, campaigns, ad sets, ads, ad images, creatives, and fetches insights at various levels.14MIT
- Alicense-qualityCmaintenanceProvides read-only access to Meta Ads data and optionally creates paused ads, with safety features like OAuth and validation.1,364MIT
Related MCP Connectors
Self-hosted federated MCP gateway: one OAuth 2.1 MCP server in front of N apps, user-level scopes.
Managed LinkedIn MCP server for AI agents: search, connect, message and enrich on accounts you own.
Hosted Amazon Seller Central and Amazon Ads MCP server for Claude, ChatGPT, Cursor, and agents.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/guangyusong/meta-business-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server