Facebook MCP Server
Provides tools for managing Facebook Pages, including creating posts, replying to comments, moderating comments, deleting posts, fetching page insights and metrics, sending direct messages, scheduling posts, and managing reactions and shares.
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., "@Facebook MCP ServerPost a new update about our upcoming event"
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 MCP Server
This project is a MCP server for automating and managing interactions on a Facebook Page using the Facebook Graph API. It exposes tools to create posts, moderate comments, fetch post insights, and filter negative feedback β ready to plug into Claude, or other LLM-based agents.
π€ What Is This?
This MCP provides a suite of AI-callable tools that connect directly to a Facebook Page, abstracting common API operations as LLM-friendly functions.
β Benefits
Empowers social media managers to automate moderation and analytics.
Seamlessly integrates with Claude Desktop or any Agent client.
Enables fine-grained control over Facebook content from natural language.
Related MCP server: Just Facebook MCP Server
π¦ Features
Tool | Description |
| Create a new Facebook post with a message. |
| Reply to a specific comment on a post. |
| Retrieve recent posts from the Page. |
| Fetch comments on a given post. |
| Delete a specific post by ID. |
| Delete a specific comment by ID. |
| Hide a comment from public view. |
| Unhide a previously hidden comment. |
| Alias for deleting a comment from a specific post. |
| Filter out comments with negative sentiment keywords. |
| Count the number of comments on a post. |
| Count the number of likes on a post. |
| Get total impressions on a post. |
| Get number of unique users who saw the post. |
| Get number of paid impressions on the post. |
| Get number of organic impressions on the post. |
| Get number of users who engaged with the post. |
| Get number of clicks on the post. |
| Get total number of 'Like' reactions. |
| Get the top commenters on a post. |
| Post an image with a caption to the Facebook page. |
| Send a direct message to a user. |
| Updates an existing post's message. |
| Schedule a post for future publication. |
| Retrieve the total number of Page fans. |
| Get the number of shares on a post. |
| Get all reaction counts for a post in one call. |
| Delete multiple comments by ID. |
| Hide multiple comments by ID. |
| Unhide multiple comments by ID. |
| Get all replies to a specific comment. |
| Get the permalink URL of a post. |
| List all scheduled (unpublished) posts on the Page. |
| Get extended Page details (name, about, category, website). |
This fork runs the server over HTTP (streamable-http) in Docker, designed for LAN/Tailscale access. Unlike upstream, the server holds no credentials β each client sends its Facebook
access token+page idper request via HTTP headers. Original stdio project: hagaihen/facebook-mcp-server.
π Deploy with Docker Compose
git clone git@github.com:hoangvantuan/fb_page_mcp.git
cd fb_page_mcp
docker compose up -d --buildService fb-mcp listens on the endpoint http://<host>:9000/mcp (container 0.0.0.0:8000,
published as 9000:8000, stateless, restart: unless-stopped, healthcheck included).
docker compose logs -f # xem log
docker compose ps # trαΊ‘ng thΓ‘i (Up healthy)
docker compose down # dα»«ngArchitecture β credentials from the client
The server keeps no secret. facebook_api.py reads credentials from the current request's headers
(via the MCP SDK request_ctx), so every client uses its own Page:
Header | Meaning |
| Facebook Page access token |
| Facebook Page ID |
Missing either header β the tool returns a clear Missing credentials error (no empty API call).
run_http.py disables the SDK's DNS-rebinding protection so non-localhost Hosts (LAN/Tailscale IP)
are accepted.
π§© Connect from Claude Code
# host has exported FACEBOOK_ACCESS_TOKEN + FACEBOOK_PAGE_ID; single quotes keep
# the secret out of the config file (Claude Code resolves ${VAR} at runtime)
claude mcp add --transport http fb-mcp http://<HOST-OR-TAILSCALE-IP>:9000/mcp \
--header 'X-Facebook-Access-Token: ${FACEBOOK_ACCESS_TOKEN}' \
--header 'X-Facebook-Page-Id: ${FACEBOOK_PAGE_ID}'Verify: claude mcp list shows fb-mcp connected β call get_page_info.
Getting the credentials
Get a Page Access Token (not a User token) + Page ID from
https://developers.facebook.com/tools/explorer (choose Get Page Access Token), granting
pages_show_list, pages_read_engagement, pages_manage_posts, pages_manage_engagement,
read_insights, and pages_messaging. GET /me?fields=id with the Page token returns the Page ID.
β οΈ Security note
No application-level auth. Anyone who can reach port 9000 and holds a valid token can call every
tool. Use only on a trusted LAN/tailnet. To tighten: bind ports to a single host IP
("192.168.x.x:9000:8000"), firewall the port, or add a reverse proxy checking a bearer token.
π€ Contributing
Contributions, issues, and feature requests are welcome!
Feel free to fork the repo and submit a pull request.
Create a branch:
git checkout -b feature/YourFeatureCommit your changes:
git commit -m 'feat: add new feature'Push to the branch:
git push origin feature/YourFeatureOpen a pull request π
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.
Latest Blog Posts
- 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/hoangvantuan/fb_page_mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server