facebook-automata-mcp
facebook-automata-mcp
MCP(Model Context Protocol)服务器,面向 官方 Facebook Graph API。它提供了覆盖主页、帖子、评论、点赞/反应、照片/视频、活动及数据洞察(Insights)的完整工具集,另外还有专门用于保存和验证 Facebook 凭据的工具。
安装与运行
如果你已安装 uv,则无需安装:
uvx facebook-automata-mcp或者通过 pip 安装:
pip install facebook-automata-mcp
facebook-automata-mcp在 MCP 客户端中使用(例如 Claude Desktop / Claude Code)
{
"mcpServers": {
"facebook": {
"command": "uvx",
"args": ["facebook-automata-mcp"]
}
}
}Related MCP server: Facebook MCP Server
凭据
你无需手动编辑任何配置文件。一旦服务器连接到你的 MCP 客户端,只需用自己的话让它配置 Facebook,它会调用 set_facebook_credentials 工具,例如:
“将我的 Facebook 访问令牌设置为 EAAB...”
这一过程将:
通过
GET /me验证该令牌。将其保存到
~/.facebook-automata-mcp/credentials.json(以0700/0600权限创建,仅所有者可访问)。返回验证后的身份信息(id/name)。
可提供的字段:
字段 | 必填 | 用途 |
| 是 | 用户、主页或应用的访问令牌 |
| 否 | 启用 |
| 否 | 与 |
| 否 | 当某个工具的 |
| 否 | Graph API 版本,默认为 |
你可以随时通过 check_facebook_credentials(实时验证调用)或 get_credentials_status(离线,仅检查文件是否存在)来查看当前凭据,并用 clear_facebook_credentials 删除它们。
你还可以通过环境变量提供凭据,而不是(或同时配合)已保存的文件——环境变量始终优先:
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-mcp获取一个令牌
对于主页来说,最快的方式是使用 Meta 的 Graph API Explorer:选择你的应用,生成一个带 pages_show_list、pages_read_engagement、pages_read_user_content、pages_manage_posts 和 pages_manage_engagement 权限的用户访问令牌,然后在这里调用 get_my_accounts 获取你主页自己的(page-scoped)访问令牌,再把它作为 access_token 用于主页级工具。
工具
凭据
set_facebook_credentials— 保存并验证令牌check_facebook_credentials— 实时验证 +/debug_token信息get_credentials_status— 离线检查clear_facebook_credentials— 删除已保存的凭据
身份
get_my_profile、get_user_profile、get_my_accounts
主页
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
帖子
get_post、publish_page_post、delete_post
评论
get_post_comments(包含评论者)、get_comment、get_comment_replies、publish_comment、reply_to_comment、delete_comment、hide_comment
点赞 / 反应
get_post_likes、get_post_reactions(谁 + 哪种反应)、get_comment_likes、get_comment_reactions、like_object、unlike_object
媒体
upload_page_photo、upload_page_video
逃生通道
graph_api_get、graph_api_post、graph_api_delete— 调用上面未涵盖的任何 Graph API 边(edge)
所有列表式工具都接受 limit 和 after(即上一次调用返回的 next_cursor 作为分页游标),并返回 {ok, data, paging, next_cursor}。
Facebook API 限制说明
由于隐私政策,较新的 Graph API 版本对普通用户的大多数个人资料字段以及经典的“谁点赞 / 好友列表”数据进行了限制——由主页拥有的(主页帖子、及其评论和反应)内容是主要受支持的使用场景。
某些操作(发帖、删除、隐藏评论、数据洞察等)需要带有相应权限(
pages_manage_posts、pages_manage_engagement、read_insights等)的 主页访问令牌;对于公开应用,还需要通过 Meta App Review。
开发
python -m venv .venv && source .venv/bin/activate
pip install -e .
facebook-automata-mcp发布到 PyPI
pip install build twine
python -m build
twine upload dist/*发布后,任何人都可以用 uvx facebook-automata-mcp 运行它,而无需永久安装任何东西。
许可证
MIT
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
- AlicenseBqualityDmaintenanceAutomates Facebook Page management through the Graph API, enabling content posting, comment moderation, analytics tracking, and engagement monitoring through natural language interactions.309MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to manage Facebook profiles, pages, posts, and engagement via the Graph API with OAuth authentication.2
- AlicenseNot gradedqualityCmaintenanceEnables analytics and management of Facebook Pages through the Meta Graph API, including posts, insights, audience, and publishing.GPL 3.0
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to automate Facebook Page management including posting, commenting, and analytics via the Facebook Graph API.MIT
Related MCP Connectors
Boost posts and launch community growth campaigns from your AI assistant. OAuth, credit-billed.
Publish, schedule, and manage social media posts across major platforms via the Postproxy API.
Create, schedule and publish social posts to TikTok, Instagram, Facebook and YouTube.
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/ICWR-TEAM/Facebook-Automata-MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server