Just Facebook

by livia-zaharia

Not rated
GitHub

About

Automate and manage interactions on a Facebook Page using the Facebook Graph API.

Details

Author
livia-zaharia
Categories
Communication, Other, API

Setup

Install Just Facebook in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/livia-zaharia/just_facebook_mcp

Follow the installation instructions in the repository README, then restart your MCP client.

This project is aModel Context Protocol (MCP)server for automating and managing interactions on aFacebook Pageusing the Facebook Graph API. It provides tools to create posts, moderate comments, fetch post insights, and filter negative feedback — ready to plug into Claude or any other LLM-based agent.

Originally developed from@HagaiHen/facebook-mcp-server, this version is intended for packaging and distribution via PyPI.

This MCP provides a suite of AI-callable tools that connect directly to a Facebook Page, abstracting common API operations as LLM-friendly functions.

- Empowerssocial media managersto automate moderation and analytics.
- Seamlessly integrates withany Agent client.
- Enables fine-grained control over Facebook content from natural language.

This project requiresPython 3.10+anduv(a fast Python package manager).

curl -LsSf https://astral.sh/uv/install.sh | sh
# Install all dependencies and create a virtual environment uv sync # For development (includes testing and linting tools) uv sync --dev

Create a .env file in the root directory and add your Facebook Page credentials:

FACEBOOK_ACCESS_TOKEN=your_facebook_page_access_token FACEBOOK_PAGE_ID=your_page_id

In the app dashboard, go to Customize Use Case and select all options.

First create a User Access Token — make sure to:

Then generate a Page Access Token (this will inherit the permissions).

Save the Page Access Token and use it in the .env file.

Go to your Facebook Page → About → Scroll down to view the ID

⏰ Important: Facebook API Token Limitations

Facebook access tokens have limited lifespansand will expire, causing API calls to fail. Understanding these limitations is crucial for maintaining your MCP server.

- ❌ All MCP tools will returnOAuthExceptionerrors
- ❌ Error message: "Session has expired"
- ❌ Error codes: 190 (expired token) or 463 (session expired)

We provide a script to easily generate long-lived tokens (60 days):

uv run python scripts/refresh_facebook_token.py

- ✅ Guide you through token generation
- ✅ Exchange short-lived for long-lived tokens
- ✅ Update your.envfile automatically
- ✅ Validate the new token

- 🔄Refresh tokens every 50 daysto avoid expiration
- 📅Set calendar remindersfor token renewal
- 🤖Use long-lived Page tokensfor development
- 🏢Consider System User tokensfor production

# Check if your token is expired uv run python -c " from just_facebook_mcp.manager import Manager manager = Manager() try: result = manager.get_page_fan_count() print('✅ Token is working') except Exception as e: print(f'❌ Token error: {e}') "
# Option 1: Using the script entry point (recommended) uv run just_facebook_mcp # Option 2: Run the Python module directly uv run python -m just_facebook_mcp.server # Option 3: Activate virtual environment first source .venv/bin/activate python -m just_facebook_mcp.server

Go to Settings → Developer → Edit Config

You can use the MCP server without local installing with uvx:

Add the following to your MCP configuration:

{ "mcpServers": { "just_facebook_mcp": { "command": "uvx", "args": [ "just_facebook_mcp" ], "env": { "FACEBOOK_ACCESS_TOKEN": "<put_your_FB_token_here>", "FACEBOOK_PAGE_ID": "<put_your_page_id_here>" } } } }

If you already git-cloned the MCP server you can configure it locally.

Add the following to your MCP configuration:

Option 1: Using the package entry point (recommended)

{ "mcpServers": { "just_facebook_mcp": { "command": "uv", "args": [ "run", "--directory", "/absolute/path/to/just_facebook_mcp-server", "just_facebook_mcp" ] } } }
{ "mcpServers": { "just_facebook_mcp": { "command": "uv", "args": [ "run", "--directory", "/absolute/path/to/just_facebook_mcp-server", "python", "-m", "just_facebook_mcp.server" ] } } }
{ "mcpServers": { "just_facebook_mcp": { "command": "just_facebook_mcp" } } }

Replace/absolute/path/to/just_facebook_mcp-serverwith your actual project path.

Your Facebook MCP server is now configured and ready to power Claude Desktop! You can:

Contributions, issues, and feature requests are welcome!

📄 License This project is licensed under the MIT License. See the LICENSE file for details.

An MCP server for Bluesky that provides tools to interact with the ATProtocol.

Integrates with the LinkedIn API, allowing interaction with your professional network and content.

A MCP server for LinkedIn REST API v2 that enables AI assistants to create, list, and delete posts, manage events, upload images, comment, and react—featuring OAuth 2.0 with session persistence, local post history tracking, and multiple automated tests

Schedule and queue text, image, and video posts to many social networks, including LinkedIn, X, Bluesky, Instagram, Facebook, Threads, Tiktok.

Enables seamless integration with communication platform that allows you to reach your customers globally across any channel.

Interact with any other SaaS applications on behalf of your customers.

Official MCP Server to interact with Pearl API. Connect your AI Agents with 12,000+ certified experts instantly.

Platfone - Receive SMS & Virtual Numbers MCP

Virtual phone number platform for AI agents — rent numbers across 200+ countries, receive SMS, and manage the full activation lifecycle

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.