was-fb-mcp
Exposes 10 tools to manage Facebook Pages, Posts, Comments, Ad Accounts, Campaigns, Insights, and execute any raw Graph API request from AI coding assistants.
README
Facebook / Meta MCP Server (was-fb-mcp)
Shareable Facebook & Meta Graph API Model Context Protocol (MCP) server. Exposes 10 powerful tools to manage Facebook Pages, Posts, Comments, Ad Accounts, Campaigns, Insights, and execute any raw Graph API request from your favorite AI coding assistant (Claude Desktop, Cursor, Google Antigravity, VS Code, Zed).
Prerequisites
- Node.js 18+
- A Facebook / Meta Account & Meta Developer App
- A Facebook User Access Token or Page Access Token (generated via Meta for Developers Graph API Explorer)
Quick Start — 3 Steps
Step 1 — Get credentials
- Go to Meta for Developers — Graph API Explorer.
- Select your App and click Generate Access Token.
- Grant permissions such as
pages_show_list,pages_read_engagement,pages_manage_posts,ads_read,read_insights.
Step 2 — Connect
Run the interactive setup command in your terminal:
npx -y github:was-member-keramat/was-fb-mcp auth
Paste your Access Token when prompted. Credentials will be securely saved locally to ~/.was-fb-mcp/config.json with restricted file permissions (0600).
Step 3 — Add to your AI Client
Add the following 4 lines to your AI tool's MCP configuration (claude_desktop_config.json, mcp_config.json, etc.):
{
"mcpServers": {
"Facebook MCP": {
"command": "npx",
"args": ["-y", "github:was-member-keramat/was-fb-mcp"]
}
}
}
What you can ask the AI
Here are example prompts you can use with your AI assistant:
- Discovery: "List all Facebook Pages I manage."
- Content Creation: "Publish a new post to my Page with ID
100123456saying 'Hello World!'." - Feed & Comments: "Show the latest 10 posts on my Page feed and list the comments on the top post."
- Interaction: "Reply to comment ID
987654321with 'Thank you for your feedback!'." - Ads Management: "List my Meta Ad Accounts and show active campaigns in
act_123456789." - Analytics: "Get post engagement insights for Page
100123456." - Universal Access: "Use
fb_apito GETv19.0/me/photos."
All Tools (10 Total)
| Category | Tool | Description |
|---|---|---|
| Account | fb_get_me |
Get details of authenticated user / token owner |
| Pages | fb_list_pages |
List Facebook Pages managed by user |
| Feed & Posts | fb_create_post |
Publish a post on a Facebook Page feed |
| Feed & Posts | fb_get_page_feed |
Fetch recent posts from a Page feed |
| Comments | fb_get_post_comments |
Get comments on a Facebook post |
| Comments | fb_reply_comment |
Post a comment or reply to a post/comment |
| Meta Ads | fb_list_ad_accounts |
List accessible Meta Ad accounts |
| Meta Ads | fb_list_campaigns |
List ad campaigns in an Ad Account |
| Analytics | fb_get_insights |
Fetch metrics/insights for Page or Ad Account |
| Universal | fb_api |
Execute raw GET/POST/DELETE Graph API calls |
CLI Commands
# Connect / re-connect credentials
npx -y github:was-member-keramat/was-fb-mcp auth
# Check saved configuration status
npx -y github:was-member-keramat/was-fb-mcp status
# Delete saved credentials
npx -y github:was-member-keramat/was-fb-mcp logout
# View CLI usage help
npx -y github:was-member-keramat/was-fb-mcp help
Multi-Account Setup
You can bypass the local config file by passing environment variables in your AI client config:
{
"mcpServers": {
"Facebook Account A": {
"command": "npx",
"args": ["-y", "github:was-member-keramat/was-fb-mcp"],
"env": {
"FB_ACCESS_TOKEN": "EAAX..."
}
},
"Facebook Account B": {
"command": "npx",
"args": ["-y", "github:was-member-keramat/was-fb-mcp"],
"env": {
"FB_ACCESS_TOKEN": "EAAY..."
}
}
}
}
Troubleshooting
Windows PowerShell Script Execution Error
If you see:
File C:\...\npx.ps1 cannot be loaded because running scripts is disabled
Run in PowerShell:
Set-ExecutionPolicy -Scope CurrentUser -ExecutionPolicy RemoteSigned
Force Update / Clear npx Cache on Windows
If npx is serving cached old versions:
Remove-Item -Recurse -Force "$env:LOCALAPPDATA\npm-cache" -ErrorAction SilentlyContinue
npm cache clean --force
Graph API Error Response
If a tool call returns an error, the MCP decodes Meta Graph API's exact error structure (code, error_subcode, fbtrace_id) so the AI assistant can fix permissions or parameters immediately.
License
MIT © 2026 WAS.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。