Summary
Let your AI run a Facebook Page: read posts, comments and Page and post insights, publish, schedule and edit posts and photo posts, reply to, hide or delete comments, and read and answer Messenger conversations. Everything that publishes or sends asks for your confirmation first.
Guided setup
Connect Facebook Pages to Microsoft Copilot in 2 minutes
Start a free trial on AnythingMCP Cloud, connect Facebook Pages in the guided setup, then add your MCP URL to Microsoft Copilot. No code and no server to run.
No credit card · 7-day trial · Self-host alternative available
Try asking
Example prompts for Facebook Pages
Click any prompt to copy it. Paste into Claude, ChatGPT, Cursor, Gemini, Copilot or OpenClaw to run it against this connector.
Claude is AI and can make mistakes. Please double-check responses.
💡 No install? Use cloud.anythingmcp.com directly. Sign in, click Connectors → Facebook Pages, paste your credentials, mint an MCP API key and you're done. No Docker, no
git clone, no local server.
Facebook Pages + Microsoft Copilot
Let your AI run a Facebook Page: read posts, comments and Page and post insights, publish, schedule and edit posts and photo posts, reply to, hide or delete comments, and read and answer Messenger conversations. Everything that publishes or sends asks for your confirmation first.
Prerequisites
See the full setup instructions baked into the connector (visible in the in-app store when you select the connector). The required environment variables for this connector are:
FACEBOOK_PAGE_ACCESS_TOKEN, FACEBOOK_PAGE_ID
Step 1 — Get credentials
- Create an app at
https://developers.facebook.com/apps/creation/with the use case Manage everything on your Page and add the permissionspages_show_list,pages_read_engagement,pages_read_user_content,pages_manage_posts,pages_manage_engagementandread_insights. For Messenger, also add the use case Engage with customers on Messenger from Meta, which bringspages_manage_metadataandpages_messaging. While you manage the Page yourself and have a role on the app, no App Review is needed. - Open the Graph API Explorer at
https://developers.facebook.com/tools/explorer/, pick the app, click Generate Access Token with those permissions and select your Page when Facebook asks. - Paste that user token into the Access Token Debugger at
https://developers.facebook.com/tools/debug/accesstoken/and click Extend Access Token. You get a long-lived user token (about 60 days). - Back in the Explorer, with the long-lived token, run
GET me/accounts?fields=id,name,access_token. Copy theaccess_tokennext to your Page intoFACEBOOK_PAGE_ACCESS_TOKEN(without the word Bearer) and itsidintoFACEBOOK_PAGE_ID. This Page token has no expiry date: the Debugger shows it as type Page, expires Never. - Install the connector and run
facebook_pages_get_pageto check the setup.
Why a Page token: only a Page access token can act as the Page. A user token cannot post, comment or message as the Page, and a Page token copied straight from the Explorer expires within hours. A Page token stops working when its creator loses their role on the Page, changes their password or removes the app.
Confirm first: publishing, scheduling, editing, commenting, replying and messaging are visible to the public or to a customer at once, so the AI shows you exactly what it will post or send and waits for your yes. facebook_pages_delete_post and facebook_pages_delete_comment are switched off at install; facebook_pages_hide_comment is the gentler option.
Messenger: a Page can only message people who wrote first. Replies are allowed within 24 hours of the person's last message; after that, only a person answering by hand within 7 days, with the Human Agent permission from App Review. Without App Review, messaging only reaches people who have a role on the app; to message customers, request Advanced Access for pages_messaging.
Insights: they need read_insights and at least 100 Page likes, refresh about once a day and cover at most 90 days per request.
Common errors: 190 means the token expired or was revoked, so create a new Page token. 10, 200 or 283 mean a missing permission; code 3 means a user token was pasted instead of the Page token. 1545041 or 10 on a send means the Messenger window is closed. 4, 17, 32, 613, 80001 and 80006 are rate limits: wait a few minutes.
The connector works with one Page and does not cover ads.
Step 2 — Install the adapter
curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d
Step 3 — Add the connector in Microsoft Copilot
Your server URL: in AnythingMCP, open MCP Servers → the server this connector is on, and copy its URL (
https://cloud.anythingmcp.com/mcp/…). Use it wherever this guide showsYOUR_SERVER_ID.
Microsoft Copilot uses MCP servers through agents built in Copilot Studio: you add AnythingMCP to an agent as a tool, then publish the agent to Microsoft 365 Copilot and Teams. Copilot Studio connects from Microsoft's cloud over Streamable HTTP, which AnythingMCP supports.
- In Copilot Studio, open your agent (or create one), go to Tools and choose Add a tool → New tool → Model Context Protocol.
- Enter a Server name (for example
AnythingMCP), a Server description that says what the connector does, and the Server URLhttps://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID. Copilot Studio uses the description to decide when to call the server. - Under authentication, choose API key, set Type to Header and the header name to
X-API-Key, then select Create. - In Add tool, choose Create a new connection, paste an MCP API key from AnythingMCP (MCP Servers → your server → API keys) and select Add to agent.
- Try it in the agent's Test pane: ask for something that needs the
Facebook Pagestools. - Select Publish, then Channels → Microsoft 365 and Microsoft Teams, keep Make agent available in Microsoft Copilot selected and choose Add channel. See agent in Teams installs it for you; in Microsoft 365 Copilot, type @ and pick the agent.
Prefer per-user sign-in? Choose OAuth 2.0 → Dynamic discovery instead of an API key: each user then signs in to AnythingMCP the first time the agent calls it.
Self-hosting? Use your instance's public HTTPS address instead of https://cloud.anythingmcp.com. Copilot Studio connects from Microsoft's cloud, so localhost does not work.
Available tools
| Tool | What it does |
|---|---|
facebook_pages_get_page | Get the configured Facebook Page: name, username, link, category, about text, website, contact details, likes (fan_count) and… |
facebook_pages_list_posts | List the Page's own posts, newest first, with text, time, permalink, type, picture, shares and the number of comments and reactions |
facebook_pages_list_feed | List everything on the Page's feed, newest first: the Page's own posts including unpublished ones (is_published false) and posts by… |
facebook_pages_list_scheduled_posts | List the Page's scheduled posts that have not gone live yet, with text, link and scheduled_publish_time (Unix seconds) |
facebook_pages_get_post | Get one Page post by id: text, time, permalink, type, author, attachments, whether it is published or hidden, its scheduled time, shares… |
facebook_pages_create_post | Publish a text or link post on the Page right away, as the Page |
facebook_pages_schedule_post | Schedule a text or link post to go live on the Page at a set time, between 10 minutes and 30 days ahead |
facebook_pages_create_photo_post | Post a photo from a public image URL on the Page, with an optional caption; set published false with scheduled_publish_time to schedule it |
facebook_pages_update_post | Change a Page post: replace its text, publish a scheduled or unpublished post now (is_published true), or move a scheduled post to another… |
facebook_pages_delete_post | Delete a Page post permanently, including its comments and reactions |
facebook_pages_list_comments | List the comments on a post, or the replies to a comment when you pass a comment id, with text, author, time, likes, reply count and… |
facebook_pages_comment_on_post | Write a public comment on a post as the Page, optionally with an image from a URL |
facebook_pages_reply_to_comment | Reply publicly to a comment as the Page, in the comment's thread |
facebook_pages_hide_comment | Hide or unhide a comment on the Page's posts |
facebook_pages_delete_comment | Delete a comment on the Page's posts permanently, with its replies |
facebook_pages_get_page_insights | Get Page insights per day, week or 28 days: views of the Page's content (page_media_view), unique viewers, post engagements, followers, new… |
facebook_pages_get_post_insights | Get lifetime insights for one Page post: how often it was displayed (post_media_view), unique viewers, clicks, reactions by type and, for… |
facebook_pages_list_conversations | List the Page's Messenger conversations, most recently active first, with the participants (name and Page-scoped id) and the last update… |
facebook_pages_list_messages | List the messages of one Messenger conversation, newest first, with text, sender, recipient and time |
facebook_pages_send_message | Send a Messenger text message as the Page to a person who has written to the Page |
facebook_pages_send_private_reply | Answer a comment privately: sends one Messenger message as the Page to the person who wrote the comment, with a link to it |
Example prompts
- "Summarize how our last 10 posts performed: views, clicks and reactions, and tell me which one did best."
- "Show me the comments on our latest post that have no reply from us yet, and draft answers for me to approve before you post them."
- "Which Messenger conversations got a message from a customer in the last 24 hours? Draft a reply to each and show them to me before sending."
- "Schedule a post for next Monday at 9:00 announcing our new opening hours, and show me the text and time before you schedule it."
FAQ
Which Copilot is this for? Microsoft 365 Copilot at work, through agents built in Copilot Studio. The Microsoft Copilot app for personal accounts has no option to add your own MCP server.
What do I need? A work account with access to Copilot Studio (a license or a trial) to build the agent. People who use it in Microsoft 365 Copilot or Teams need access to the agent: share it with them, or ask an admin to publish it to the organization. If your organization applies data policies to Power Platform connectors, they cover MCP servers too.
The agent doesn't call the tools. Check that the header name is exactly X-API-Key and that the key belongs to the same MCP server as the URL, and make the server description specific: Copilot Studio uses it to decide when to call the server. Publish the agent again after each change; in an open chat, type "start over" to get the new version.
Next steps
- Connector landing page
- Connect to Claude
- Connect to ChatGPT
- Connect to Cursor
- Connect to Gemini
- Connect to Meta Muse
Was this guide helpful?