Facebook Pages Manager MCP server

Integrates with Facebook Pages to enable direct management of posts, comments, and engagement metrics through the Graph API for streamlined social media management.
Back to servers
Provider
Hagai Hen
Release date
May 09, 2025
Stats
14 stars

This MCP server provides a comprehensive interface for automating and managing Facebook Page interactions through the Facebook Graph API. It allows you to create posts, moderate comments, fetch analytics, and more using a set of AI-callable tools.

Overview

The Facebook MCP Server acts as a bridge between LLMs (like Claude) and your Facebook Page, offering over 20 specialized tools that make it easy to manage your social media presence programmatically. These tools handle everything from content creation and moderation to detailed analytics retrieval.

Installation

Prerequisites

  • A Facebook Page and developer account
  • Access token with appropriate permissions
  • Python environment

Step-by-Step Setup

  1. Clone the repository:
git clone https://github.com/your-org/facebook-mcp-server.git
cd facebook-mcp-server
  1. Install dependencies using uv:

First, install uv if you don't have it:

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

Then install project dependencies:

uv pip install -r requirements.txt
  1. Set up environment variables:

Create a .env file in the root directory with your Facebook credentials:

FACEBOOK_ACCESS_TOKEN=your_facebook_page_access_token
FACEBOOK_PAGE_ID=your_page_id

You can obtain these credentials from the Facebook Graph API Explorer.

Integration with Claude Desktop

To use the Facebook MCP Server with Claude:

  1. Open Claude Desktop
  2. Navigate to Settings → Developer → Edit Config
  3. Add the following configuration:
"FacebookMCP": {
  "command": "uv",
  "args": [
    "run",
    "--with",
    "mcp[cli]",
    "--with",
    "requests",
    "mcp",
    "run",
    "/path/to/facebook-mcp-server/server.py"
  ]
}

Make sure to replace /path/to/facebook-mcp-server/ with the actual path to your installation.

Available Tools

Content Creation

  • post_to_facebook - Create a new text post
  • post_image_to_facebook - Post an image with caption
  • update_post - Edit an existing post
  • schedule_post - Schedule a post for future publication

Engagement Management

  • reply_to_comment - Reply to a specific comment
  • send_dm_to_user - Send a direct message to a user
  • delete_comment - Remove a specific comment
  • filter_negative_comments - Identify comments with negative sentiment

Content Retrieval

  • get_page_posts - Fetch recent posts
  • get_post_comments - Get comments on a specific post
  • get_number_of_comments - Count comments on a post
  • get_post_top_commenters - Identify most active commenters

Analytics

  • get_number_of_likes - Count post likes
  • get_post_impressions - Get total impressions
  • get_post_impressions_unique - Count unique viewers
  • get_post_impressions_paid - Count paid impressions
  • get_post_impressions_organic - Count organic impressions
  • get_post_engaged_users - Count user engagements
  • get_post_clicks - Count clicks on a post
  • get_post_share_count - Count shares
  • get_page_fan_count - Count total page followers

Usage Examples

Once configured, you can use natural language to instruct Claude to perform Facebook Page management tasks. For example:

  • "Create a new post announcing our weekend sale"
  • "Check for any negative comments on our latest post and respond professionally"
  • "Get analytics on our most recent promotional post"
  • "Schedule a post for tomorrow at 9am about our new product launch"

The MCP server will automatically translate these requests into the appropriate API calls using the tools listed above.

How to add this MCP server to Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "cursor-rules-mcp": {
            "command": "npx",
            "args": [
                "-y",
                "cursor-rules-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later