Facebook MCP server for automating posts, comment moderation, insights, and sentiment filtering.
Python
feat: add bulk_unhide_comments, get_comment_replies, get_post_permalink, get_scheduled_posts, get_page_info
hagai_hen1e1cab997f3e
diff --git a/README.md b/README.mdindex bd3f806..30d6f18 100644--- a/README.md+++ b/README.md@@ -53,7 +53,12 @@ This MCP provides a suite of AI-callable tools that connect directly to a Facebo| `get_post_share_count` | Get the number of shares on a post. || `get_post_reactions_breakdown` | Get all reaction counts for a post in one call. || `bulk_delete_comments` | Delete multiple comments by ID. |-| `bulk_hide_comments` | Hide multiple comments by ID. |+| `bulk_hide_comments` | Hide multiple comments by ID. |+| `bulk_unhide_comments` | Unhide multiple comments by ID. |+| `get_comment_replies` | Get all replies to a specific comment. |+| `get_post_permalink` | Get the permalink URL of a post. |+| `get_scheduled_posts` | List all scheduled (unpublished) posts on the Page. |+| `get_page_info` | Get extended Page details (name, about, category, website). |---diff --git a/facebook_api.py b/facebook_api.pyindex 3e86002..cbf79ea 100644--- a/facebook_api.py+++ b/facebook_api.py@@ -77,3 +77,17 @@ class FacebookAPI:def get_post_share_count(self, post_id: str) -> int:data = self._request("GET", f"{post_id}", {"fields": "shares"})return data.get("shares", {}).get("count", 0)++ def get_comment_replies(self, comment_id: str) -> dict[str, Any]:+ return self._request("GET", f"{comment_id}/comments", {"fields": "id,message,from,created_time"})++ def get_post_permalink(self, post_id: str) -> str:+ data = self._request("GET", f"{post_id}", {"fields": "permalink_url"})+ return data.get("permalink_url", "")++ def get_scheduled_posts(self) -> dict[str, Any]:+ return self._request("GET", f"{PAGE_ID}/scheduled_posts", {"fields": "id,message,scheduled_publish_time"})++ def get_page_info(self) -> dict[str, Any]:+ fields = "name,about,category,website,emails,phone,description,location"+ return self._request("GET", f"{PAGE_ID}", {"fields": fields})diff --git a/manager.py b/manager.pyindex 90898df..7b4e474 100644--- a/manager.py+++ b/manager.py@@ -148,3 +148,22 @@ class Manager:res = self.api.hide_comment(cid)results.append({"comment_id": cid, "result": res})return results++ def bulk_unhide_comments(self, comment_ids: list[str]) -> list[dict[str, Any]]:+ results = []+ for cid in comment_ids:+ res = self.api.unhide_comment(cid)+ results.append({"comment_id": cid, "result": res})+ return results++ def get_comment_replies(self, comment_id: str) -> dict[str, Any]:+ return self.api.get_comment_replies(comment_id)++ def get_post_permalink(self, post_id: str) -> str:+ return self.api.get_post_permalink(post_id)++ def get_scheduled_posts(self) -> dict[str, Any]:+ return self.api.get_scheduled_posts()++ def get_page_info(self) -> dict[str, Any]:+ return self.api.get_page_info()diff --git a/server.py b/server.pyindex 6b749e3..e9b855a 100644--- a/server.py+++ b/server.py@@ -274,3 +274,48 @@ def bulk_hide_comments(comment_ids: list[str]) -> list[dict[str, Any]]:"""Hide multiple comments by ID."""return manager.bulk_hide_comments(comment_ids)++def bulk_unhide_comments(comment_ids: list[str]) -> list[dict[str, Any]]:+ """Unhide multiple comments by ID.+ Input: comment_ids (list[str])+ Output: list of dicts with comment_id and result+ """+ return manager.bulk_unhide_comments(comment_ids)+++def get_comment_replies(comment_id: str) -> dict[str, Any]:+ """Get all replies to a specific comment.+ Input: comment_id (str)+ Output: dict with reply objects+ """+ return manager.get_comment_replies(comment_id)+++def get_post_permalink(post_id: str) -> str:+ """Get the permalink URL of a post.+ Input: post_id (str)+ Output: permalink URL string+ """+ return manager.get_post_permalink(post_id)+++def get_scheduled_posts() -> dict[str, Any]:+ """List all scheduled (unpublished) posts on the Page.+ Input: None+ Output: dict with scheduled post objects including id, message, and scheduled_publish_time+ """+ return manager.get_scheduled_posts()+++def get_page_info() -> dict[str, Any]:+ """Get extended information about the Facebook Page.+ Input: None+ Output: dict with name, about, category, website, emails, phone, description, and location+ """+ return manager.get_page_info()+