by mmdju
MCP server for Divar — search, compare and analyze classified ads. Read-only, no API key.
# Add to your Claude Code skills
git clone https://github.com/mmdju/divar-mcpGuides for using mcp servers skills like divar-mcp.
divar-mcp is an open-source mcp servers skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by mmdju. MCP server for Divar — search, compare and analyze classified ads. Read-only, no API key. It has 110 GitHub stars.
divar-mcp's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/mmdju/divar-mcp" and add it to your Claude Code skills directory (see the Installation section above).
divar-mcp is primarily written in JavaScript. It is open-source under mmdju on GitHub, so you can review or fork the full source.
Yes. AgentsLLM lists many other MCP Servers skills you can browse and compare side by side. Open the MCP Servers category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh divar-mcp against similar tools.
No comments yet. Be the first to share your thoughts!
Top skills in this category by stars
Unlocks once the catalog security scan passes (runs nightly).
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.

A public MCP server that gives AI agents real Divar knowledge: search Iran's largest classifieds, prices in Toman, categories and neighbourhoods, car mileage and phone specs, rental deposit + rent, ad details, side-by-side comparisons and a live price verdict. Read-only, no key needed. No login, no phone numbers - ever.
Live endpoint: https://divar-mcp.mmdju2.workers.dev/mcp (Streamable HTTP, stateless)
نسخه فارسی · Examples · Tool reference · Changelog
Any MCP client, one URL. Cline / Cursor / Claude Desktop (mcp.json style):
{
"mcpServers": {
"divar": { "url": "https://divar-mcp.mmdju2.workers.dev/mcp" }
}
}
Then just talk: "pride under 300 million", "two-bedroom to rent in Tehran", "is this 207 a good deal?", "cheapest iPhone 13 in Mashhad".
Agents running in a browser work too - the endpoint answers CORS preflights (OPTIONS /mcp).
| Tool | What it answers |
|---|---|
divar_suggest |
Vague wording to real search terms, category slugs, city and district ids - all 236 categories and 1177 cities |
search_ads |
"Show me X", price checks - filters, sorting, paging; one call can scan and merge up to 5 pages |
ad_details |
Everything about one ad: price, specs, amenities, condition scores, photos, map, expiry, chat flag, seller type |
get_ads_batch |
Shortlist cards for up to 10 tokens - feeds compare_ads, and each card says who is selling and until when |
compare_ads |
"Which of these?" - only the specs that actually differ, plus the middle of the set and where each ad sits |
find_best_value |
"Best X under Y Toman" - picks ranked by what the budget reaches, judged against the uncapped market (market_scale) |
market_price |
"Is this price normal?" - the median of a live sample, with its size and what it kept out of the maths |
Every tool is read-only (readOnlyHint: true) and needs no credentials. MCP prompts (compare-ads, best-under-budget) and resources (divar://cities, divar://categories, divar://category-filters/{slug}) ride along - reference data without spending a tool call.
Notes for agent builders:
price_toman: null - never 0. Ads sell in hours, so link the ad URL and let the user confirm.۱,۰۰۰ تومان, repeated digits) - those ads stay in every list, labelled price_is_placeholder with a price_note, and never set a median. The evidence rides along as price_reading, so the caller judges the number instead of trusting it.price_toman is the monthly rent, deposit_toman (ودیعه) rides beside it, each with its own flag. A room in a shared home (همخونه / هماتاقی / اجاره اتاق) carries shared_housing - a room's price is not a flat's rent.body_type (suv, sedan, …), seller_type: "shop" on cars (نمایشگاه), and the building facts on apartment-sell / house-villa-sell. Each was probed against the live endpoint before it reached the server.divar_suggest: a district needs an id, a name alone will not filter it.find_best_value - plain search only walks the pages you ask for.find_best_value ranks priced ads first by default; include_negotiable: true adds the توافقی picks last, with price_toman: null and an "ask the seller" line.market_price is not an appraisal. It says how many ads it compared and keeps placeholder prices out of the maths.page goes up to max 50 - the caps protect agent context. Persian queries are folded (yeh/kaf, Persian digits, ZWNJ) with one automatic retry when a spelling variant comes back empty.How a question becomes an answer. No user data is stored anywhere in this path.
flowchart LR
subgraph you [Your machine]
agent[AI agent<br/>Cline / Cursor / Claude]
end
subgraph cf [Cloudflare Workers]
worker[divar-mcp<br/>stateless, no database]
end
dv[(Divar public web listings<br/>api.divar.ir)]
agent -->|POST /mcp<br/>Streamable HTTP, no key| worker
worker -->|HTTPS + polite pacing<br/>reads only| dv
dv -->|large JSON payloads| worker
worker -->|small cards<br/>toman, district, URL| agent
What this means:
readOnlyHint. Nothing here can post, change or delete anything.Don't take my word for it - check the live server yourself:
node scripts/verify-live.mjs # needs Node.js 18+, nothing to install
It lists all 7 tools over Streamable HTTP, runs a search + details read + a market_price pricing + a privacy sweep + error paths, asserts the honest-data contract (Toman prices, negotiable = null, actionable errors), and compares the version the live service reports against the newest release in this repo - so a deployment that lags these docs cannot stay quiet. The same script runs hourly in CI (). See docs/architecture.md for the full path, and examples/python.py for a copy-paste client.
Phone numbers need the seller's own login, and this server never logs in and never returns them - no phone, mobile or contact_number field appears in search results or ad details. Ads are linked, not contacted: the user talks to the seller themselves.
Divar's public web listings (undocumented, may change without notice). This project is not affiliated with or endorsed by Divar.
Free public service on Cloudflare Workers. Fair use: 20 requests per minute per IP on /mcp (HTTP 429 with retry-after) - counted at the edge and in the server code, details in SECURITY.md.
Showcase repository (docs only, no source published) - see LICENSE. Security notes in SECURITY.md. Persian version in README_FA.md.