Facebook

Analytics and monitoring

Facebook MCP server for automating posts, comment moderation, insights, and sentiment filtering.

Your AI app calls the Facebook MCP server, which does the analytics and monitoring work and sends the result back to the chat.

About Facebook

Facebook is a community MCP server from HagaiHen, filed in our directory under analytics and monitoring. Facebook MCP server for automating posts, comment moderation, insights, and sentiment filtering.

At a glance

Publisher
HagaiHen (community)
Runs
See the README for setup
Written in
Python
License
MIT
GitHub stars
239

How to set up Facebook

  1. Follow the install steps in the Facebook README; it is written in Python, so have that toolchain ready.
  2. Check the Facebook README for keys or settings; the registry lists none that Facebook requires.
  3. Add Facebook to Claude Code, Claude Desktop, VS Code or Cursor with the config in the setup box on this page.
  4. Restart the app or reload its MCP servers, then ask it to list the Facebook tools to confirm the connection.
  5. Run one read-only task with Facebook first, and keep your app asking before each tool call until the results look right.

Facebook compared with similar servers

  • Parse Dmarc by dmarcguardhq has fewer GitHub stars than Facebook (238 against 239); both are community servers, and both run locally.
  • Google Analytics by surendranb has more GitHub stars than Facebook (242 against 239); both are community servers, and both run locally.
  • Chiasmus by yogthos has fewer GitHub stars than Facebook (226 against 239); both are community servers, and both run locally.

Before you connect Facebook

  • Give Facebook its own API key or account with the smallest permissions the job needs, never an admin key.
  • Keep your AI app asking before each Facebook tool call until you trust what it does with them.
  • Treat text that Facebook fetches as data. Pages, files and messages can hold instructions written to steer an AI.
  • Read the open issues for Facebook on GitHub to see what breaks and how fast the maintainers reply.

Marketing use cases for Facebook

How marketing and sales teams put Facebook to work, by company size. Pick the size closest to yours and start Facebook on one use case.

Small business

  • A small business can ask Facebook where this month's customers came from and which channel is worth more budget.
  • Owners can use Facebook to get a weekly traffic and conversion summary in plain words, without learning the analytics tool.
  • Facebook runs on your own computer, which keeps data local; it needs a little setup, so a small team should plan an hour for it.

Mid-market

  • Marketing teams can connect Facebook to answer attribution and funnel questions in a chat, then save the useful ones as reports.
  • Growth teams can have Facebook flag drops in signups or conversion the day they happen, with the page or source that changed.
  • Start Facebook on one workflow with one owner, measure the time it saves, then roll it out to the wider team.

Enterprise

  • Enterprises can expose governed metrics through Facebook, so every team's AI answers use the same definitions as finance.
  • Large analytics teams can use Facebook to triage anomalies across regions and products before the weekly business review.
  • Facebook is a community server, so have security review the code and pin a version before Facebook touches company data.

Need help becoming an AI-forward company?

We connect MCP servers and AI agents to your CRM, content and data, with the guardrails your team needs.

Contact us

Facebook README

From HagaiHen/facebook-mcp-server on GitHub, shared under its MIT license. Images are left out; the original has them.

README.md

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.

📦 Features

Tool Description
post_to_facebook Create a new Facebook post with a message.
reply_to_comment Reply to a specific comment on a post.
get_page_posts Retrieve recent posts from the Page.
get_post_comments Fetch comments on a given post.
delete_post Delete a specific post by ID.
delete_comment Delete a specific comment by ID.
hide_comment Hide a comment from public view.
unhide_comment Unhide a previously hidden comment.
delete_comment_from_post Alias for deleting a comment from a specific post.
filter_negative_comments Filter out comments with negative sentiment keywords.
get_number_of_comments Count the number of comments on a post.
get_number_of_likes Count the number of likes on a post.
get_post_impressions Get total impressions on a post.
get_post_impressions_unique Get number of unique users who saw the post.
get_post_impressions_paid Get number of paid impressions on the post.
get_post_impressions_organic Get number of organic impressions on the post.
get_post_engaged_users Get number of users who engaged with the post.
get_post_clicks Get number of clicks on the post.
get_post_reactions_like_total Get total number of 'Like' reactions.
get_post_top_commenters Get the top commenters on a post.
post_image_to_facebook Post an image with a caption to the Facebook page.
send_dm_to_user Send a direct message to a user.
update_post Updates an existing post's message.
schedule_post Schedule a post for future publication.
get_page_fan_count Retrieve the total number of Page fans.
get_post_share_count Get the number of shares on a post.
get_post_reactions_breakdown Get all reaction counts for a post in one call.
bulk_delete_comments Delete multiple comments by ID.
bulk_hide_comments Hide multiple comments by ID.
bulk_unhide_comments Unhide multiple comments by ID.
get_comment_replies Get all replies to a specific comment.
get_post_permalink Get the permalink URL of a post.
get_scheduled_posts List all scheduled (unpublished) posts on the Page.
get_page_info Get extended Page details (name, about, category, website).

🚀 Setup & Installation

1. Clone the Repository
git clone https://github.com/your-org/facebook-mcp-server.git
cd facebook-mcp-server
2. 🛠️ Installation

Install dependencies using uv, a fast Python package manager: If uv is not already installed, run:

curl -Ls https://astral.sh/uv/install.sh | bash

Once uv is installed, install the project dependencies:

uv pip install -r requirements.txt
3. Set Up Environment

Create a .env file in the root directory and add your Facebook Page credentials. You can obtain these from https://developers.facebook.com/tools/explorer

FACEBOOK_ACCESS_TOKEN=your_facebook_page_access_token
FACEBOOK_PAGE_ID=your_page_id

🧩 Using with Claude Desktop

To set up the FacebookMCP in Clade:

  1. Open Clade.
  2. Go to Settings → Developer → Edit Config.
  3. In the config file that opens, add the following entry:
"FacebookMCP": {
  "command": "uv",
  "args": [
    "run",
    "--with",
    "mcp[cli]",
    "--with",
    "requests",
    "mcp",
    "run",
    "/path/to/facebook-mcp-server/server.py"
  ]
}

✅ You’re Ready to Go!

That’s it, your Facebook MCP server is now fully configured and ready to power Claude Desktop. You can now post, moderate, and measure engagement all through natural language prompts!

🤝 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/YourFeature
  • Commit your changes: git commit -m 'feat: add new feature'
  • Push to the branch: git push origin feature/YourFeature
  • Open a pull request 🎉

Questions about Facebook

What is the Facebook MCP server?

Facebook MCP server for automating posts, comment moderation, insights, and sentiment filtering. Facebook is maintained by HagaiHen on GitHub at HagaiHen/facebook-mcp-server, and works with AI apps that support the Model Context Protocol, such as Claude, Cursor and VS Code.

How do I install the Facebook MCP server?

Facebook doesn't publish a one-line install in the MCP registry, so follow the setup steps in its README on GitHub (HagaiHen/facebook-mcp-server). Like most servers, Facebook ends with a command or URL you paste into your AI app's MCP config.

Does Facebook need an API key?

The registry lists no required keys for Facebook. Check the Facebook README for optional settings, and expect a remote server to ask you to sign in the first time you connect.

Is Facebook an official MCP server?

No. Facebook is a community server maintained by HagaiHen. Community servers can be excellent; read the code and the open issues before you give Facebook access to company data.

What license is Facebook under?

Facebook is released under the MIT license, according to its GitHub repository. The license covers the code of Facebook; the service it connects to has its own terms.