Skip to main content
Glama
willhaben-mcp

willhaben-mcp

by Samxel

willhaben-mcp

一个 MCP 服务器,让 AI 可以搜索 willhaben.at 市场中的商品列表,并获取广告的完整详情。它封装了 willhaben 逆向工程的移动应用 API,并把这些的重要字段返回给 AI。

工具

search_willhaben(keyword, ...)

在市场中进行搜索。如果传入了 category,则 keyword 是可选的。

筛选条件:

  • category(id 或名称)

  • condition(全新、二手、翻新等)

  • clothing_size 和 shoe_size

  • color、pattern

  • brand

  • 地区、卖家类型、价格范围、Bag, PayLivery、最近 48 小时

  • 排序和分页

返回精简后的命中列表。

get_ad_detail(ad_id)

获取单个广告的一切信息:完整(未截断)的描述、所有图片、逐项属性、类别路径和精确位置。将它用在搜索返回的 id 上即可。

list_categories(query, parent_id)

为 category 过滤器查找类别 id。

  • query:按名称查找整个类别树

  • parent_id:向下浏览一层(两者都可填,以在逛根级类别)

完整类别树(约 3500 个类别)随服务器附在 category-tree.json 中。

search_brands(category, term)

品牌是类别特定的,并且每个类别的品牌有上百个,所以这是一个自动补全工具。传入类别和搜索词来获取匹配的品牌 id,然后将 id 交给 search_willhaben(brand=...)。

注意:condition、sizes、color、pattern 和 brand 都因类别而异;在宽泛的类别中使用它们可能会返回零结果,所以请先深入具体的子类别。

Related MCP server: marktplaats-mcp

设置

pip install -r requirements.txt

运行

python main.py

服务器通过 Streamable HTTP 启动,并打印它监听的地址:

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

将你的 MCP 客户端指向该 URL。主机、端口和路径位于 main.py 顶部。

备注

  • 详情 API 由静态应用令牌保护,并且只支持 HTTP/2。这两者都在 main.py 中处理。如果 willhaben 轮换令牌,请从应用的请求头中获取新令牌,并更新 WH_APPLICATION_TOKEN。

  • category-tree.json 是 willhaben 市场类别树(id、label、parentId、children)的构建快照。main.py 在启动时会加载它,用于 category 过滤器和 list_categories。如果分类发生了改变,请重新获取它。

  • API 的详细说明见 search_api.md。

  • 这里使用了 willhaben 的内部 API,而不是官方 API。请友好地对待它。

免责声明

这是一个独立、非官方的项目,与 willhaben 不存在从属、认可或关联关系。“willhaben”及所有相关商标均由其他所有者所有。

它的发布仅用于教育和研究目的。它访问的是 willhaben 的内部 API,该 API 并非面向公众使用,可能随时断开或变更。你需对使用方式负责:请遵循 willhaben 的服务条款、robots 规则以及适用法律,不要频繁冲击其服务器,也不要处理列表中的个人数据。本服务不提供任何保证;使用风险自负。

如果你是权利持有者,并且对此项目有疑问,请通过 issue 提出,我会及时进行回复。

许可证

MIT LICENSE。按“原样”提供,不附带任何保证。

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