Divar MCP logo

Divar MCP

Community
mmdju

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

Publishermmdju
Repositorydivar-mcp
LanguageJavaScript
Forks
8
Stars
84
Available tools
0
Transport typestdio, streamable-http
Categories
Links
  • Connect tools to AI workflows

    Divar MCP exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    84 stars and 8 forks from the linked repository.

Divar MCP - Classifieds intelligence for AI agents

Divar MCP banner

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

json
{
  "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

ToolWhat it answers
divar_suggestVague wording to real search terms, category slugs, city and district ids - all 237 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_detailsEverything about one ad: price, specs, amenities, condition scores, photos, map, expiry, chat flag, seller type
get_ads_batchShortlist 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_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.
  • Results are capped (default 10, max 30) and 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.
  • examples/sample-calls.md has eight copy-paste flows, and docs/tools.md has every parameter, which filters each category honours, and what is deliberately absent.

How it works

How a question becomes an answer. No user data is stored anywhere in this path.

What this means:

  • Stateless. Every request stands alone - no sessions, no accounts, nothing to log in to.
  • Read-only. All 7 tools carry readOnlyHint. Nothing here can post, change or delete anything.
  • No user data. Nothing about you is stored. What the server does keep: a short-lived response cache (10 minutes for searches and ads, 24 hours for the city/category lists).
  • Rate-limit aware. Search requests go out 800 ms apart, ad details 2 s apart with backoff, and Divar's model lists are cached for a day - load on your side never leaves this server as a burst.
  • Undocumented upstream. Divar's public API can change without notice, which is exactly why the verify script exists.

Trust, verified

Don't take my word for it - check the live server yourself:

bash
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 (Live verify). See docs/architecture.md for the full path, and examples/python.py for a copy-paste client.

Privacy

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.

Data source

Divar's public web listings (undocumented, may change without notice). This project is not affiliated with or endorsed by Divar.

Status

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.

License

Showcase repository (docs only, no source published) - see LICENSE. Security notes in SECURITY.md. Persian version in README_FA.md.

Installation

TypingMind
{
  "mcpServers": {
    "divar-mcp": {
      "command": "node",
      "args": [
        "scripts/verify-live.mjs"
      ]
    }
  }
}

Use Divar MCP MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once Divar MCP is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. You can run MCP locally on your device or connect to a remote MCP server URL.

Option 1: Use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add Divar MCP as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the Divar MCP MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "divar-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the Divar MCP MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the Divar MCP MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Divar MCP to help me with this task?
Divar MCP
Sure. I read it.
Here is what I found using Divar MCP.

Option 2: Add an MCP server URL

Use this when Divar MCP is already hosted remotely or your team wants one shared connector that multiple users can access.

1

Open MCP connectors

In TypingMind, go to Plugins, open MCP connectors, then choose Add URL.

  1. Open TypingMind in your browser.
  2. Go to Plugins.
  3. Open MCP connectors.
  4. Click Add URL.
TypingMind Add Custom MCP Server URL form
2

Paste the server URL

Enter https://divar-mcp.mmdju2.workers.dev/mcp in the Server URL field. Add a connection name, description, icon, custom HTTP headers, or OAuth client settings if the server requires them.

  1. Paste https://divar-mcp.mmdju2.workers.dev/mcp into the Server URL field.
  2. Enter a connection name for Divar MCP.
  3. Add a description and icon if you want it to be easier to identify.
  4. Add custom HTTP headers or OAuth client details if the server requires authentication.
3

Create the connection

Click Create connection, then return to the Plugins list and confirm the new MCP connection is active.

  1. Click Create connection.
  2. Return to the MCP connectors list.
  3. Confirm the Divar MCP connection appears as active.
  4. Refresh the plugin list if the connection does not appear immediately.
4

Switch models without reconnecting

Start a chat with your preferred model, enable the Divar MCP tools from Plugins, and switch to another model whenever needed. The MCP connection stays available to the TypingMind workspace.

  1. Start a new chat in TypingMind.
  2. Select the AI model you want to use.
  3. Enable the Divar MCP tools from Plugins.
  4. Ask the model to use the tool when needed.
  5. Switch to another AI model and reuse the same MCP connection.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Divar MCP to help me with this task?
Divar MCP
Sure. I read it.
Here is what I found using Divar MCP.

Frequently asked questions

What is the Divar MCP MCP server used for?

Divar MCP is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use Divar MCP MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use Divar MCP with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use Divar MCP MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With Divar MCP connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect Divar MCP MCP to TypingMind?

Divar MCP can be connected in TypingMind with the local MCP connector or by adding a remote MCP server URL. Use the local connector when the server needs access to files, apps, or private resources on your device, and use a server URL when the MCP server is hosted remotely.

What tools does Divar MCP MCP provide in TypingMind?

Divar MCP exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use Divar MCP MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If Divar MCP requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇