facebook-web-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| FB_MCP_HEADLESS | No | Whether to run Chrome in headless mode. Keep false to handle challenges manually. | false |
| FB_MCP_MAX_GAP_MS | No | Maximum delay between navigations, in milliseconds. | 4000 |
| FB_MCP_MAX_WRITES | No | Maximum number of confirmed write actions per process. | 3 |
| FB_MCP_MIN_GAP_MS | No | Minimum delay between navigations, in milliseconds. | 1500 |
| FB_MCP_PROFILE_DIR | No | Directory where the logged-in Chrome profile is stored. | .fb-profile |
| FB_MCP_APPROVAL_TTL_MS | No | How long a confirmation token stays valid, in milliseconds. | 600000 |
| FB_MCP_ALLOW_UNCONFIRMED | No | Set to '1' to allow unconfirmed actions (not recommended). Leave unset otherwise. | false |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| check_facebook_sessionA | Report whether the persistent browser profile is logged into Facebook. Launches the browser on first use. Never logs in, and never answers a security challenge — if one is present it says so and leaves the window open for the user to handle. Run this before anything else in a session. |
| open_facebook_loginA | Launch the browser, bring the window to the front on Facebook, and wait for the user to log in by hand. Types nothing and submits nothing — it only watches for the session to go live so it can confirm the profile was saved. Safe to call when already logged in: it reports that immediately without disturbing the page. If the user needs longer than wait_seconds (a 2FA code, a checkpoint), the call returns and you simply call it again or run check_facebook_session — the window stays open and their progress is not lost. |
| selector_healthcheckA | Report which Facebook DOM strategies have been matching, and which have fallen back to a lower-tier candidate or missed entirely. A degraded strategy is the early warning that Facebook changed its markup — it means extraction still works but is running on a more brittle fallback. |
| search_facebookA | Search Facebook and return structured results. |
| search_groupsA | Find Facebook Groups matching a query. Returns each group's name, URL, privacy setting, member count and, where visible, whether this account is already a member. Read-only — it never sends a join request. |
| search_pagesA | Find Facebook Pages matching a query. Returns name, URL, category, follower label and verification badge. Read-only. |
| open_groupA | Open a group and read its visible posts, newest first by default. Returns the group's metadata plus each post with its URL, author, text and timestamp. Read-only — it will not join the group. Private groups you are not a member of will return group metadata and no posts, which is reported explicitly rather than as an error. |
| search_in_groupA | Use Facebook's own in-group search to find posts matching a query inside one group. Much cheaper than scrolling the whole feed when you already know the keyword. Read-only. |
| open_pageA | Open a Facebook Page and read its visible posts. Returns Page metadata plus posts. Read-only — it will not follow or like the Page. |
| open_postA | Open a single post by URL and return its full content: author, text (expanded), timestamp, engagement counts, group or Page attribution, and any external link. Read-only. |
| read_postB | Identical to open_post: fetch one post by URL and return its full content. Read-only. |
| read_commentsA | Read the comment thread on a post. Attempts to switch the thread out of Facebook's "Most relevant" ordering into "All comments" and says in the result whether that succeeded — so you know whether you are seeing the whole thread or a filtered selection. Read-only. |
| get_post_detailsA | Everything about one post in a single call: the post itself plus a sample of its comments. Use this when deciding whether a post is worth replying to. Read-only. |
| browse_feedA | Read the logged-in account's own Facebook feed. |
| find_relevant_postsA | Omit group_urls to sweep the combined feed of every group you have joined — the fastest way to see what is actually being asked across all of them, and which groups are producing nothing. Point this at groups where CLIENTS post ("I need a website for my business", "I need a web developer") rather than developer or freelancer groups. Measured 2026-08-01: a 24K-member WordPress developer group returned zero leads from 12 posts, and correctly so — every post was someone selling. Demand-side groups are where the requests are. Scan one or more Facebook Groups and return the posts most likely to be genuine requests for help with the services you offer, ranked with a plain-English reason for each score. A post must both mention a relevant topic AND read as asking for help to score well; self-promotion and already-resolved threads are scored down hard. Read-only — it finds leads, it does not contact anyone. |
| draft_commentA | Open a post and return everything needed to write a genuinely useful reply to it: the full post text, its context, and the existing comments so you do not repeat advice someone has already given. Returns a brief for YOU to write the comment from — it does not generate text, and it does not post anything. |
| post_commentA | Stage a comment on a Facebook post. This does NOT post anything: it opens the post, builds a preview showing the post and your exact comment text, and returns a confirmation_token. Show the preview to the user and call confirm_action only after they explicitly approve it. |
| create_postA | Stage a new post on your own timeline, optionally with one local image or video. This does NOT publish anything: it validates any attachment, builds a preview of the exact text, and returns a confirmation_token. Show the preview to the user and call confirm_action only after explicit approval. |
| react_to_postA | Stage a reaction on a post. Does NOT react yet — returns a preview and a confirmation_token. Reactions are public and attributed to you, so they go through the same approval step as comments. |
| share_postA | Stage a share of a post to your own timeline, optionally with a message. Does NOT share yet — returns a preview and a confirmation_token. |
| confirm_actionA | Execute a previously staged write action. This is the ONLY tool in this server that changes anything on Facebook. Call it only after the user has seen the preview and explicitly approved that exact content. Tokens are single-use and expire. The result reports whether the action was verified on Facebook afterwards — a status of "unverified" means it may or may not have gone through, and must not be reported to the user as success. |
| list_pending_actionsA | Show write actions that are staged and waiting for confirmation, with their previews and expiry times. Read-only. |
| cancel_actionA | Discard a staged write action so its token can never be used. Use this when the user rejects or changes a draft. |
| debug_page_structureA | Report what is actually rendered on the page the browser is currently showing: how many elements match each probe selector, plus their tag, attribute names, text length and a short text preview. Use this to repair src/facebook/selectors.ts against real markup after a Facebook redesign, instead of guessing. Read-only, and it does not navigate — point the browser somewhere with a read tool first. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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/Mrshahidali420/facebook-web-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server