Skip to main content
Glama
willhaben-mcp

willhaben-mcp

by Samxel

willhaben-mcp

Un servidor MCP que permite a una IA buscar en los anuncios del mercado de willhaben.at y obtener los detalles completos de los anuncios. Envuelve la API de la aplicación móvil de willhaben, obtenida mediante ingeniería inversa, y devuelve los campos importantes a la IA.

Herramientas

search_willhaben(keyword, ...)

Busca en el mercado. keyword es opcional si se pasa una category.

Filtros:

  • category (id o nombre)

  • condition (nuevo, usado, reacondicionado, ...)

  • clothing_size y shoe_size

  • color, pattern

  • brand

  • región, tipo de vendedor, rango de precios, PayLivery, últimas 48 h

  • ordenación y paginación

Devuelve una lista recortada de resultados.

get_ad_detail(ad_id)

Todo sobre un anuncio: la descripción completa (sin truncar), todas las imágenes, los atributos detallados, la ruta de categoría y la ubicación exacta. Ejecútalo con un id que hayas obtenido de una búsqueda.

list_categories(query, parent_id)

Busca ids de categoría para el filtro category.

  • query: busca en todo el árbol por nombre

  • parent_id: navega un nivel hacia abajo (omite ambos para las categorías de nivel superior)

El árbol completo (~3500 categorías) se incluye con el servidor en category-tree.json.

search_brands(category, term)

Las marcas son específicas de cada categoría y hay más de 1000 por categoría, por lo que esto es un autocompletado. Pasa una categoría y un término de búsqueda para obtener los ids de marca coincidentes y luego entrega un id a search_willhaben(brand=...).

Nota: el estado, las tallas, el color, el patrón y la marca dependen de la categoría. Aplicarlos en una categoría amplia puede devolver cero resultados, así que profundiza primero en una subcategoría específica.

Related MCP server: marktplaats-mcp

Configuración

pip install -r requirements.txt

Ejecutar

python main.py

El servidor se inicia mediante HTTP de transmisión e imprime dónde está escuchando:

Starting willhaben-mcp server on http://127.0.0.1:8000/mcp

Apunta tu cliente MCP a esa URL. El host, el puerto y la ruta se encuentran en la parte superior de main.py.

Notas

  • La API de detalles está protegida por un token de aplicación estático y solo admite HTTP/2. Ambos se gestionan en main.py. Si willhaben rota el token, toma uno nuevo de las cabeceras de solicitud de la aplicación y reemplaza WH_APPLICATION_TOKEN.

  • category-tree.json es una instantánea generada del árbol de categorías del mercado de willhaben (id, label, parentId, children). main.py lo carga al inicio para el filtro category y para list_categories. Vuelve a rastrearlo si la taxonomía cambia.

  • Los detalles de la API están documentados en search_api.md.

  • Esto utiliza la API interna de willhaben, no una oficial. Sé amable con ella.

Este es un proyecto independiente y no oficial que no está afiliado, respaldado ni conectado con willhaben. "willhaben" y todas las marcas comerciales relacionadas pertenecen a sus respectivos propietarios.

Se publica únicamente con fines educativos y de investigación. Se comunica con la API interna de willhaben, que no está pensada para uso público y puede romperse o cambiar en cualquier momento. Eres responsable de cómo la uses: respeta los Términos de servicio de willhaben, las reglas de robots y la legislación aplicable, y no satures sus servidores ni proceses datos personales de los anuncios. Sin garantía de ningún tipo; úsalo bajo tu propio riesgo.

Si eres titular de derechos y tienes algún problema con este repositorio, abre un issue y responderé con prontitud.

Licencia

MIT LICENSE. Proporcionado "tal cual", sin garantía.

Available Tools

11 tools
get_ad_detailA
Read-only

One ad in full: the complete description (also when the app API cuts it), condition, attributes, category, location and image_count. To compare several, pass up to 10 ids instead; they come back as {count, ads, failed}.

It is the only place that says how an item changes hands: handover ("Selbstabholung", "Versand") with ships and pickup_only.

Args: ad_id: The ad id from a search. ids: Several ad ids, instead of ad_id.

Inputs: ids, ad_id.

get_ad_imagesA
Read-only

The ad's photos as images you can look at, up to max_images (at most 10). Use them whenever the answer depends on what the item looks like: condition, damage, completeness, or details only a picture shows, such as a label or a screen.

Args: ad_id: The ad id from a search. max_images: How many photos to fetch. Default 4. detail: "low" (300x400, enough for condition and completeness) or "high" (900x1200, about nine times the tokens) to read small print such as a label, serial number or screen.

Inputs: ad_id (required), detail, max_images.

get_ad_sellerA
Read-only

Who sells an ad: name, private or dealer, rating and reply time for private sellers, member since, and location. For a trust check the ad itself does not answer.

Args: ad_id: The ad id from a search.

Inputs: ad_id (required).

list_car_makesA
Read-only

List car make ids for search_autos.

Args: query: Part of the make name. limit: At most 100. Default 60.

Inputs: limit, query.

list_car_modelsA
Read-only

List the models of a car make, for the model filter of search_autos.

Args: make: Make id or name.

Inputs: make (required).

list_categoriesA
Read-only

Find category ids for search_willhaben. Returns {count, categories: [{id, path, has_children}]}.

Args: query: Part of a category name; searches the whole tree. parent_id: List the subcategories of this id. Omit both for the top level. limit: At most 100. Default 50.

Inputs: limit, query, parent_id.

list_immobilien_typesB
Read-only

List the property types for search_immobilien.

Inputs: no named parameters.

search_autosA
Read-only

Search used cars. Everything is optional.

Prefer the structured filters to keyword: they match exact fields, a keyword searches the free text. Use a keyword for what has no filter, such as a chassis code ("E39") on top of make and model.

Hits name make and model and give power as power_kw and power_ps. willhaben tops a make search with a paid listing whatever the filters say; hits outside the requested ranges are dropped and counted in dropped_off_filter.

exclude, require and hide_reserved work as in search_willhaben and page on until rows cars pass, e.g. exclude=["motorschaden", "export", "bastler"]. Car hits carry no description, so require only looks at the title here.

Args: make: Make id or name, see list_car_makes. model: Model id or name, e.g. "3er-Reihe"; needs make. keyword: Free-text words. car_type: e.g. "Kombi / Family Van", "SUV / Geländewagen". fuel: e.g. "Diesel", "Benzin", "Elektro", "Hybrid Elektro/Benzin". transmission: "Automatik" or "Schaltgetriebe". wheel_drive: "Allrad", "Hinterrad" or "Vorderrad". condition: e.g. "Gebrauchtwagen", "Neuwagen", "Oldtimer". color: Exterior colour, e.g. "Schwarz". dealer: "Händler" or "Privat". equipment: e.g. "Sitzheizung vorne", "Anhängerkupplung". price_from / price_to: EUR. year_from / year_to: First registration. mileage_from / mileage_to: Kilometres. power_from / power_to: kW, not PS (150 PS is 110 kW). warranty / condition_report: Only cars with a warranty / a current "Pickerl" (§57a). last_48h: Only ads from the last two days.

Inputs: area, fuel, make, rows, +26 more.

search_brandsA
Read-only

Find brand ids for the brand filter of search_willhaben. Brands depend on the category and there can be thousands, so pass a term. Broad top categories may have no brand filter at all.

Args: category: Category id or name; a specific one works best. term: Part of the brand name, e.g. "nik". limit: At most 100. Default 40.

Inputs: category (required), term, limit.

search_immobilienA
Read-only

Search real estate. property_type picks buy or rent and the kind of property; everything else is optional, and filters that do not fit the type are ignored by willhaben.

Hits carry price_amount and price_per_m2 next to living_area_m2, plot_area_m2, rooms, floor, district and address.

exclude, require and hide_reserved work as in search_willhaben, e.g. exclude=["befristet", "provision"]. Property hits carry no description, so require only looks at the title here.

Args: property_type: Id or name from list_immobilien_types, e.g. "Wohnung mieten", "Haus kaufen", "Grundstücke". Default "Alle Immobilien". keyword: Free-text words. object_type: e.g. "Einfamilienhaus", "Dachgeschosswohnung". rooms: "1" to "5", "6-9" or "10+". features: e.g. "Garage", "Keller", "Einbauküche". outdoor: e.g. "Balkon", "Terrasse", "Garten". price_from / price_to: EUR; rent or purchase price, depending on the type. area_from / area_to: Living area in m². plot_from / plot_to: Plot area in m². postcode: Exact postcodes, e.g. "1070" or "6020"; checked on each hit, so pair one outside Vienna with area or district. last_48h: Only ads from the last two days.

Inputs: area, rows, rooms, offset, +18 more.

search_willhabenA
Read-only

Search the willhaben marketplace. Needs a keyword, a category or both.

A bare keyword matches the whole ad text and drags in accessories and spare parts, so scope to a category when you can. willhaben ignores punctuation: "???" in a keyword matches nothing, so write "drei fragezeichen".

Put the model in keyword and every spec in require. Sellers write "128GB", "128 GB" or leave it out of the title, so keyword="iPhone 13", require=["128gb"] finds what keyword="iPhone 13 128 GB" misses.

These filters run here, paging on until rows matches turn up or 250 ads were scanned (scanned):

  • title_only: every keyword word must be in the title.

  • require: every term must be in the title or description; a number with its unit matches however it is spelled.

  • exclude: drop titles carrying any of these words, e.g. ["pro", "max"] to keep a base model clean of its trim levels. A word also hits the tail of a compound ("kabel" in "Ladekabel"), never a prefix ("pro" spares "Prozessor"). If variants turn up, search again with them excluded rather than dropping rows yourself.

  • hide_reserved: drop reserved and sold ads.

  • handover ("versand" / "abholung"): costs one detail request per candidate, at most 40 (detail_lookups). paylivery is a payment method, not shipping.

Don't exclude ordinary nouns like "case" or "akku", real listings use them too ("Akku 100%"). Keep accessories out with price_from at about 15-20% of the product's real price instead.

Args: keyword: Search words. category: Category id or name; includes its subcategories. condition: "neu", "neuwertig", "generalueberholt", "gebraucht", "defekt" or "ausstellungsstueck". clothing_size / shoe_size: e.g. "38", "46 / S" or "42"; clothing and shoe categories only. color / pattern: willhaben's colours and patterns, mostly fashion. brand: Brand id(s) from search_brands. seller: "privat" or "haendler". price_from / price_to: Price bounds in EUR. last_48h: Only ads from the last two days.

Inputs: area, rows, brand, color, +19 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 11 tools

    Disambiguation4/5

    The three search tools are domain-scoped (real estate, cars, general marketplace) and their descriptions make the intent reasonably clear. There is mild overlap since real estate and cars are also marketplace categories, so an agent could plausibly route to search_willhaben instead of the specialized tools, but the structured filters signal the distinction.

    Naming Consistency4/5

    Consistent verb_noun pattern throughout: search_*, list_*, get_ad_*. Minor deviation is the mixed German/English domain nouns (search_immobilien, search_autos, search_willhaben), but the structural convention itself is predictable and readable.

    Tool Count5/5

    Eleven tools is well within the ideal range, and each earns its place: three scoped searches, three ad-inspection tools, and five taxonomy/lookup helpers. Nothing feels redundant or bloated.

    Completeness4/5

    Covers search, detail, images, seller and the needed taxonomy helpers (categories, brands, immobilien types, car makes/models), so core browse-and-inspect workflows have no dead ends. Minor asymmetry: real estate gets only a type list while cars get makes and models, and there are no watchlist or seller-contact operations, but these are reasonable outside a read-only search scope.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Enables searching Austria's largest classifieds marketplace (willhaben.at) for real estate, cars, jobs, and second-hand items via natural-language queries and structured filters, with full listing details.
      7
      3
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables AI assistants to search Kleinanzeigen listings by keyword, category, location, price and seller type, with extra server-side filtering for title matches and required or excluded terms. It also retrieves full ad details, downloadable photos for visual inspection, category attributes, and seller reputation information.
      7
      6
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Lets AI tools search Facebook Marketplace listings by query, location, price, condition, and other filters, and fetch full listing details such as seller info, photos, and delivery options.
      MIT