---
title: "Facebook MCP Server for Claude, ChatGPT, Cursor | Scrape.ly"
description: "A Facebook MCP server for Claude, ChatGPT and Cursor: public pages, posts, reactions and Meta ads, no login or Page token. Setup, real runs, costs."
url: https://scrape.ly/blog/facebook-mcp
markdown: https://scrape.ly/blog/facebook-mcp.md
---

[AI agents](https://scrape.ly/blog/category/ai-agents.md)

# Facebook MCP: Pages, Posts and Ads for Claude, ChatGPT and Cursor

A Facebook MCP server lets your AI agent read public Facebook pages, posts, reactions and Meta ads in the chat. See how Meta's own MCP servers differ, connect Scrape.ly's hosted server without a Facebook login or Page token, and see two real runs with output and costs.

[Scrape.ly Team The team behind Scrape.ly](https://scrape.ly/blog/author/scrapely-team.md)

- Published

  Oct 27, 2026

- Reading time

  10 min read

![Pixel-art robot with an orange >\_ on its terminal head carries a cable from a feed of posts headed by the blue Facebook logo into a server rack labelled MCP](https://scrape.ly/media/facebook-mcp.png?w=1080)

A Facebook MCP server is a Model Context Protocol server that gives an AI agent such as Claude, ChatGPT or Cursor tools for Facebook data: a page's latest posts with reactions, comments, shares and video views, page details, comments, reels and the ads a brand runs across Meta. For research on pages you don't manage, the best Facebook MCP setup is the hosted Scrape.ly MCP server: your agent runs ready-made Facebook scrapers in the cloud against public pages, with no Facebook login, no Meta developer app and no Page access token.

This guide explains how that differs from Meta's own MCP servers, shows the setup per client, the Actors, the tool calls and two real runs from 27 October 2026: Duolingo's five latest posts with a reaction breakdown in 15.9 seconds, then the ten active US ads behind the same page in 25.2 seconds, for under two cents together.

## Does Meta have an official Facebook MCP server?

Meta runs several, all for managing what you own. Its [MCP overview](https://developers.facebook.com/documentation/mcp) lists three remote servers: **Meta Ads MCP**, to "Manage Meta ads - analyze campaign performance, create and edit ads, campaigns, and catalogs, assess signal health, run experiments, review activity logs, and search help articles"; **Meta Social Technologies MCP**, to "Manage the Meta apps and integrations you build" on Meta's developer platform; and **WhatsApp Business Tools MCP** for a WhatsApp Business integration.

The ads server lives at `mcp.facebook.com/ads`. Per Meta's [setup guide](https://developers.facebook.com/documentation/ads-commerce/ads-ai-connectors/ads-mcp-server/ads-mcp-server-get-started), you sign in "with your Facebook account or your Meta Managed Account", and a token needs at least the `ads_mcp_management` permission plus `ads_read` or `ads_management`. Since 16 July 2026 any developer with their own Meta app can [connect to it](https://developers.facebook.com/blog/post/2026/07/16/meta-ads-mcp-server/). Its sample prompts start with "List my ad accounts."

Most third-party Facebook MCP servers on GitHub work the same way, one Page at a time. [HagaiHen/facebook-mcp-server](https://github.com/hagaihen/facebook-mcp-server), one of the first results, is configured with `FACEBOOK_ACCESS_TOKEN=your_facebook_page_access_token` and `FACEBOOK_PAGE_ID=your_page_id`.

Those are tools for an ad account or Page you control. Research questions are about pages you don't: what a competitor posted this week, which formats earn shares, which ads a rival is running in the US right now. That needs public data, which is what the Scrape.ly server reads.

|                         | Scrape.ly MCP server                                                                                           | Meta Ads MCP                             | Page-token servers                       |
| ----------------------- | -------------------------------------------------------------------------------------------------------------- | ---------------------------------------- | ---------------------------------------- |
| Built for               | Research on any public page and its ads                                                                        | Managing your own Meta ad accounts       | Managing one Page you admin              |
| Facebook account needed | None                                                                                                           | Facebook or Meta Managed Account sign-in | A Page access token                      |
| Whose data              | Any public page, post, reel or Ad Library search                                                               | The ad accounts you authorize            | Your Page                                |
| What the agent gets     | Rows: posts with reaction breakdown and views, page details, comments, ads with copy, CTA, dates and platforms | Campaign tools and reports               | Whatever the Graph API allows that token |
| Export and schedule     | JSON, CSV or Excel datasets; schedules and automations                                                         | Inside the chat                          | Depends on the server                    |

## How to connect the Scrape.ly MCP server

The [Scrape.ly MCP server](https://scrape.ly/mcp.md) is hosted at `https://mcp.scrape.ly`, speaks MCP's streamable HTTP transport and signs you in with OAuth or a Scrape.ly API token. Create a free account first; the free plan includes $5 of usage credit every month, no card needed.

**Claude Code.** One command, then `/mcp` inside Claude Code to sign in:

```shell
claude mcp add --transport http scrapely https://mcp.scrape.ly
```

**Claude Desktop and claude.ai.** Add `https://mcp.scrape.ly` as a custom connector under **Customize → Connectors**.

**Cursor.** Add this to `~/.cursor/mcp.json`, or leave out `headers` to sign in with OAuth:

```json
{
  "mcpServers": {
    "scrapely": {
      "url": "https://mcp.scrape.ly",
      "headers": { "Authorization": "Bearer YOUR_TOKEN" }
    }
  }
}
```

**ChatGPT, VS Code, Windsurf and others** use the same URL; formats are in the [MCP docs](https://scrape.ly/docs/mcp.md).

**A Facebook-only server.** To give the agent just posts and ads:

```plaintext
https://mcp.scrape.ly?actors=echofield/facebook-posts-scraper,echofield/facebook-ads-scraper
```

## The Facebook Actors your agent can call

Each data type has its own Actor in the Store, all maintained by Scrape.ly and all reading public pages without a login:

| Actor                                                                                    | Input                                            | What comes back                                                                                                                                               |
| ---------------------------------------------------------------------------------------- | ------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Facebook Posts Scraper](https://scrape.ly/store/echofield/facebook-posts-scraper.md)    | Page, post or reel URLs                          | Text, time, total reactions and the per-type breakdown, comments and shares counts, video views, media, link previews, top comments, the page's Ad Library id |
| [Facebook Ad Library Scraper](https://scrape.ly/store/echofield/facebook-ads-scraper.md) | Page URL, page name or an Ad Library search link | One row per ad: copy, title, CTA, cards, images, videos, landing URL, start and end dates, active flag, platforms                                             |
| Facebook Pages Scraper                                                                   | Page URLs                                        | Followers, category, contact details, website, ratings, ad status                                                                                             |
| Facebook Comments Scraper                                                                | Post, reel, photo or video URLs                  | Comment text, time, likes                                                                                                                                     |
| Facebook Reels, Reviews, Groups and Events Scrapers                                      | Pages, groups, cities                            | Reels with play counts, page reviews, public group posts, events                                                                                              |

The Posts Scraper costs $2.37 per 1,000 posts and the Ad Library Scraper $0.41 per 1,000 ads, platform usage included, as listed on their Store pages on 27 October 2026. The [Facebook scrapers](https://scrape.ly/scrapers/facebook.md) page compares the whole family with sample output.

## What the agent does: the four tool calls

1. **`search-actors`** with "facebook" finds the Actors above.
2. **`fetch-actor-details`** returns the input schema, README and price, so the agent knows posts take `startUrls` and `resultsLimit`.
3. **`call-actor`** starts the run and waits up to 45 seconds. Both runs below finished inside that.
4. **`get-actor-output`** reads the rows, only the fields the agent asks for.

The rows never land in the `call-actor` reply, so a large export doesn't flood the context window.

## A real run: a brand page's latest posts

The prompt: "Use scrapely to get Duolingo's five latest Facebook posts with reactions, comments, shares and views, and tell me what kind of post gets the most laughs."

The agent sends `echofield/facebook-posts-scraper` the page URL with a cap:

```json
{
  "actor": "echofield/facebook-posts-scraper",
  "input": {
    "startUrls": [{ "url": "https://www.facebook.com/duolingo/" }],
    "resultsLimit": 5
  },
  "waitSecs": 45,
  "callOptions": { "maxTotalChargeUsd": 0.05 }
}
```

The run on 27 October 2026 took 15.9 seconds. Its log:

```plaintext
20261027T16:10:25.114Z [scrapely.actor] INFO  Finished posts=5 pages=2
20261027T16:10:27.715Z [scrapely.actor] INFO  Comments from post pages 11
20261027T16:10:28.518Z [scrapely.actor] INFO  Pushed 5 items
```

The agent read `time,text,likes,comments,shares,viewsCount,isVideo,reactionLikeCount,reactionLoveCount,reactionHahaCount,pageAdLibrary`:

| Posted | Type | Reactions | Haha  | Comments | Shares | Views   | Caption                                       |
| ------ | ---- | --------- | ----- | -------- | ------ | ------- | --------------------------------------------- |
| Oct 27 | Post | 14        | 4     | 0        | 2      | —       | i have a chin and a jaw, jjincha              |
| Oct 26 | Reel | 9,588     | 4,543 | 390      | 1,726  | 104,378 | make my own group, call it K/DUO              |
| Oct 26 | Reel | 1,507     | 46    | 29       | 51     | 23,083  | could've been us if u did ur lesson           |
| Oct 26 | Reel | 4,918     | 688   | 184      | 87     | 194,751 | leave everything in the past except ur streak |
| Oct 23 | Post | 19,381    | 8,276 | 309      | 717    | —       | i heard they're selling me today?             |

The agent's answer: the two posts built around the mascot as a character, the K/DUO reel and the Oct 23 "selling me" post, got the most laughs, with Haha making up 47% and 43% of their reactions. The most-viewed reel, at 194,751 views, drew mostly plain Likes. The newest post was ten minutes old when the run started, so its 14 reactions say nothing yet. "Reactions" is Facebook's total; the run also returned the Love and Care counts and a short list of top comments, which we leave out because commenters are private people.

Three of these reels were also on Duolingo's TikTok, and our [TikTok MCP](https://scrape.ly/blog/tiktok-mcp.md) run read them two minutes earlier. The "leave everything in the past" clip had 879,800 TikTok plays and 22,900 shares against 194,751 Facebook views and 87 shares. Each platform counts views its own way, but a gap that wide is the kind an agent can flag in one sentence.

Cost: 5 × $0.00237 = $0.01185 at list price, platform usage included; our account was billed $0.00948 after its plan's Store discount.

## The next call: the ads behind the page

Every post row carried `pageAdLibrary.id`, the page's id in Meta's Ad Library, which was `141935472517297`. The agent turned it into an Ad Library link for active US ads and called the Ad Library Scraper:

```json
{
  "actor": "echofield/facebook-ads-scraper",
  "input": {
    "startUrls": [{ "url": "https://www.facebook.com/ads/library/?active_status=active&ad_type=all&country=US&is_targeted_country=false&media_type=all&search_type=page&view_all_page_id=141935472517297" }],
    "resultsLimit": 10
  },
  "waitSecs": 45,
  "callOptions": { "maxTotalChargeUsd": 0.05 }
}
```

It finished in 25.2 seconds with "Saved 10 ads." The log shows the Actor handling a failed request by itself:

```plaintext
20261027T16:11:11.449Z [scrapely.actor] INFO  Search attempt 1 did not return ads (SSLError)
20261027T16:11:14.199Z [scrapely.actor] INFO  Pushed 10 items
```

All ten ads were active, ran on Facebook, Instagram, Audience Network and Threads, used Meta's dynamic creative (`DCO`) format with an "Install now" button and pointed to the Duolingo app on Google Play. Grouped by headline:

| Headline                           | Language | Ads | Started                |
| ---------------------------------- | -------- | --- | ---------------------- |
| Free Language Learning             | English  | 4   | Oct 14 (3), Oct 21 (1) |
| Speak Confidently on Duolingo      | English  | 1   | Oct 14                 |
| Aprende idiomas jugando ¡y gratis! | Spanish  | 3   | Oct 14                 |
| Aprende inglés gratis              | Spanish  | 2   | Oct 14                 |

Half of the brand's active US ads in this sample were in Spanish, every one asked for an app install, and none mentioned the paid Super plan. The organic feed jokes; the ads push installs. Cost: 10 × $0.000406 = $0.00406 at list price, $0.00325 billed. For the same brand's Google ads next to these, see [competitor ad intelligence](https://scrape.ly/blog/ad-intelligence-scraping.md).

Scrape.ly Store Give your agent Facebook posts Public Facebook page posts with reactions by type, comments, shares, video views and the page's Ad Library id, no login. $2.37 per 1,000 posts, callable from any MCP client.

[Try it free](https://scrape.ly/store/echofield/facebook-posts-scraper.md) [Browse the Store](https://scrape.ly/store.md)

## Prompts that work well

- "Use scrapely to get the last 20 posts from these three brand pages and rank the formats by shares per post."
- "Pull this page's posts from the last 30 days and tell me which day of the week gets the most reactions."
- "Get the active US ads for this page from the Ad Library and summarize the offers and calls to action."
- "Search the Ad Library for 'meal kit' in the US, 30 ads, and list which advertisers run the most creatives."
- "Keep every run under $0.10."

The agent turns the last line into `callOptions.maxTotalChargeUsd`.

## What your agent can and can't get from Facebook

- **Public pages, not personal profiles.** Pages and public posts work. A personal profile that isn't public, or a page that answers with a login wall, returns no posts; the Posts Scraper fails that page instead of writing an error row, and keeps what other pages returned.
- **Top comments, not full threads.** Post rows carry the comments Facebook sends with the post. For a full comment list, the agent calls the Comments Scraper with the post URLs.
- **No spend for commercial ads.** Meta doesn't publish exact spend or reach for ordinary commercial ads, so those fields stay empty; ads about social issues, elections or politics carry ranges.
- **Template text in catalog ads.** Dynamic and catalog ads store copy such as `{{product.name}}`, which is what Meta keeps in the library.
- **Large ad pulls take minutes.** The first 30 ads of a search arrive in seconds; after that the library sends about 10 at a time, roughly 1,000 ads in seven minutes, per the README. Start long jobs with `waitSecs: 0` and poll.
- **Nothing invented.** A field Facebook didn't send stays off the row, and a real `0` stays `0`.

## Spending control for agents

- **A dollar cap per run.** `maxTotalChargeUsd` caps everything a run can cost; the Posts Scraper stops cleanly at the cap and keeps what it saved.
- **Scoped API keys with daily charge limits.** Give an unattended agent its own key under **Settings → API keys**, with only `actors:run` and `runs:read`.
- **A prepaid balance.** No invoice surprises.

## Is it legal to scrape Facebook with an AI agent?

The Actors read pages and an Ad Library that any logged-out visitor can open; your agent never signs in. Meta's [Terms of Service](https://www.facebook.com/terms.php) (effective January 1, 2025) say "You may not access or collect data from our Products using automated means (without our prior permission)", "regardless of whether such automated access or collection is undertaken while logged-in to a Facebook account." In [Meta Platforms v. Bright Data](https://www.govinfo.gov/app/details/USCOURTS-cand-3_23-cv-00077/USCOURTS-cand-3_23-cv-00077-7) (N.D. Cal., January 2024), the court granted Bright Data summary judgment on Meta's contract claims over logged-off scraping of publicly available data; that ruling covers those terms and facts, not every use. Commenters and people tagged in posts are personal data under the GDPR and CCPA, so collect only what you need. This isn't legal advice.

For a REST endpoint instead of a chat, the [Facebook API](https://scrape.ly/api/facebook-api.md) page has Python, JavaScript and cURL examples, and our guide to [scraping the Facebook Ads Library](https://scrape.ly/blog/scrape-facebook-ads-library.md) goes deeper on ad research. For other platforms, see [social media scraping](https://scrape.ly/blog/social-media-scraping.md), [Instagram MCP](https://scrape.ly/blog/instagram-mcp.md) and the [best MCP servers for web scraping](https://scrape.ly/blog/best-mcp-servers-for-web-scraping.md).

## FAQ

### Is there an official Facebook MCP server?

Meta runs the Meta Ads MCP server at `mcp.facebook.com/ads` for managing your own ad accounts, plus MCP servers for Meta developer apps and WhatsApp Business. All three work on accounts, apps or integrations you sign in to. For public posts, page details and Ad Library ads from any page, use the Scrape.ly MCP server.

### What is the Facebook MCP server URL for Scrape.ly?

`https://mcp.scrape.ly`, for Claude, ChatGPT, Cursor and every other client. Add `?actors=echofield/facebook-posts-scraper,echofield/facebook-ads-scraper` to expose only those two tools.

### Can Claude read Facebook posts?

Yes, through the Scrape.ly MCP server. Ask about a public page and Claude runs the Facebook Posts Scraper, then works with the text, reactions by type, comments, shares and video views it gets back.

### Can my agent see a competitor's Facebook ads?

Yes. The Ad Library Scraper reads Meta's public Ad Library by page URL, page name or a search link, and returns each ad's copy, call to action, landing URL, dates and platforms. Spend and reach stay empty for ordinary commercial ads because Meta doesn't publish them.

### Do I need a Facebook access token or the Graph API?

No. The Actors read public pages, so there's no Meta developer app, App Review or Page token. You only need a Scrape.ly account.

### How much does a Facebook MCP setup cost?

Connecting the server is free. Posts cost $2.37 per 1,000 and Ad Library ads $0.41 per 1,000, platform usage included. Our two runs, five posts and ten ads, cost $0.01591 together at list price.

About the author

[Scrape.ly Team](https://scrape.ly/blog/author/scrapely-team.md) The team behind Scrape.ly

Scrape.ly is the web data platform from TeraShift GmbH in Switzerland, powered by Evomi: ready-made scrapers in the Scrape.ly Store, a cloud runtime, an API with JavaScript and Python SDKs, proxies, a hosted anti-bot browser and an MCP server for AI agents.

- [Website](https://scrape.ly/index.md)

Keep reading

## More in AI agents

- [![Pixel-art robot with an orange >\_ on its terminal head carries a cable from a phone showing the TikTok note logo on a short video, with like, comment and share icons down its edge, into a server rack labelled MCP](https://scrape.ly/media/tiktok-mcp.png?w=750)](https://scrape.ly/blog/tiktok-mcp.md)
  ### [TikTok MCP: Videos and Comments for Claude, ChatGPT and Cursor](https://scrape.ly/blog/tiktok-mcp.md)
  [A TikTok MCP server lets your AI agent read public TikTok videos, play counts and comments right in the chat. See how TikTok's own ads connector differs, connect Scrape.ly's hosted server to Claude, ChatGPT or Cursor without a TikTok account, and see a real run with output and costs.](https://scrape.ly/blog/tiktok-mcp.md)
- [![Pixel-art robot with an orange >\_ on its terminal head chooses a lit arcade cabinet bearing the Scrape.ly logo, hand on its side and the Scrape.ly mark in its thought bubble, while a dark cabinet with the Tavily arrows logo stands switched off](https://scrape.ly/media/tavily-alternatives.png?w=750)](https://scrape.ly/blog/tavily-alternatives.md)
  ### [5 Best Tavily Alternatives for AI Agents in 2026](https://scrape.ly/blog/tavily-alternatives.md)
  [The 5 best Tavily alternatives for giving AI agents live web search, compared on what 1,000 searches and 1,000 crawled pages cost. Scrape.ly leads with Google results plus the top pages as Markdown for $3.99 per 1,000 searches, over MCP, with a real run from today.](https://scrape.ly/blog/tavily-alternatives.md)
- [![Pixel-art robot with an orange >\_ on its terminal head walks up to a lit arcade cabinet bearing the Scrape.ly logo and rests its hand on it, thinking of the Scrape.ly mark, while a dark cabinet with the orange Browserbase B logo stands switched off](https://scrape.ly/media/browserbase-alternatives.png?w=750)](https://scrape.ly/blog/browserbase-alternatives.md)
  ### [4 Best Browserbase Alternatives in 2026 for Scraping and Agents](https://scrape.ly/blog/browserbase-alternatives.md)
  [The 4 best Browserbase alternatives for 2026, compared on anti-bot features, CAPTCHA solving, proxy billing and free tiers. Scrape.ly leads with a hosted anti-bot Chromium your existing Playwright and Puppeteer code uses unchanged, next to 570+ ready-made scrapers.](https://scrape.ly/blog/browserbase-alternatives.md)

## The internet is full of data. Start owning yours.

Scrape.ly gives you the infrastructure, the tooling, and the team to extract, process, and operationalize web data at any scale. Setup takes minutes.

[Get Started Free](https://my.scrape.ly/register) [Chat with Support](mailto:hello@scrape.ly?subject=Question%20about%20Scrape.ly\&body=Hi%2C%20I%20have%20a%20question%20about%20Scrape.ly.)

No credit card. No setup calls.
