Skip to content

Divar MCP

MCP server for Divar, search, compare and analyze classified ads. Read-only, no API key.

Install: git clone https://github.com/mmdju/divar-mcp

Install

$git clone https://github.com/mmdju/divar-mcp

Install command taken from the project's README or registry entry. Always review code before running it.

Divar MCP - Classifieds intelligence for AI agents

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

Connect in 30 seconds

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).

7 tools

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:

  • All prices are in Toman (1 Toman = 10 Rial), and a negotiable ad returns price_toman: null - never 0. Ads sell in hours, so link the ad URL and let the user confirm.
  • Not every number in a price field is a price. A seller who will not publish one types a fake (۱,۰۰۰ تومان, 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.
  • A rent ad has two numbers. 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.
  • Start vague queries with divar_suggest: a district needs an id, a name alone will not filter it.
  • Anything with a budget or the word "best" goes to find_best_value - plain search only walks the pages you ask for.
  • Negotiable ads are not hidden. `find_

Similar plugs

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

Build Agentic workflows, RAG pipelines, with rich AI model and tool support on one collaborative workspace. Deploy on cloud, VPC, or self-hosted, so teams move from prototype…

Java 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发

MCP serverDatabases+105 this week

Give your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu, one CLI, zero API fees.

Explore related