Skip to main content

A simple facebook MCP server

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

facebook_mcp_server-0.1.0.tar.gz (13.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

facebook_mcp_server-0.1.0-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file facebook_mcp_server-0.1.0.tar.gz.

File metadata

  • Download URL: facebook_mcp_server-0.1.0.tar.gz
  • Upload date:
  • Size: 13.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.0

File hashes

Hashes for facebook_mcp_server-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1e6ff060242ba20965149918acf57af7fbc3bc96ce84d356f05622c173b23ef8
MD5 710599977e377866d03b35235ccd1c53
BLAKE2b-256 84a9b8f5d0649bdea639772f7c7f88797d6583fe6eab1f6ede22ffbf8d4306de

See more details on using hashes here.

File details

Details for the file facebook_mcp_server-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for facebook_mcp_server-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3ecf8863bc8d094bac62dd9f5b3b60aa40778473afa19daddbd17c3b5435b2ad
MD5 f82bf5fb206e7365a048ad5905c09f99
BLAKE2b-256 a87adeedc7f55bacc963f7134541d9920d8f2dde47802286539d6c6cf9f54c12

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page