- Home
- MCP servers
- Just Facebook
Just Facebook
- python
1
GitHub Stars
python
Language
5 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"livia-zaharia-just_facebook_mcp": {
"command": "uv",
"args": [
"run",
"just_facebook_mcp"
],
"env": {
"FACEBOOK_PAGE_ID": "YOUR_PAGE_ID",
"FACEBOOK_ACCESS_TOKEN": "YOUR_FB_TOKEN"
}
}
}
}This MCP Server lets you automate and manage a Facebook Page through AI-driven commands. It exposes a set of callable tools that perform posting, moderation, analytics retrieval, and more, all accessible from any MCP-compatible agent or Claude-like workspace.
How to use
You connect an MCP client to this server and invoke its tools as natural-language actions. Each tool maps to a Facebook Page operation, such as creating posts, replying to comments, fetching post insights, or filtering negative feedback. You can combine multiple actions in a workflow, letting the agent decide which tool to call based on your goals (for example, post a message, then check engagement metrics, then moderate comments). The tools are designed to be straightforward to call from your agent’s prompts and handle common Facebook Page tasks with minimal setup.
How to install
Prerequisites you need before installation are Python 3.10 or newer and a helper runtime for running MCP servers.
curl -LsSf https://astral.sh/uv/install.sh | sh
# Install dependencies and set up a virtual environment using the package manager
uv sync
# For development (testing and linting included)
uv sync --dev
Run the MCP server
Choose one of the standard start methods below. The server runs in the background and exposes its MCP endpoints to your agent client.
Option 1: Start with the primary MCP entry point (recommended) using the runtime runner.
uv run just_facebook_mcp
Option 2: Run the Python module directly via the MCP server entry point.
uv run python -m just_facebook_mcp.server
Option 3: If you prefer using a virtual environment, activate it first and run the Python module.
source .venv/bin/activate
python -m just_facebook_mcp.server
Environment variables you need
Create a .env file in the project root with your Facebook credentials.
FACEBOOK_ACCESS_TOKEN=your_facebook_page_access_token
FACEBOOK_PAGE_ID=your_page_id
Usage with Claude Desktop
To integrate with Claude Desktop, configure the MCP connection in Claude’s Developer settings and use the standard MCP URL/command flow for local or hosted servers.
Development notes
For development workflows, you can run tests, format code, and type-check as you build out the server.
uv run pytest
uv run black .
uv run mypy .
Token management and troubleshooting
Facebook access tokens have limited lifespans. If a token expires, MCP calls will fail with OAuth errors. You can refresh tokens using a guided script that updates your .env file and validates the new token.
uv run python scripts/refresh_facebook_token.py
What you can do with the tools
This server provides a rich set of AI-callable tools that map directly to Facebook Page operations. You can post content, moderate comments, fetch engagement metrics, filter sentiment, schedule posts, and more. Each tool is designed to be called from an agent that supports MCP-style function calls.
Available tools
post_to_facebook
Create a new Facebook post with a message. Call this to publish updates, announcements, or media captions to your Page.
reply_to_comment
Reply to a specific comment on a post. Useful for moderating discussions and automating engagement.
get_page_posts
Retrieve recent posts from the Page to review, archive, or analyze content.
get_post_comments
Fetch comments on a given post to monitor conversations and sentiment.
delete_post
Delete a specific post by its ID to remove outdated or inappropriate content.
delete_comment
Delete a specific comment by its ID to remove negative or spammy feedback.
delete_comment_from_post
Alias for deleting a comment from a specific post.
filter_negative_comments
Filter out comments containing predefined negative sentiment keywords to streamline moderation.
get_number_of_comments
Count the number of comments on a post for quick engagement metrics.
get_number_of_likes
Count the number of likes on a post to measure popularity.
get_post_impressions
Get total impressions for a post to gauge reach.
get_post_impressions_unique
Get the number of unique users who saw the post.
get_post_impressions_paid
Get the number of paid impressions on a post.
get_post_impressions_organic
Get the number of organic impressions on the post.
get_post_engaged_users
Get the number of users who engaged with the post.
get_post_clicks
Get the number of clicks on the post.
get_post_reactions_like_total
Get the total number of 'Like' reactions on the post.
get_post_top_commenters
Identify top commenters on a post based on engagement.
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 from the Page.
update_post
Update an existing post’s message content.
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.