facebook-automata-mcp
Provides tools to interact with the Facebook Graph API, enabling management of Pages, Posts, Comments, Reactions, Media, Events, and Insights, as well as credential handling.
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., "@facebook-automata-mcp Publish a photo to my Facebook page"
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.
facebook-automata-mcp
MCP (Model Context Protocol) server for the official Facebook Graph API. Exposes a complete toolset for Pages, Posts, Comments, Likes/Reactions, Photos/Videos, Events and Insights, plus dedicated tools to store and validate your Facebook credentials.
Install & run
No install needed if you have uv:
uvx facebook-automata-mcpOr install with pip:
pip install facebook-automata-mcp
facebook-automata-mcpUse with an MCP client (e.g. Claude Desktop / Claude Code)
{
"mcpServers": {
"facebook": {
"command": "uvx",
"args": ["facebook-automata-mcp"]
}
}
}Related MCP server: facebook-mcp-video-reels
Credentials
You do not need to edit any config file by hand. Once the server is
connected to your MCP client, just ask it (in your own words) to
configure Facebook, which will call the set_facebook_credentials
tool, e.g.:
"Set my Facebook access token to EAAB..."
This will:
Validate the token against
GET /me.Save it to
~/.facebook-automata-mcp/credentials.json(created with0700/0600permissions, owner-only).Return your validated identity (id/name).
Fields you can provide:
field | required | purpose |
| yes | User, Page, or App access token |
| no | Enables |
| no | Used together with |
| no | Default Page ID used when a tool's |
| no | Graph API version, defaults to |
Check current credentials at any time with check_facebook_credentials
(does a live validation call) or get_credentials_status (offline,
just checks the file exists). Remove them with
clear_facebook_credentials.
Credentials can also be provided via environment variables instead of (or in addition to) the stored file — env vars always win:
FACEBOOK_AUTOMATA_MCP_ACCESS_TOKEN=...
FACEBOOK_AUTOMATA_MCP_APP_ID=...
FACEBOOK_AUTOMATA_MCP_APP_SECRET=...
FACEBOOK_AUTOMATA_MCP_PAGE_ID=...
FACEBOOK_AUTOMATA_MCP_API_VERSION=v21.0
FACEBOOK_AUTOMATA_MCP_HOME=/custom/path # overrides ~/.facebook-automata-mcpGetting a token
The quickest way for a Page is Meta's Graph API
Explorer: select your
app, generate a User Access Token with pages_show_list,
pages_read_engagement, pages_read_user_content,
pages_manage_posts, and pages_manage_engagement, then call
get_my_accounts here to fetch your Page's own (page-scoped) access
token, and use that as access_token for Page-level tools.
Tools
Credentials
set_facebook_credentials— save + validate a tokencheck_facebook_credentials— live validation +/debug_tokeninfoget_credentials_status— offline checkclear_facebook_credentials— delete stored credentials
Identity
get_my_profile,get_user_profile,get_my_accounts
Pages
search_pages,get_page_info,get_page_posts,get_page_feed,get_page_tagged_posts,get_page_events,get_page_photos,get_page_videos,get_page_albums,get_page_insights
Posts
get_post,publish_page_post,delete_post
Comments
get_post_comments(includes who commented),get_comment,get_comment_replies,publish_comment,reply_to_comment,delete_comment,hide_comment
Likes / Reactions
get_post_likes,get_post_reactions(who + which reaction),get_comment_likes,get_comment_reactions,like_object,unlike_object
Media
upload_page_photo,upload_page_video
Escape hatch
graph_api_get,graph_api_post,graph_api_delete— call any Graph API edge not covered above
All list-style tools accept limit and after (pagination cursor from
the previous call's next_cursor) and return {ok, data, paging, next_cursor}.
Notes on Facebook API limitations
Modern Graph API versions restrict most personal-profile fields and the classic "who liked this / friend list" data for regular users due to privacy policy — Page-owned content (Page posts, their comments, and reactions) is the primary supported use case.
Some actions (posting, deleting, hiding comments, insights) require a Page access token with the relevant permissions (
pages_manage_posts,pages_manage_engagement,read_insights, etc.) and, for public apps, Meta App Review.
Development
python -m venv .venv && source .venv/bin/activate
pip install -e .
facebook-automata-mcpPublish to PyPI
pip install build twine
python -m build
twine upload dist/*Once published, anyone can run it with uvx facebook-automata-mcp
without installing anything permanently.
License
MIT
Available Tools
38 toolscheck_facebook_credentialsA
Check whether Facebook credentials are configured and still valid.
Loads credentials from ~/.facebook-automata-mcp/credentials.json (or FACEBOOK_MCP_* environment variables), calls GET /me to confirm the access token still works, and — if app_id/app_secret are also configured — calls /debug_token to report scopes, expiry, and whether the token is still valid according to Facebook.
Inputs: no named parameters. Returns: object
clear_facebook_credentialsA
Delete the stored credentials file (~/.facebook-automata-mcp/credentials.json).
Inputs: no named parameters. Returns: object
delete_commentB
Delete a comment by ID (DELETE /{comment-id}).
Inputs: comment_id (required). Returns: object
delete_postA
Delete a post by ID (DELETE /{post-id}). Requires ownership permissions.
Inputs: post_id (required). Returns: object
get_commentC
Get details of a single comment by ID (GET /{comment-id}).
Inputs: comment_id (required), fields. Returns: object
get_comment_likesA
List people who liked a comment (GET /{comment-id}/likes).
Inputs: comment_id (required), after, limit. Returns: object
get_comment_reactionsB
List reactions on a comment with who reacted and how (GET /{comment-id}/reactions).
Inputs: comment_id (required), after, limit, reaction_type. Returns: object
get_comment_repliesB
List replies to a comment (GET /{comment-id}/comments).
Inputs: comment_id (required), after, limit, fields. Returns: object
get_credentials_statusA
Quickly report whether credentials exist on disk, without any network call.
Inputs: no named parameters. Returns: object
get_my_accountsA
List the Facebook Pages managed by the current user token (GET /me/accounts).
Useful to discover page_id values and their page-scoped access tokens (returned in the 'access_token' field of each item).
Inputs: after, limit. Returns: object
get_my_profileA
Get the profile of the identity behind the configured access token (GET /me).
Note: Facebook heavily restricts which fields are available for personal user tokens without app review (usually just id, name, picture). Page tokens will return the Page's own info.
Inputs: fields. Returns: object
get_page_albumsA
List photo albums on the Page (GET /{page-id}/albums).
Inputs: after, limit, page_id. Returns: object
get_page_eventsC
List events hosted by the Page (GET /{page-id}/events).
Inputs: after, limit, page_id. Returns: object
get_page_feedA
List the Page's feed: own posts + posts/links from others on the Page (GET /{page-id}/feed).
Inputs: after, limit, fields, page_id. Returns: object
get_page_infoC
Get details about a Facebook Page (name, about, category, fan_count, etc.).
If page_id is omitted, uses the default page_id stored via 'set_facebook_credentials'.
Inputs: fields, page_id. Returns: object
get_page_insightsA
Get Page analytics/insights (GET /{page-id}/insights).
Requires the Page access token to have the read_insights permission. metric is a comma-separated list, e.g. "page_impressions,page_engaged_users,page_fans,page_views_total". period is one of: day, week, days_28, month, lifetime.
Inputs: since, until, metric, period, +1 more. Returns: object
get_page_photosA
List photos posted by the Page (GET /{page-id}/photos?type=uploaded).
Inputs: after, limit, page_id. Returns: object
get_page_postsB
List posts published BY a Page (GET /{page-id}/posts).
since/until accept Unix timestamps or strtotime-compatible strings (e.g. "2026-01-01").
Inputs: after, limit, since, until, +2 more. Returns: object
get_page_tagged_postsC
List posts the Page has been tagged in (GET /{page-id}/tagged).
Inputs: after, limit, fields, page_id. Returns: object
get_page_videosC
List videos posted by the Page (GET /{page-id}/videos).
Inputs: after, limit, page_id. Returns: object
get_postB
Get full details of a single post by its ID (GET /{post-id}).
Inputs: post_id (required), fields. Returns: object
get_post_commentsB
List comments on a post, including who commented (GET /{post-id}/comments).
order: "chronological" or "reverse_chronological". filter: "toplevel" (top-level comments only) or "stream" (include replies inline). Each comment item includes 'from' with the commenter's id/name.
Inputs: post_id (required), after, limit, order, +2 more. Returns: object
get_post_likesB
List people who liked a post, including their id/name (GET /{post-id}/likes).
Inputs: post_id (required), after, limit. Returns: object
get_post_reactionsA
List reactions on a post with who reacted and how (GET /{post-id}/reactions).
reaction_type filters to one of: LIKE, LOVE, WOW, HAHA, SAD, ANGRY, THANKFUL, CARE. Omit to get all reaction types (each item includes a 'type' field showing which reaction the person used).
Inputs: post_id (required), after, limit, reaction_type. Returns: object
get_user_profileB
Get public profile info for a given Facebook user or page ID.
Note: Modern Graph API restricts most personal fields for non-consenting users; only public fields (id, name, picture, etc.) are typically returned unless you have specific permissions/roles.
Inputs: user_id (required), fields. Returns: object
graph_api_deleteC
Generic DELETE against any Graph API edge, e.g. edge="{post-id}".
Inputs: edge (required), params. Returns: object
graph_api_getA
Generic GET against any Graph API edge, e.g. edge="{id}/comments".
Use this for any endpoint not covered by a dedicated tool. params
is passed through as query parameters (do not include access_token).
Inputs: edge (required), params. Returns: object
graph_api_postB
Generic POST against any Graph API edge, e.g. edge="{id}/feed".
Inputs: edge (required), data. Returns: object
hide_commentA
Hide or unhide a comment on your Page's post (POST /{comment-id}?is_hidden=...).
Inputs: comment_id (required), hide. Returns: object
like_objectA
Like a post/comment/object as the current identity (POST /{object-id}/likes).
Inputs: object_id (required). Returns: object
publish_commentA
Post a new top-level comment on a post (POST /{post-id}/comments).
Inputs: message (required), post_id (required). Returns: object
publish_page_postA
Publish a new post on a Page (POST /{page-id}/feed).
Set published=False and provide scheduled_publish_time (a future Unix timestamp) to schedule the post instead of publishing immediately.
Inputs: message (required), link, page_id, published, +1 more. Returns: object
reply_to_commentC
Reply to an existing comment (POST /{comment-id}/comments).
Inputs: message (required), comment_id (required). Returns: object
search_pagesA
Search public Facebook Pages by name/keyword (GET /search?type=page).
Inputs: query (required), after, limit. Returns: object
set_facebook_credentialsA
Store Facebook Graph API credentials and validate them immediately.
Saves the given values to ~/.facebook-automata-mcp/credentials.json (merged
with any previously stored fields) and validates the access_token by
calling GET /me. Use this once before using any other tool.
Args: access_token: A Facebook User, Page, or App access token (long-lived tokens recommended). Required. app_id: Your Facebook App ID (optional, enables token introspection via /debug_token). app_secret: Your Facebook App Secret (optional, used together with app_id for /debug_token introspection; never sent anywhere except graph.facebook.com). page_id: A default Facebook Page ID to use for tools where page_id is not explicitly supplied. api_version: Graph API version to target, e.g. "v21.0" (defaults to v21.0 if omitted).
Inputs: access_token (required), app_id, page_id, app_secret, +1 more. Returns: object
unlike_objectB
Remove a previously placed like (DELETE /{object-id}/likes).
Inputs: object_id (required). Returns: object
upload_page_photoA
Upload a photo to a Page from a public image URL (POST /{page-id}/photos).
Inputs: image_url (required), caption, page_id, published. Returns: object
upload_page_videoA
Upload a video to a Page from a public video URL (POST /{page-id}/videos).
Inputs: video_url (required), title, page_id, description. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 38 tools
Each tool targets a distinct Graph API resource and action, with clear boundaries even for similar pairs like get_my_profile vs get_user_profile or get_page_posts vs get_page_feed. The descriptions precisely define the scope of each tool.
All tools follow a consistent snake_case verb_noun pattern (set_, get_, publish_, delete_, etc.) with uniform resource naming. There are no mixed conventions or vague names.
At 38 tools, the server is overly large for its purpose. Many specific tools (e.g., get_post_comments, get_post_likes) duplicate functionality already covered by the generic graph_api_get/post/delete tools, exceeding the reasonable size for a focused toolset.
The toolset covers core Facebook automation workflows: credentials, profile, pages, posts, comments, likes, and media upload. Minor gaps like explicit update operations (edit post/comment) and event creation exist, but generic Graph API tools provide fallbacks.
Maintenance
Related MCP Connectors
Publish and schedule social posts, upload media, and review analytics through OAuth.
Publish and schedule Facebook Page posts from your AI assistant.
Schedule and publish social posts with OAuth, drafts, media, workspaces, and brand memory.
Manage Microsoft 365 email, calendar, contacts and inbox rules via the Graph API with OAuth 2.0.
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.5 npmISC
- AlicenseNot gradedqualityDmaintenanceEnables automating and managing Facebook Page interactions through the Graph API, including posting, comment moderation, engagement analytics, scheduling, and direct messaging from natural language.MIT
- AlicenseBqualityCmaintenanceEnables MCP-based interaction with the Meta Graph API for Facebook Pages and linked Instagram Business accounts, including posting, commenting, and reading page details.64 npmMIT