Skip to main content

Facebook MCP Server

Overview

A Model Context Protocol (MCP) server implementation that provides Facebook Page interaction and management capabilities. This server enables automated posting, comment moderation, and content retrieval.

Components

Tools

The server offers the following tools:

  • post_to_facebook:
    • Posts a message to the Facebook Page.
    • Input: message (string): The message to post.
  • reply_to_comment:
    • Replies to a comment on a specific post.
    • Input:
      • post_id (string): The ID of the post.
      • comment_id (string): The ID of the comment.
      • message (string): The reply message.
  • get_page_posts:
    • Retrieves posts published on the Facebook Page.
    • Input: None.
  • get_post_comments:
    • Retrieves comments for a specific post.
    • Input: post_id (string): The ID of the post.
  • filter_negative_comments:
    • Filters negative comments from a post based on keywords.
    • Input: post_id (string): The ID of the post.
  • delete_post:
    • Deletes a post from the Facebook Page.
    • Input: post_id (string): The ID of the post to delete.
  • delete_comment:
    • Deletes a comment from a post.
    • Input: comment_id (string): The ID of the comment to delete.

Setup

  1. Configure Facebook Credentials:

    • Create a .env file in the root directory of your project.

    • Add your Facebook Page access token and Page ID to the .env file:

      FACEBOOK_PAGE_ACCESS_TOKEN=YOUR_PAGE_ACCESS_TOKEN
      FACEBOOK_PAGE_ID=YOUR_PAGE_ID
      
    • Replace YOUR_PAGE_ACCESS_TOKEN and YOUR_PAGE_ID with your actual values.

    • Important: Add .env to your .gitignore to avoid committing sensitive information.

  2. Configure in Claude Desktop (or your MCP Client):

    • Configure your MCP client (e.g., Claude Desktop) to connect to the Facebook MCP server.

    • Example configuration for Claude Desktop (uv):

      {
        "mcpServers": {
            "facebook": {
                "command": "uv",
                "args": [
                    "--directory",
                    "/path/to/facebook-mcp-server",
                    "run",
                    "facebook-mcp-server"  
                ]
            }
        }
      }
      

Building

Comming Next.

License

This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.

Metadata

Release files for facebook-mcp-server 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for facebook-mcp-server 0.1.0
File Size Uploaded
facebook_mcp_server-0.1.0.tar.gz 13.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for facebook-mcp-server 0.1.0
File Interpreter ABI Platform
facebook_mcp_server-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 18.3 kB

Release files / facebook_mcp_server-0.1.0.tar.gz

Download URL facebook_mcp_server-0.1.0.tar.gz
Size 13.3 kB
Tags Source
SHA-256 checksum
How to use checksums
1e6ff060242ba20965149918acf57af7fbc3bc96ce84d356f05622c173b23ef8
BLAKE2b-256 checksum
How to use checksums
84a9b8f5d0649bdea639772f7c7f88797d6583fe6eab1f6ede22ffbf8d4306de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.0

Release files / facebook_mcp_server-0.1.0-py3-none-any.whl

Download URL facebook_mcp_server-0.1.0-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3ecf8863bc8d094bac62dd9f5b3b60aa40778473afa19daddbd17c3b5435b2ad
BLAKE2b-256 checksum
How to use checksums
a87adeedc7f55bacc963f7134541d9920d8f2dde47802286539d6c6cf9f54c12
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.0

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page