facebook-mcp
Manage and publish content on a Facebook Page through Meta Graph API.
Retrieve Page info such as name, category, follower count, and link.
Post text status updates.
Post links with an optional message.
Post photos from public URLs with optional captions.
Post videos from public URLs with optional title and description.
List recent Page posts with a configurable limit.
Get details for a specific post by ID.
Delete a post by ID.
Retrieve comments for a post.
Reply to a post or comment.
Optionally provide
page_idandaccess_tokenper tool call for multi-account use, but both must be supplied together.
Allows posting and managing content on Facebook Pages via the Meta Graph API, including creating posts, uploading media, and interacting with comments.
Integrates with Meta's Graph API to manage Facebook Pages, enabling posting, editing, and deleting content, as well as reading engagement and comments.
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-mcp post a status saying 'Hello World from MCP!'"
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 Page MCP Server
MCP đăng & quản lý nội dung trên Facebook Page qua Meta Graph API v21.0. Chạy được STDIO (npx từ GitHub, dùng local) hoặc HTTP (deploy remote cho Evose). Ai cũng dùng được — chỉ điền biến môi trường, không sửa code.
10 tools: get_page_info, post_status, post_link, post_photo, post_video, list_posts, get_post, delete_post, get_post_comments, reply_comment.
Mọi tool nhận thêm hai tham số tuỳ chọn page_id và access_token, nên một bản chạy phục vụ được nhiều tài khoản. Không truyền thì server dùng biến môi trường làm giá trị mặc định.
Truyền page_id thì phải truyền cả access_token, và ngược lại. Truyền nửa cặp thì server báo thiếu cấu hình chứ không lặng lẽ dùng credential mặc định. Một ô để trống từng làm bài của tài khoản này đăng lên tài khoản khác mà vẫn báo thành công.
Mọi tham số id chỉ nhận chữ số, chữ cái và dấu gạch dưới, tối đa 64 ký tự. Id chứa /, ? hay & bị từ chối, vì nó đổi được endpoint Graph API.
Biến môi trường
Biến | Bắt buộc | Mô tả |
FB_PAGE_ID | ✅ | ID Facebook Page |
FB_PAGE_ACCESS_TOKEN | ✅ | Page Access Token (nên dùng long-lived) |
FB_GRAPH_VERSION | ❌ | Mặc định v21.0 |
MCP_TRANSPORT | ❌ |
|
MCP_AUTH_TOKEN | Bắt buộc khi | Secret dùng cho header |
HOST | ❌ | Địa chỉ bind khi chạy HTTP, mặc định |
PORT | ❌ | Cổng lắng nghe khi chạy HTTP, mặc định |
MCP_PUBLIC_HOST | ❌ | Hostname công khai (qua reverse proxy) để chặn DNS rebinding |
Related MCP server: was-fb-mcp
Lấy token
developers.facebook.com → tạo App (Business).
Graph API Explorer → chọn app + page → cấp quyền:
pages_manage_posts,pages_read_engagement,pages_show_list.Generate token → đổi sang long-lived token.
Lấy Page ID trong phần About của page.
Import vào Evose (STDIO / npx)
{
"mcpServers": {
"facebook": {
"command": "npx",
"args": ["-y", "github:<user>/facebook-mcp"],
"env": {
"FB_PAGE_ID": "...",
"FB_PAGE_ACCESS_TOKEN": "..."
}
}
}
}Thay <user> bằng GitHub username sau khi push. Execution Timeout để 120s.
Import vào Evose (HTTP remote)
Deploy server ở chế độ MCP_TRANSPORT=http (VPS/Railway/Render), sau đó khai báo trong Evose dạng Streamable HTTP:
{
"mcpServers": {
"facebook": {
"url": "https://<domain-cua-server>/mcp",
"type": "streamable-http",
"headers": { "Authorization": "Bearer <MCP_AUTH_TOKEN>" }
}
}
}Ghi chú
Ảnh/video đăng từ URL công khai. Server tự báo lỗi nếu thiếu biến môi trường (không crash).
License MIT.
Available Tools
10 toolsdelete_postC
Xoa mot bai dang theo post_id.
Inputs: post_id (required).
get_page_infoA
Lay thong tin Facebook Page (ten, category, so follower, link).
Inputs: no named parameters.
get_postC
Lay chi tiet mot bai dang theo post_id.
Inputs: post_id (required).
get_post_commentsC
Lay binh luan cua mot bai dang.
Inputs: post_id (required), limit.
list_postsA
Lay danh sach bai da dang tren Page.
Inputs: limit.
post_linkC
Dang bai kem link len Page.
Inputs: link (required), message.
post_photoB
Dang anh len Page tu URL anh cong khai.
Inputs: image_url (required), message.
post_statusB
Dang bai text (status) len Page.
Inputs: message (required).
post_videoC
Dang video len Page tu URL video cong khai.
Inputs: video_url (required), title, description.
reply_commentC
Tra loi/binh luan vao mot bai dang hoac mot comment.
Inputs: message (required), object_id (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Each tool targets a distinct action: four posting types (status, link, photo, video), three post CRUD operations (list, get, delete), two comment operations (get, reply), and page info. No overlap.
All tool names follow a consistent verb_noun pattern (e.g., post_status, list_posts, delete_post). English verbs are used throughout, making the set predictable.
10 tools cover core Facebook page management: posting, reading, deleting, commenting, and page info. This count is well-scoped for the purpose.
Covers essential create, read, delete for posts, plus comments and page info. Missing update_post and engagement actions like likes, but the core workflow is complete for basic management.
Maintenance
Related MCP Connectors
Instagram and Facebook Pages for AI agents: publish, comments, DM by keyword, inbox, insights.
Publish and schedule Facebook Page posts from your AI assistant.
Social media API for AI agents: publish, DMs, comments, Meta ads and leads.
60+ Meta Ads tools for AI agents: audits, campaign management, audiences and CAPI tracking.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to automate Facebook Page management including posting, commenting, and analytics via the Facebook Graph API.MIT
- AlicenseAqualityDmaintenanceExposes 10 tools to manage Facebook Pages, Posts, Comments, Ad Accounts, Campaigns, Insights, and execute any raw Graph API request from AI coding assistants.10MIT
- AlicenseNot gradedqualityDmaintenanceEnables managing Facebook Pages via the Graph API, including posting, comment moderation, and post insights through natural language.MIT
- AlicenseAqualityBmaintenanceEnables AI agents to manage Facebook Pages through Meta's Graph API, including posting, scheduling, drafts, reading insights, and moderating comments.1544 npm2MIT