meta-mcp-server
Provides tools for interacting with Facebook Pages, such as retrieving page details, creating page posts, and adding comments to posts.
Allows publishing photos and Reels to a linked Instagram Business account using Meta's Content Publishing API.
Integrates with the Meta Graph API to manage Facebook Pages and linked Instagram Business accounts, including posting content, commenting, and reading account details.
Click on "Deploy 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-mcp-server @meta-mcp-server publish a photo to my Instagram business account"
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-mcp-server
A Model Context Protocol server for the Meta Graph API — Facebook Pages and linked Instagram Business accounts.
MIT licensed.
Install
npm install -g @nasdigitaluk/meta-mcpRelated MCP server: facebook-mcp-video-reels
Configuration
{
"env": {
"META_PAGE_ACCESS_TOKEN": "your-page-token",
"META_PAGE_ID": "1234567890",
"META_IG_USER_ID": "17841400000000000"
}
}META_IG_ACCESS_TOKEN is optional — it defaults to the Page token, which is correct when the Instagram account is linked to that Page. The ids are optional too; they just default the arguments.
A long-lived Page token can be obtained through the Graph API Explorer and then exchanged, which is far less work than a full OAuth flow for a single account.
⚠️ Do not reason from the token's scope list
This is the finding worth carrying away, because it is wrong in both directions:
scope list says | reality | |
Reading Page content |
| fails, demanding |
Writing a comment |
| works |
Verified live. Every Page read endpoint (/{page}/feed, /me/feed, and by extension /{post}/comments) returns:
(#10) This endpoint requires the 'pages_read_engagement' permission or the 'Page Public Content Access' feature
…while debug_token lists that permission among the token's scopes. Granted but not effective, which points at App Review rather than at re-authorising.
Meanwhile a probe against POST /{post}/comments returned (#100) Invalid post_id parameter — it cleared the permission check and failed only on the deliberately fake id.
Writing works; reading it back does not. Trusting the scope list would have shipped the read tool and skipped the write — exactly backwards.
Two consequences here:
there is no read-comments tool, because it would always fail;
a successful
meta_create_post_commentis your only confirmation, and the tool says so.
⚠️ Tokens go in a header, not the URL
Meta's own examples put access_token=... in the query string. That puts the credential in access logs, proxy logs and browser history on every request. Here they are Authorization: Bearer headers, and there is a test asserting no request URL contains access_token.
Instagram publishing waits properly
Publishing to Instagram is two calls: create a media container, then publish it. Meta fetches and processes your media server-side, so publishing immediately is a race — and video loses it far more often than a photo.
The server this replaces published straight away with no wait at all. This one polls the container's status_code:
publishes as soon as it reports
FINISHED;refuses to publish one reporting
ERRORorEXPIRED;is bounded by attempts as well as by the clock, so a fast status endpoint cannot become a request storm;
falls back to publishing after the budget if
status_codenever appears, so a container type that does not report status is no worse off than before.
Instagram's Content Publishing API takes a public http(s) URL that Meta fetches, not a file upload. A local path can never work, so it is rejected at validation rather than sixty seconds later.
Tools
Tool | |
| A Page's details. |
| Post to a Page. Immediately public. |
| Comment — the link-in-first-comment pattern. |
| The linked Instagram Business account. |
| Publish a photo or Reel. |
| Anything else, with either token. |
The Page and Instagram tokens are kept apart — they are different tokens with different reach, and using the wrong one fails in a way that reads like a missing permission. meta_call takes an as argument so you can pick.
What is NOT covered
Meta publishes no machine-readable spec for the Graph API, and much of it is gated behind App Review in ways the scope list does not reflect. So this server does not claim complete coverage: it wraps what is verified working and offers meta_call as a documented passthrough for the rest.
Read-only and no-destructive modes
MCP_READ_ONLY=1 refuse anything that changes state
MCP_NO_DESTRUCTIVE=1 allow posting, refuse the generic callerTesting
npm test # 11 tests
SMOKE_ENV='{"META_PAGE_ACCESS_TOKEN":"x"}' npm run smoke # real MCP over stdioBuilt on
@nasdigitaluk/mcp-server-core.
Licence
MIT.
Available Tools
6 toolsmeta_callA
Call any Graph API endpoint directly, with the Page token by default. Meta publishes no machine-readable spec for the Graph API, so this server does not claim a complete catalogue — this is how you reach the rest of it. Paths are relative to the Graph host and version.
Inputs: path (required), as, query, method.
meta_create_instagram_postA
Publish to Instagram. Immediately public, no draft state.
Instagram's Content Publishing API does not accept a direct file upload: the media must be at a publicly reachable http(s) URL that Meta fetches server-side. A local path can never work.
Inputs: caption, image_url, video_url, ig_user_id, +1 more.
meta_create_page_postA
Post to a Facebook Page. Immediately public — there is no draft state here, and the only undo is deleting it.
Inputs: message (required), link, page_id.
meta_create_post_commentA
Comment on a Page post — how you put an outbound link in the first comment rather than the post body.
⚠️ A successful call here is your ONLY confirmation. Reading comments back is not possible with a standard app (see the README), so if this succeeds, believe it; there is nothing to verify against.
Inputs: message (required), post_id (required).
meta_get_instagram_accountD
The linked Instagram Business account.
Inputs: fields, ig_user_id.
meta_get_pageC
A Facebook Page's own details.
Inputs: fields, page_id.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool has a distinct purpose: page retrieval, post creation, comment creation, Instagram account retrieval, Instagram post creation, and a generic API caller. No overlaps or ambiguous boundaries.
All tools follow a consistent 'meta_verb_noun' pattern (e.g., meta_get_page, meta_create_page_post, meta_create_post_comment). Even the catch-all meta_call fits the naming convention.
Six tools is within the typical well-scoped range (3-15). It covers the core interactions without being overwhelming or excessively sparse.
The surface covers page and Instagram posting, plus a generic API caller that can fill gaps. However, it lacks dedicated operations like reading page posts or managing comments, which would be expected in full CRUD coverage. The catch-all mitigates this but doesn't fully replace dedicated tools.
Maintenance
Related MCP Connectors
Instagram MCP for DM and comment automation, AI Agent and content publishing via Meta's official API
Create, schedule, and publish social posts, manage accounts, and read analytics as MCP tools.
Instagram and Facebook Pages for AI agents: publish, comments, DM by keyword, inbox, insights.
Hosted Facebook Pages MCP server, with each action switched on or off per account.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables analytics and management of Facebook Pages through the Meta Graph API, including posts, insights, audience, and publishing.GPL 3.0
- AlicenseNot gradedqualityDmaintenanceEnables authentication with Facebook and provides tools to list pages, post text/images, upload videos, and create Reels on Facebook Pages.3 npmISC
- FlicenseNot gradedqualityDmaintenanceEnables publishing Facebook Page posts (text and photo) and retrieving page info via the Meta Graph API, with dry-run safety defaults and remote MCP transport.-
- AlicenseNot gradedqualityDmaintenanceEnables managing Facebook Pages via the Graph API, including posting, comment moderation, and post insights through natural language.MIT