loading…
Search for a command to run...
loading…
Enables AI agents to manage Facebook profiles, pages, posts, and engagement via the Graph API with OAuth authentication.
Enables AI agents to manage Facebook profiles, pages, posts, and engagement via the Graph API with OAuth authentication.
A comprehensive Model Context Protocol (MCP) server for managing Facebook features, including Profiles, Pages, Posts, and Engagement. This server integrates with the Facebook Graph API and provides a seamless way for AI agents (like Claude Desktop) to interact with Facebook.
Before running the server, you need to create a Facebook App on the Meta for Developers portal.
http://localhost:3000/auth/facebook/callback.npm install
.env.example to .env and fill in your credentials:cp .env.example .env
Edit .env:FACEBOOK_APP_ID=your_actual_app_id
FACEBOOK_APP_SECRET=your_actual_app_secret
PORT=3000
REDIRECT_URI=http://localhost:3000/auth/facebook/callback
npm run build
npm start
.env file is filled out.docker-compose up --build
This will build the image and start the server, exposing the port specified in your .env file (default 3000) for the authentication callback.Add the server to your Claude Desktop configuration file (usually located at %APPDATA%\Claude\claude_desktop_config.json on Windows or ~/Library/Application Support/Claude/claude_desktop_config.json on macOS).
{
"mcpServers": {
"facebook": {
"command": "node",
"args": ["f:/MCP_Server/Facebook_MCP_server/dist/index.js"],
"env": {
"FACEBOOK_APP_ID": "your_app_id",
"FACEBOOK_APP_SECRET": "your_app_secret",
"REDIRECT_URI": "http://localhost:3000/auth/facebook/callback",
"PORT": "3000"
}
}
}
}
(Adjust the path to index.js as necessary)
If running via Docker, the server reads the .env file from the directory. You can use the docker command in Claude config if you have Claude configured to run docker commands, or simply run the container in the background and connect via network if supported (though stdio is the standard for Claude Desktop).
Once the server is connected to Claude Desktop:
fb_authenticate tool..fb_token.json file.fb_authenticate: Returns the URL to start the OAuth login process.fb_get_profile: Get profile details (ID, Name, etc.). Can accept userId and fields.fb_get_pages: List Facebook Pages managed by the authenticated user.fb_get_page_insights: Get metrics (like impressions) for a specific page.fb_publish_post: Publish a message or link to a feed/page.fb_delete_object: Delete a post or comment by ID.fb_get_feed: Get posts from a feed.fb_get_comments: Get comments on an object.fb_reply_comment: Post a reply to a comment.ISC
Выполни в терминале:
claude mcp add facebook-mcp-server -- npx