facebook-marketplace
This server lets Claude search Facebook Marketplace, compare prices, inspect listings/photos, flag risks, and monitor deals.
Check Marketplace login/config status and optionally open a browser for the user to log in manually.
Search listings by query, city/location, price range, radius, condition, recency, and sort order.
Fetch full listing details, pickup/delivery info, and up to 6 photos for visual checks.
Run multi-query price comparisons: merge/dedupe results, group like-for-like variants, compute benchmarks, rank deals, flag scams, and suggest opening offers.
Export comparison reports as CSV and HTML.
Save, list, and remove watches with target prices, then re-check for new listings, price drops, and target hits.
Query local price history for a listing or by title text.
Provides tools for searching and analyzing Facebook Marketplace listings: raw filtered searches, full listing details with photos, like-for-like price comparison with deal scoring and scam flags, suggested opening offers, saved watches with target prices, new-listing/price-drop checks, and local price history. Supports Hebrew and English titles and ILS pricing, with optional login for more results and seller names.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@facebook-marketplace find me the best used PS5 in Tel Aviv"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Facebook Marketplace deal finder (MCP server + Claude skill)
Search Facebook Marketplace from Claude, compare prices like-for-like, flag scams, suggest opening offers, and watch for new listings and price drops. Built for Israel (Hebrew + English titles, ₪), works anywhere.
MCP server (
dist/index.js): 8marketplace_*tools, registered in Claude Code asfacebook-marketplace.Skill
marketplace-deals(skills/marketplace-deals/, install into~/.claude/skills/): the buying workflow (queries → baseline → compare → photo check → report → watch).CLI (
dist/cli.js): the same engine without an AI, for Windows Task Scheduler.
How it works
A dedicated Playwright Chromium profile (~/.fb-marketplace-mcp/profile, not your everyday Chrome) loads Marketplace pages at human pace (2.5–5 s jitter, one tab, no parallelism). Listings are read from Facebook's embedded Relay JSON (marketplace_listing_title, listing_price, …) rather than the DOM, so extraction does not depend on the UI language. Item pages select the focal listing by id, so the "related listings" rail cannot pollute details or photos.
Logged out, each search page returns about 24 listings, so marketplace_compare sweeps every query variant × sort order (relevance, cheapest, newest) and merges: typically 100+ unique listings from 6 pages. Logging in (optional, once) adds scroll pagination and seller names.
Built on lessons from jdcodes1/facebook-marketplace-mcp (macOS-only Chrome cookie extraction; per the car-hunter fork, its GraphQL doc_id search started returning empty listings), the car-hunter fork (switched to embedded-JSON parsing, focal-object detail fix) and weimar-torres-herrera/facebook-marketplace-mcp (Playwright persistent profile; DOM parsing with six known defects). Ideas reimplemented, no code copied.
Related MCP server: Facebook Marketplace MCP Server
Tools
Tool | Use |
| Login state, config, DB size |
| Opens a window; you log in (credentials are never typed by Claude) |
| One raw search with filters (price, condition, days, sort) |
| Full detail + photos returned as images for Claude to inspect |
| The main tool: sweep, relevance filter, like-for-like groups ( |
| Save / list / remove a watch with a target price |
| New listings, price drops, target hits since the last check |
| Local price history per listing or by title |
Scam / quality flags: too cheap vs a tight group or a supplied reference price, deposit / prepayment, parts / broken / iCloud-locked, replica, jailbroken, "accessory for X", buy requests ("מחפש"), placeholder prices (₪1, ₪123), sold/pending, few photos, far pickup-only, reposts.
Setup
Requires Node.js 22.13+ (uses the built-in node:sqlite).
git clone https://github.com/ido6/facebook-marketplace-deals.git
cd facebook-marketplace-deals
npm install
npx playwright install chromium
npm run build
claude mcp add --scope user facebook-marketplace -e FBMP_LOCATION=telaviv -- node "/absolute/path/to/facebook-marketplace-deals/dist/index.js"Install the skill by copying skills/marketplace-deals/ into ~/.claude/skills/ (Windows: %USERPROFILE%\.claude\skills\). Start a new Claude Code session so the tools and skill load, then ask e.g. "find me the best used PS5 in Tel Aviv".
Optional login (more results, seller names): ask Claude to run marketplace_login, or node dist/cli.js login.
Configuration (env)
Variable | Default | |
|
| City name (English/Hebrew), slug, or numeric id |
| – | Your location, for distance scoring |
|
|
|
|
| |
|
| Keep them; human pace is the point |
|
| Page-load cap per compare |
|
| Profile, SQLite DB, reports |
Locations: Facebook has vanity slugs only for some cities (telaviv, jerusalem, beersheba, ashdod, netanya, raanana, rehovot, modiin, eilat); others are mapped to numeric city ids in src/browser/urls.ts (Petah Tikva, Rishon, Ramat Gan, Holon, Herzliya, Kfar Saba, …). For any other city, open Marketplace, set the location, and copy the number from facebook.com/marketplace/<id>/. An unknown slug fails fast with that hint.
CLI
Comparisons return the four highest-ranked qualifying deals by default, or fewer when fewer qualify. All fetched qualifying listings still contribute to the price benchmarks. The first four candidates receive detail checks before re-ranking; final replacements may not have detail checks. MCP callers can override top_n and enrich_top. Watch checks continue to process every ranked listing.
node dist/cli.js compare "iphone 13 pro" "אייפון 13 פרו" --location "Tel Aviv" --min 800 --exclude כיסוי --report
node dist/cli.js check-watchesExit code 2 = Facebook session expired / security check (run login); 1 = other error.
Development
npm test # vitest, fixtures captured from the live site
npm run typecheck
npm run buildsrc/core is pure (no I/O) and fixture-tested; src/browser is the only Playwright code; stdout belongs to MCP, so logs go to stderr (src/log.ts).
Limits and risk
Automating Facebook is against its Terms of Service. This tool is read-only, slow by design, and uses no stealth tricks; the account risk is low but not zero. Heavy use can trigger security checks.
Facebook changes its payload occasionally. Extraction keys off stable JSON field names; if results go empty, save a fresh search page's HTML and turn it into a fixture with
node scripts/sanitize-fixture.mjs raw.html test/fixtures/new.html(strips tokens, real ids, seller data, photo URLs and exact coordinates; never commit raw pages), then run the tests.Prices are asking prices, not sold prices. Benchmarks need several listings per variant; thin variants fall back to tier-level or overall medians (
benchmark.level).Messaging sellers and paying stay with you: Claude only drafts messages.
License
MIT. Not affiliated with or endorsed by Meta. Use it for your own shopping, at your own risk.
Available Tools
8 toolsmarketplace_check_watchesA
Re-run saved watches and report only what changed since each one's last check: new listings, price drops, target-price hits. The first check of a watch sets a baseline.
Inputs: name.
marketplace_compareA
Find the best-priced listings for a product and benchmark the market. Sweeps every query variant × sort order, merges, drops irrelevant/sold/reposted listings, groups like-for-like (e.g. 'pro · 256GB'), computes price stats per variant, ranks deals (price vs variant, price drops, recency, condition, distance), opens the top few for details, flags scams (too cheap, prepayment, parts/broken, buy requests, placeholder ₪1 prices) and suggests an opening offer. Pass several query variants: Hebrew + English + model spellings, e.g. ['iphone 13', 'אייפון 13']. Takes about 5-8 s per page; default 3 sorts per query, capped at 12 pages.
Inputs: queries (required), sorts, top_n, exclude, +12 more.
marketplace_listingARead-only
Full detail for one listing: description, condition, exact pickup area, delivery options, all photos. Set include_photos to SEE the real photos (check the item matches the title, spot stock photos, damage, serial numbers).
Inputs: listing (required), include_photos.
marketplace_loginA
Open a visible browser window on Facebook so the USER can log in by hand (Claude never types credentials). Waits until login completes or the timeout passes. Optional: search works logged out.
Inputs: timeout_minutes.
marketplace_price_historyARead-only
Local price history recorded by earlier searches: one listing's price changes (by id/URL) or past listings whose title matches some text. Useful for 'has this dropped?' and 'what did these go for last month?'.
Inputs: listing, title_contains.
marketplace_searchARead-only
Raw Marketplace search for one query. Use for quick looks; for price comparison or 'find me the best deal' use marketplace_compare instead. Write queries the way local sellers write titles (Hebrew and/or English).
Inputs: query (required), sort, location, max_price, +5 more.
marketplace_statusARead-only
Check whether the Marketplace browser session is logged in, plus the active configuration. Call first if other tools fail.
Inputs: no named parameters.
marketplace_watchB
Save, list or remove a watch: a saved comparison that marketplace_check_watches re-runs to report NEW listings, PRICE DROPS and hits at or below a target price.
Inputs: action (required), name, exclude, queries, +6 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Most tools have distinct roles (status, login, listing detail, price history). The overlapping pairs — search vs. compare (both retrieve listings) and watch vs. check_watches (two halves of the watch feature) — are explicitly delineated in their descriptions, steering an agent to the right choice, so ambiguity is minor rather than real.
All tools consistently use the marketplace_ snake_case prefix, which is predictable and readable. The only slight deviation is that some use noun forms (status, listing, watch, price_history) while others use verbs (search, compare, login, check_watches), but the pattern is uniform enough not to confuse.
Eight tools is well-scoped for a Marketplace browser-automation server. Each tool earns its place: session handling, search, detail fetch, comparison, watch management, and price history — no redundancy or filler.
The surface covers the full browse/monitor workflow: login, search, detail, benchmark comparison, watch save/list/remove plus re-check, and price history. Minor gaps exist (no tool for contacting a seller or saving an individual listing outside a watch), but core deal-finding workflows are complete.
Maintenance
Related MCP Connectors
Search Facebook Marketplace, inspect listings and analyze deals. Paid Spottable Pro/Max required.
Know what you're buying: brand, white-label, price, fake-discount, review and seller checks
Lets ChatGPT or Claude watch for a used car or apartment not yet on offer and email you
Real-time Amazon prices, product search, 90-day history, AI forecasts, and price drop alerts.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI agents like claude.ai to search online marketplaces (e.g., Facebook Marketplace) through your own logged-in browser, returning structured listings and details.-
- FlicenseAqualityCmaintenanceEnables searching, retrieving details, and monitoring Facebook Marketplace listings through direct GraphQL API calls using existing Chrome session cookies, with support for saved searches and price/location filters.71-
- AlicenseNot gradedqualityCmaintenanceEnables searching and browsing Facebook Marketplace listings, retrieving item details, nearby items, categories, and parsing listing URLs through MCP tools.1MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to search and compare Facebook Marketplace listings, collect listing details and photos, organize research workspaces, evaluate promising items with reusable product guides, and refresh or revisit results while preserving evidence.1Apache 2.0