yad2-mcp
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
yad2-mcp
An MCP (Model Context Protocol) server that lets AI assistants search real estate listings on yad2.co.il — Israel's largest property marketplace.
How it works
Yad2 uses Radware/ShieldSquare bot protection. This server uses a headless Chromium browser via patchright (a CDP-leak-patched Playwright fork) to clear the bot challenge, load the page, and extract listing data from the Next.js SSR payload (__NEXT_DATA__) embedded in the HTML.
Related MCP server: German Real Estate MCP Server
Tools
Tool | Description |
| Search rental listings by city, rooms, price, size, floor, property type |
| Search for-sale listings with the same filters |
| Get full details of a specific listing by its token |
| List city codes to use in searches (filterable by name) |
Search parameters
All search tools accept these optional parameters:
Parameter | Type | Example | Description |
| string |
| City code — use |
| string |
| Room range (e.g. |
| number |
| Minimum price in ILS |
| number |
| Maximum price in ILS |
| number |
| Minimum size in m² |
| number |
| Maximum size in m² |
| string |
| Floor range ( |
| string |
| One of: |
| number |
| Page number (default: 1) |
| number |
| Results per page (default: 20, max: 40) |
Common city codes
Code | City |
| Tel Aviv-Yafo |
| Haifa |
| Jerusalem |
| Beer Sheva |
| Netanya |
| Rishon LeZion |
| Herzliya |
| Raanana |
| Kfar Saba |
| Modi'in |
Use the list_city_codes tool with a filter param to search others (e.g. filter: "haifa").
Installation & setup
Prerequisites
Node.js 20+
Git
1. Clone and install
git clone https://github.com/Guy2co/yad2-mcp.git
cd yad2-mcp
npm install
npx patchright install chromium
npm run build2. Add to Claude Code
Edit ~/.claude/mcp.json (create it if it doesn't exist):
{
"mcpServers": {
"yad2": {
"type": "stdio",
"command": "node",
"args": ["/absolute/path/to/yad2-mcp/dist/index.js"]
}
}
}Restart Claude Code. The yad2_* tools will appear automatically.
3. Add to Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS):
{
"mcpServers": {
"yad2": {
"command": "node",
"args": ["/absolute/path/to/yad2-mcp/dist/index.js"]
}
}
}Restart Claude Desktop.
4. Use with any MCP-compatible client
The server speaks the MCP stdio transport — it reads JSON-RPC from stdin and writes to stdout. Any MCP client can connect to it with:
command: node /path/to/yad2-mcp/dist/index.jsStructured output
Every listing-returning tool (search_rentals, search_for_sale, search_cars,
get_listing) returns its data twice: as rendered markdown in content[0].text, and as
JSON in structuredContent. Programmatic consumers should read structuredContent —
the markdown search results omit neighborhood, coordinates, contactPhone and
images, and truncate description to 200 characters.
The search tools return { listings, total, page, pageSize }; get_listing returns a
bare listing object. A real-estate listing is:
{
"id": "abc123", "token": "abc123",
"title": "דירה 3 חדרים בתל אביב",
"price": 7500, "currency": "ILS",
"rooms": 3, "floor": 2, "size": 75,
"propertyType": "דירה", // yad2's own label; "" when absent
"address": "הלל 5, פלורנטין, תל אביב",
"city": "תל אביב", "neighborhood": "פלורנטין",
"description": "...", // full text, untruncated
"images": ["https://img.yad2.co.il/..."],
"url": "https://www.yad2.co.il/realestate/item/abc123",
"date": "2024-01-15", // yad2's raw dateAdded string — format is not guaranteed
"contactName": "דוד", "contactPhone": "052-0000000",
"coordinates": { "lat": 32.06, "lng": 34.77 }
}price, rooms, floor, size, contactName, contactPhone and coordinates are
null when yad2 omits them or sends a non-numeric value (ground floors arrive as the
Hebrew word "קרקע", which normalizes to floor: null).
No tool declares an MCP outputSchema, deliberately. A declared schema is a hard
validation gate on both the server and the client, so one unexpected value in a scraped
payload would fail the entire call rather than degrading a single field. Validate the
shape on your side and skip rows you can't parse.
Example usage
Once the MCP server is connected to your AI assistant, you can ask it naturally:
"Find me 2-3 room apartments for rent in Tel Aviv under ₪8,000/month"
The assistant will call search_rentals with:
{
"city": "5000",
"rooms": "2-3",
"priceMax": 8000
}"Show me penthouses for sale in Herzliya between ₪3M and ₪6M"
{
"city": "5100",
"propertyType": "penthouse",
"priceMin": 3000000,
"priceMax": 6000000
}"Get details for listing abc123"
{ "token": "abc123" }Development
npm run build # compile TypeScript
npm run dev # run with ts-node (no compile step)
npm run lint # check for lint errors
npm run lint:fix # auto-fix lint errors
npm run format # format with Prettier
npm run format:check # check formatting without writing
npm test # run unit tests
npm run test:e2e # run e2e tests (spawns the server subprocess)
npm run test:coverage # run unit tests with coverage reportA pre-commit hook runs eslint --fix, prettier --write, and npm test automatically on staged files.
Code style
This project enforces strict standards suitable for open-source:
Max 15 lines per function — keeps logic composable and readable
Explicit return types on all functions
No
any— everything is explicitly typedNo deprecated APIs —
@typescript-eslint/no-deprecatedcatches stale SDK usageimport typefor type-only imports===always — no loose equalityPrettier for consistent formatting (single quotes, 100-char width, trailing commas)
Architecture
src/
├── index.ts MCP server entry point — wires McpServer to tools and transport
├── tools.ts Zod schemas defining the MCP API surface (tool inputs)
├── handlers.ts Tool handler functions (search, get listing, list cities)
├── yad2-client.ts Playwright-based client for yad2.co.il
├── browser.ts Headless browser helpers (launch, navigate, extract __NEXT_DATA__)
├── parser.ts Pure functions for parsing yad2 feed/item data into Listing objects
├── query-builder.ts Pure functions for building yad2 URL query parameters
├── formatters.ts Pure functions for formatting results as markdown
└── types.ts Shared TypeScript interfacesThe client:
Launches a headless Chromium browser with a realistic user agent
Navigates to the relevant yad2 page
Waits for the
__NEXT_DATA__script tag (Next.js SSR payload) to be attached to the DOMExtracts and parses the dehydrated React Query state containing the listing feed
Returns structured
Listingobjects
CI / Publishing
GitHub Actions runs on every push and PR:
TypeScript build
ESLint
Prettier format check
Unit tests
E2E tests
On push to main/master, it also publishes to GitHub Packages as @guy2co/yad2-mcp.
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Read-only public data from semerenkogroup.com: Israel real estate listings, guides, market data.
Real estate agency CRM: listings, clients, leads and viewings from your AI assistant (OAuth).
Pull property listings, prices, and details from real-estate sites as structured JSON.
US property search and full listing detail (Redfin-sourced) as agent tools.
Related MCP Servers
- AlicenseCqualityDmaintenanceEnables access to Idealista API for searching and retrieving property listings across Spain, Portugal, and Italy. Supports various property types including homes, apartments, garages, commercial properties, offices, and land with detailed filtering options.143MIT
- FlicenseNot gradedqualityNot gradedmaintenanceEnables AI agents to search for German property listings (rent/buy) on immowelt.de with structured JSON output, no API key required.-
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to search and retrieve Yad2 real estate listings (for rent or sale) using MCP tools, with data scraped via GitHub Actions and served from a Cloudflare D1 database.MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to query and analyze Israeli real estate data from the Govmap API, including searching for property deals, market trends, and address autocomplete.MIT