Skip to content
Back to search

facebook-marketplace-mcp

MCP server for searching Facebook Marketplace via Chrome session cookies

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/jdcodes1--facebook-marketplace-mcp/badge.svg)](/listings/jdcodes1--facebook-marketplace-mcp)

HTML

<a href="/listings/jdcodes1--facebook-marketplace-mcp"><img src="/api/listings/jdcodes1--facebook-marketplace-mcp/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

git clone <this-repo>
cd facebook-marketplace-mcp
npm install
npm run build

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 126 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # Facebook Marketplace MCP Server
  2. An MCP server that provides access to Facebook Marketplace via direct GraphQL API calls. No browser automation at runtime — speaks Facebook's internal protocol directly.
  3. ## How It Works
  4. Facebook's web client makes all Marketplace requests as `POST /api/graphql/` with a `doc_id` (query hash) and `variables`. This server replays those requests using your existing Facebook session cookies from Chrome.
  5. **Think of it like [pypush](https://github.com/JJTech0130/pypush) for iMessage — direct protocol, no browser.**
  6. ## Prerequisites
  7. - **macOS** (cookie extraction uses Keychain)
  8. - **Google Chrome** with an active Facebook login
  9. - **Node.js** 20+
  10. ## Installation
  11. ```bash
  12. git clone <this-repo>
  13. cd facebook-marketplace-mcp
  14. npm install
  15. npm run build
  16. ```
  17. ## Setup with Claude Code
  18. ```bash
  19. claude mcp add facebook-marketplace -- node /path/to/facebook-marketplace-mcp/dist/index.js
  20. ```
  21. Or add to your Claude Code config manually:
  22. ```json
  23. {
  24. "mcpServers": {
  25. "facebook-marketplace": {
  26. "command": "node",
  27. "args": ["/path/to/facebook-marketplace-mcp/dist/index.js"],
  28. "env": {
  29. "CHROME_PROFILE": "Default"
  30. }
  31. }
  32. }
  33. }
  34. ```
  35. ## Tools
  36. ### `search_listings`
  37. Search Marketplace by query, location, and filters.
  38. | Parameter | Type | Required | Description |
  39. |-----------|------|----------|-------------|
  40. | `query` | string | yes | Search term |
  41. | `latitude` | number | yes | Latitude of search center |
  42. | `longitude` | number | yes | Longitude of search center |
  43. | `radius_km` | number | no | Search radius (default: 50) |
  44. | `min_price` | number | no | Min price in dollars |
  45. | `max_price` | number | no | Max price in dollars |
  46. | `category` | string | no | Category ID |
  47. | `limit` | number | no | Max results (default: 20) |
  48. ### `get_listing`
  49. Get full details for a specific listing.
  50. | Parameter | Type | Required | Description |
  51. |-----------|------|----------|-------------|
  52. | `listing_id` | string | yes | Marketplace listing ID |
  53. ### `monitor_search`
  54. Save a search as a monitor to track new listings over time.
  55. | Parameter | Type | Required | Description |
  56. |-----------|------|----------|-------------|
  57. | `name` | string | yes | Monitor name |
  58. | `query` | string | yes | Search term |
  59. | `latitude` | number | yes | Search center lat |
  60. | `longitude` | number | yes | Search center lng |
  61. | `radius_km` | number | no | Radius (default: 50) |
  62. | `min_price` | number | no | Min price |
  63. | `max_price` | number | no | Max price |
  64. ### `check_monitors`
  65. Check monitors for new listings since last check.
  66. | Parameter | Type | Required | Description |
  67. |-----------|------|----------|-------------|
  68. | `monitor_name` | string | no | Check specific monitor, or omit for all |
  69. ### `list_monitors`
  70. List all saved monitors.
  71. ### `delete_monitor`
  72. Delete a saved monitor.
  73. ## Configuration
  74. | Env Variable | Default | Description |
  75. |-------------|---------|-------------|
  76. | `CHROME_PROFILE` | `Default` | Chrome profile directory name |
  77. ## Updating GraphQL Queries
  78. Facebook rotates their `doc_id` values on deploys. If searches stop working:
  79. ```bash
  80. npm install -D playwright
  81. npx playwright install chromium
  82. npm run capture-queries
  83. ```
  84. This opens a browser, navigates Marketplace, and captures current query IDs. Update `src/facebook/queries.ts` with the new values.
  85. ## Rate Limiting
  86. The server self-rate-limits to 3 requests/minute with random jitter to avoid detection. This means searches take a few seconds.
  87. ## Limitations
  88. - **macOS only** for automatic cookie extraction
  89. - **Requires Chrome** with active Facebook session
  90. - **Facebook ToS** — automating Facebook violates their Terms of Service
  91. - **Fragile** — `doc_id` values change on Facebook deploys
  92. - **Rate limited** — aggressive use may trigger CAPTCHAs or account flags
  93. - **No write operations** — search/read only, no messaging or listing creation

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.