facebook-lyr
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| FACEBOOK_COOKIES | No | JSON object with at least c_user and xs, used for headless authentication instead of interactive browser cookie login. |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| logging | {} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| extensions | {
"io.modelcontextprotocol/ui": {}
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| get_meA | Get the identity of the authenticated Facebook user. Resolved from the imported browser-cookie session (c_user / xs). Useful to confirm whose session is configured and whether it is still valid. Returns: Dict with the user's id, name, and username. |
| get_account_statusA | Check the current cookie-session status and active Page. Returns: Dict with valid (bool), cookie_source, me (id/name), and active_page_id / active_page_name. |
| set_active_pageA | Persist the active Facebook Page for display/context purposes. Note: cookie scraping operates as the account whose cookies are imported (c_user). This tool records a Page for agent bookkeeping and for Page-mode sessions (m_page_voice cookie present). It does not switch the acting identity on its own. |
| list_accountsA | List all stored Facebook identities (cookie sets). Each stored identity has its own cookies (c_user/xs); the active one
is what every tool acts as. Use Returns: Dict with accounts (id, name, username, identity_type, is_active, last_used), total_accounts, and active_account. |
| list_switchable_accountsA | Discover every identity the logged-in session can switch to. Reads Facebook's account switcher — the Pages you administer, linked profiles, and the user profile itself. This is the discovery source an agent uses to learn which identities exist for this session. Returns: Dict with accounts (id, name, typename, is_current) and total. |
| add_accountA | Store a new Facebook identity's cookie set for agent use. The cookies dict must contain at least |
| remove_accountA | Remove a stored Facebook identity's cookie set. |
| switch_active_accountA | Switch which stored identity all tools act as. Subsequent tool calls load the selected identity's cookie set, so reads and writes happen as that identity. |
| get_active_account_infoA | Get information about the currently active Facebook identity. Returns: Active account metadata or a message when none is set. |
| update_account_cookiesA | Update cookies for an existing stored Facebook identity. Useful for refreshing an expired session without re-adding the account. |
| import_account_from_browserA | Import a Facebook identity's cookies directly from a browser. Uses the native cookie import machinery (the same as |
| get_account_posting_statusB | Check a stored identity's posting limits and history. |
| get_page_infoA | Get Facebook Page/profile details by username. Fetches the public (or logged-in) profile page and parses name, id, bio, and follower counts from the embedded page data. |
| get_page_postsA | Get recent posts from a Facebook Page's timeline. |
| search_pagesA | Search for public Facebook Pages by name. |
| get_user_postsA | Get recent posts from a user's or Page's timeline. |
| get_post_detailsA | Get details for a single post by its URL. |
| search_postsA | Search public posts by keyword. |
| create_postA | Publish a text post as the active (or specified) Facebook identity. Validates the text, checks the identity's posting limits, and publishes through the web composer. If Facebook has decommissioned cookie-based writing for the account, returns a clear error rather than a false success. |
| create_photo_postA | Upload a photo and publish it as the active (or specified) identity. The image is validated and normalized (resized to Facebook's feed spec) before the upload attempt. Best-effort: modern Facebook may reject cookie-based uploads; failures surface as clear errors. |
| create_video_postA | Upload a video and publish it as the active (or specified) identity. The video file is validated before the upload attempt. Best-effort: modern Facebook has largely decommissioned cookie-based video uploads; failures surface as clear, honest errors. |
| create_carousel_postA | Upload multiple photos and publish them as one carousel post. Each image is validated and normalized before the upload attempt. Best-effort: modern Facebook may reject cookie-based carousels; failures surface as clear, honest errors. |
| delete_postA | Delete one of the active (or specified) identity's own posts. Checks the identity's posting limits, records the attempt, and deletes
through the |
| save_postA | Save/bookmark a post to the active (or specified) identity's Saved. Best-effort: the legacy save endpoint submits the mutation but cannot always confirm it synchronously — the result tells you to verify in the Saved collection. |
| unsave_postA | Remove a post from the active (or specified) identity's Saved. Best-effort: the legacy save endpoint submits the mutation but cannot always confirm it synchronously — the result tells you to verify in the Saved collection. |
| get_post_commentsC | Fetch comments on a post. |
| comment_on_postA | Comment on a post as the active (or specified) Facebook identity. Validates the text, checks the identity's posting limits, records the attempt, and comments through the web composer. Fails honestly if cookie-based commenting is decommissioned for the account. |
| search_peopleA | Search for people by name. Useful to find a person before messaging them (pair with get_conversations / send_message). |
| get_conversationsA | List Messenger conversations for the authenticated account. |
| get_conversation_messagesA | Read messages from a Messenger conversation. |
| send_messageA | Send a Messenger text message as the active (or specified) identity. Validates the text, checks the identity's posting limits, records the attempt, and sends via the legacy Mercury endpoint. Fails honestly if sending is decommissioned for the account. |
| delete_messageA | Delete (unsend) a Messenger message as the active (or specified) identity. Validates the ids, checks the identity's posting limits, records the attempt, and deletes via the legacy Mercury endpoint. Fails honestly if deletion is decommissioned for the account. |
| mark_conversation_seenA | Mark a Messenger conversation as seen (clears the unread badge). |
| send_typing_indicatorB | Send a typing indicator to a conversation (typing_on / typing_off). |
| get_groupA | Get Facebook group details. |
| get_group_postsA | Get recent posts from a group feed. |
| get_group_membersA | List members of a Facebook group. Best-effort: served from the legacy browser-list endpoint, which may return an error for private groups or migrated surfaces — the result then explains the limitation honestly. |
| search_groupsB | Search for Facebook groups by name. |
| get_notificationsA | List the authenticated identity's recent Facebook notifications. Includes message alerts, tags, follows, and page activity. Useful for an agent to know what needs attention before deciding to act. |
| get_eventsA | List upcoming events relevant to the authenticated identity. Returns embedded event rows (id, name, start_date_time, url) from the events hub. Event details that load client-side are not available via cookie scraping. |
| close_sessionA | Close all active API clients and clean up resources. |
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/ishan-parihar/facebook-lyr'
If you have feedback or need assistance with the MCP directory API, please join our Discord server