# Facebook — how to use (mcp.ai)

Facebook is a social media and advertising platform used by individuals and businesses to connect, share content, and promote products or services. Only supports Facebook Pages, not Facebook Personal accounts.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_facebook?ms=1781541960000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `facebook_add_photos_to_album`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/facebook`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/facebook/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/facebook/add/photos/to/album` — Adds photos to an existing facebook album. note: currently adds one photo at a time. for true batch upload, use facebook's batch api endpoint directly.
  - body: { photos?: object[], album_id: string, published?: boolean, photo_urls?: string[] }
- `POST https://api.mcp.ai/api/facebook/add/reaction` — Adds a specific reaction (like, love, wow, etc.) to a facebook post or comment.
  - body: { type?: string, object_id: string }
- `POST https://api.mcp.ai/api/facebook/assign/page/task` — Assigns tasks/roles to a user for a specific facebook page.
  - body: { user: string, tasks: string[], page_id: string }
- `POST https://api.mcp.ai/api/facebook/create/comment` — Creates a comment on a facebook post or replies to an existing comment.
  - body: { message: string, object_id: string, attachment_id?: string, attachment_url?: string, attachment_share_url?: string }
- `POST https://api.mcp.ai/api/facebook/create/photo/album` — Creates a new photo album on a facebook page.
  - body: { name: string, message?: string, page_id: string, privacy?: object, location?: string }
- `POST https://api.mcp.ai/api/facebook/create/photo/post` — Creates a photo post on a facebook page.
  - body: { url?: string, photo?: object, message?: string, page_id: string, published?: boolean, backdated_time?: integer, scheduled_publish_time?: integer, backdated_time_granularity?: string }
- `POST https://api.mcp.ai/api/facebook/create/post` — Creates a new post on a facebook page.
  - body: { link?: string, message: string, page_id: string, published?: boolean, targeting?: object, scheduled_publish_time?: integer }
- `POST https://api.mcp.ai/api/facebook/create/video/post` — Creates a video post on a facebook page.
  - body: { title?: string, video?: object, page_id: string, file_url?: string, published?: boolean, targeting?: object, description?: string, scheduled_publish_time?: integer }
- `POST https://api.mcp.ai/api/facebook/delete/comment` — Deletes a facebook comment.
  - body: { comment_id: string }
- `POST https://api.mcp.ai/api/facebook/delete/post` — Deletes a facebook page post.
  - body: { post_id: string }
- `POST https://api.mcp.ai/api/facebook/get/comment` — Retrieves details of a specific facebook comment.
  - body: { fields?: string, comment_id: string }
- `POST https://api.mcp.ai/api/facebook/get/comments` — Retrieves comments from a facebook post or comment (for replies).
  - body: { limit?: integer, order?: string, fields?: string, filter?: string, object_id: string }
- `POST https://api.mcp.ai/api/facebook/get/conversation/messages` — Retrieves messages from a specific conversation.
  - body: { limit?: integer, fields?: string, conversation_id: string }
- `POST https://api.mcp.ai/api/facebook/get/message/details` — Retrieves details of a specific message sent or received by the page.
  - body: { fields?: string, message_id: string }
- `POST https://api.mcp.ai/api/facebook/get/page/conversations` — Retrieves a list of conversations between users and the page.
  - body: { limit?: integer, fields?: string, page_id: string }
- `POST https://api.mcp.ai/api/facebook/get/page/details` — Fetches details about a specific facebook page.
  - body: { fields?: string, page_id: string }
- `POST https://api.mcp.ai/api/facebook/get/page/insights` — Retrieves analytics and insights for a facebook page.
  - body: { since?: string, until?: string, period?: string, metrics?: string, page_id: string }
- `POST https://api.mcp.ai/api/facebook/get/page/photos` — Retrieves photos from a facebook page.
  - body: { type?: string, limit?: integer, fields?: string, page_id: string }
- `POST https://api.mcp.ai/api/facebook/get/page/posts` — Retrieves posts from a facebook page.
  - body: { limit?: integer, since?: string, until?: string, fields?: string, page_id: string }
- `POST https://api.mcp.ai/api/facebook/get/page/roles` — Retrieves a list of people and their tasks/roles on a facebook page.
  - body: { page_id: string }
- `POST https://api.mcp.ai/api/facebook/get/page/videos` — Retrieves videos from a facebook page.
  - body: { type?: string, limit?: integer, fields?: string, page_id: string }
- `POST https://api.mcp.ai/api/facebook/get/post` — Retrieves details of a specific facebook post.
  - body: { fields?: string, post_id: string }
- `POST https://api.mcp.ai/api/facebook/get/post/insights` — Retrieves analytics and insights for a specific facebook post.
  - body: { period?: string, metrics?: string, post_id: string }
- `POST https://api.mcp.ai/api/facebook/get/post/reactions` — Retrieves reactions (like, love, wow, etc.) for a facebook post.
  - body: { type?: string, limit?: integer, post_id: string, summary?: boolean }
- `POST https://api.mcp.ai/api/facebook/get/scheduled/posts` — Retrieves scheduled and unpublished posts for a facebook page.
  - body: { limit?: integer, fields?: string, page_id: string }
- `POST https://api.mcp.ai/api/facebook/get/user/pages` — Retrieves a list of pages the user manages, including tasks and access tokens.
  - body: { fields?: string, user_id?: string }
- `POST https://api.mcp.ai/api/facebook/like/post/or/comment` — Likes a facebook post or comment.
  - body: { object_id: string }
- `POST https://api.mcp.ai/api/facebook/mark/message/seen` — Marks a user's message as seen by the page.
  - body: { page_id: string, recipient_id: string }
- `POST https://api.mcp.ai/api/facebook/publish/scheduled/post` — Publishes a previously scheduled or unpublished facebook post immediately.
  - body: { post_id: string }
- `POST https://api.mcp.ai/api/facebook/remove/page/task` — Removes a user's tasks/access from a specific facebook page.
  - body: { user: string, page_id: string }
- `POST https://api.mcp.ai/api/facebook/reschedule/post` — Changes the scheduled publish time of an unpublished facebook post.
  - body: { post_id: string, scheduled_publish_time: integer }
- `POST https://api.mcp.ai/api/facebook/send/media/message` — Sends a media message (image, video, audio, or file) from the page to a user.
  - body: { page_id: string, media_url: string, media_type: string, is_reusable?: boolean, recipient_id: string, messaging_type?: string }
- `POST https://api.mcp.ai/api/facebook/send/message` — Sends a text message from the page to a user via messenger.
  - body: { page_id: string, message_text: string, recipient_id: string, messaging_type?: string }
- `POST https://api.mcp.ai/api/facebook/toggle/typing/indicator` — Shows or hides the typing indicator for a user in messenger.
  - body: { page_id: string, typing_on: boolean, recipient_id: string }
- `POST https://api.mcp.ai/api/facebook/unlike/post/or/comment` — Removes a like from a facebook post or comment.
  - body: { object_id: string }
- `POST https://api.mcp.ai/api/facebook/update/comment` — Updates an existing facebook comment.
  - body: { message: string, is_hidden?: boolean, comment_id: string }
- `POST https://api.mcp.ai/api/facebook/update/page/settings` — Updates settings for a specific facebook page.
  - body: { about?: string, phone?: string, emails?: string[], page_id: string, website?: string, description?: string, general_info?: string }
- `POST https://api.mcp.ai/api/facebook/update/post` — Updates an existing facebook page post.
  - body: { message?: string, post_id: string, og_phrase?: string, og_icon_id?: string, og_object_id?: string, og_action_type_id?: string, og_suggestion_mechanism?: string }
- `POST https://api.mcp.ai/api/facebook/upload/photo` — Uploads a photo file directly to a facebook page. supports local file upload up to 10mb.
  - body: { url?: string, tags?: object[], photo?: object, caption?: string, page_id: string, published?: boolean, targeting?: object, scheduled_publish_time?: integer }
- `POST https://api.mcp.ai/api/facebook/upload/photos/batch` — Uploads multiple photo files in batch to a facebook page or album. uses facebook's batch api for efficient multi-photo upload. maximum 50 photos per batch.
  - body: { photos?: object[], page_id: string, album_id?: string, published?: boolean, photo_urls?: string[] }
- `POST https://api.mcp.ai/api/facebook/upload/video` — Uploads a video file directly to a facebook page. supports local file upload. for large videos (>100mb), uses resumable upload.
  - body: { title?: string, video: object, page_id: string, published?: boolean, targeting?: object, description?: string, content_tags?: string[], custom_labels?: string[], scheduled_publish_time?: integer }

## More
- Page: https://mcp.ai/facebook
- Agent spec (llms.txt): https://mcp.ai/facebook/llms.txt
- Postman collection: https://mcp.ai/facebook/postman.json
