mcp-facebook
Allows managing Facebook Pages: create, schedule, and delete posts; read and reply to comments; hide/unhide comments; and retrieve page analytics (views, fans, engagement).
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-facebookcreate a post with text 'Hello World'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
@m8lab/mcp-facebook
MCP server for Facebook Pages — create posts, manage comments, and get insights via Claude Code/Desktop. Uses the Facebook Graph API v25.0 directly with no Facebook SDK dependency.
Requirements
Node.js >= 18.0.0
Facebook Page Access Token with the required permissions (see Setup)
Related MCP server: io.github.anthonyjbolo/mcp-fb-publisher
Install
Claude Code
Add to your project's .mcp.json:
{
"mcpServers": {
"facebook": {
"command": "npx",
"args": ["-y", "@m8lab/mcp-facebook"],
"env": {
"FACEBOOK_PAGE_ID": "your_page_id",
"FACEBOOK_PAGE_ACCESS_TOKEN": "your_page_access_token"
}
}
}
}Claude Desktop
Add to ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"facebook": {
"command": "npx",
"args": ["-y", "@m8lab/mcp-facebook"],
"env": {
"FACEBOOK_PAGE_ID": "your_page_id",
"FACEBOOK_PAGE_ACCESS_TOKEN": "your_page_access_token"
}
}
}
}Available Tools
Tool | Description |
| Publish an immediate post (text, link, picture) |
| Schedule a post 10 min–6 months in the future |
| Permanently delete a post by ID |
| List recent Page feed posts (up to 100) |
| List comments on a specific post (up to 100) |
| Reply to an existing comment |
| Hide or unhide a comment |
| Retrieve Page-level analytics (views, fans, engagement) |
Environment Variables
Variable | Description |
| Numeric ID of your Facebook Page (e.g. |
| Long-lived Page Access Token with the required permissions |
How to Get Your Page Access Token
Go to Meta for Developers and create or open an App.
Under Use Cases, add Pages and request the following permissions:
pages_manage_posts— create, schedule, delete postspages_read_engagement— read posts and commentspages_manage_engagement— reply to and hide commentspages_read_user_content— read commentsread_insights— access Page analytics
In the Graph API Explorer:
Select your App and your Page under User or Page.
Click Generate Access Token and approve all required permissions.
Use the token expander in Access Token Debugger to convert it to a long-lived token (~60 days) or generate a never-expiring System User token via Business Manager.
Your Page ID is the number in your Page's About section or visible in the Graph API Explorer dropdown.
App Review Note: For a live app serving users other than yourself and your test users, Facebook requires App Review for
pages_manage_postsand related permissions. During development you can use the token for your own pages without review.
Development
# Clone the repo
git clone https://github.com/lmtNoLimit/mcp-facebook.git
cd mcp-facebook
# Install dependencies
npm install
# Type check
npm run typecheck
# Build
npm run build
# Watch mode
npm run devCopy .env.example to .env and fill in your credentials to run locally:
cp .env.example .env
# Edit .env with your FACEBOOK_PAGE_ID and FACEBOOK_PAGE_ACCESS_TOKEN
node dist/index.jsLicense
MIT — see LICENSE
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/lmtNoLimit/mcp-facebook'
If you have feedback or need assistance with the MCP directory API, please join our Discord server