Hemnet Mcp

io.github.chrischall由 GitHub 帳號 chrischall 發布v1.2.0更新於 Nov 7, 2026

Hemnet.se real estate for Claude: search, sold prices, listings & market stats

概覽

AI 產生的概覽

檢索瑞典最大房產入口網站 hemnet.se,讓助理查找待售與已售物件、取得詳細資料與照片、統計市場行情,並試算瑞典房貸月付。

可以做什麼
  • 將地名解析為 Hemnet 位置 id,將街道地址解析為待售物件
  • 依位置、價格區間、房間數、面積、物件型態與關鍵字搜尋待售物件
  • 取得單一物件完整資料與相簿照片連結,並最多 20 筆並排比較
  • 搜尋已售物件(slutpriser),含成交價、開價與高於或低於開價的百分比,並彙整中位數與平均行情
  • 在本機試算瑞典房貸月付,含攤還與稅後金額
  • 對 Hemnet GraphQL 端點與瀏覽器橋接進行健康檢查
適用情境
適合研究瑞典房地產市場:用成交價比較為房屋估價、篩選某區域物件、比較候選物件,或估算持有成本。僅針對 hemnet.se,只對瑞典房產有意義。
執行需求
透過 npx hemnet-mcp 在本機執行(需 Node.js)。匿名唯讀查詢不需登入或 API 金鑰。若 Hemnet 觸發 Cloudflare 驗證,預設 HEMNET_TRANSPORT=auto 會改用瀏覽器橋接,需要 Chrome 中的 ContextMint Bridge 擴充功能,並以 FETCHPROXY_IDENTITY_DIR、FETCHPROXY_WS_HOST、HEMNET_WS_PORT 設定本機身分與中繼埠。
安裝前請注意
查詢為唯讀,但瀏覽器橋接備援會從你自己瀏覽器中已登入的 hemnet.se 分頁送出相同查詢,並在 FETCHPROXY_IDENTITY_DIR 下存放長期身分金鑰對。擴充功能需以解壓方式載入發行檔,建議對照公布的雜湊值核對。專案由 AI 建置與維護,使用須遵守 hemnet.se 的服務條款。房貸試算僅為本機估算,不構成財務建議。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Hemnet Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

Hemnet MCP

[CI] [npm] [license]

An MCP server for hemnet.se, Sweden's largest real-estate portal. Search for-sale listings, look up sold prices (slutpriser), pull full listing detail and photos, compute market statistics, resolve addresses, and run a Swedish mortgage calculation — all from Claude.

⚠️ This project is built and maintained by AI (Claude). It reads hemnet.se through its public GraphQL API. Use at your own discretion and within hemnet.se's terms of service.

Highlights

  • No configuration. Hemnet serves its read queries anonymously — no login, no API key. npx hemnet-mcp just works (a browser extension is only needed if Hemnet serves a Cloudflare challenge — see below).
  • Sold prices (slutpriser). Hemnet's signature dataset: achieved final price, asking price, and over/under-asking percentage — the comps an agent needs to value a home.
  • Swedish-native. Money in SEK, areas in m², rooms, bostadsrätt fees (avgift), energy class, and a mortgage model that follows Swedish rules (amorteringskrav, ränteavdrag).
  • Embeddable. Ships as a standalone MCP server and as a library so it can be composed into a larger multi-portal server.

Install

Claude Code / Claude Desktop (npx)

json
{  "mcpServers": {    "hemnet": {      "command": "npx",      "args": ["-y", "hemnet-mcp"]    }  }}

If Hemnet serves a Cloudflare challenge

Hemnet sometimes fronts its GraphQL API with a Cloudflare bot challenge. When that happens the server switches (under the default HEMNET_TRANSPORT=auto) to a browser bridge that sends the same anonymous queries from a www.hemnet.se tab in your own browser — no Hemnet login needed. That needs the ContextMint Bridge extension, installed from its releases: in Chrome, unzip the chrome zip and load it unpacked, then approve the pairing prompt the first time. Safari isn't available yet (it will ship inside the ContextMint app, which has no public download), so use Chrome for now.

ContextMint Bridge is the fetchproxy browser extension under its new name, from the same maintainer — fetchproxy's own README (https://github.com/chrischall/fetchproxy#extension) points to it. Its source is public at https://github.com/nullnet-app/contextmint-bridge: build it yourself, or check a release zip against the .sha256 file published beside it (shasum -a 256 -c contextmint-bridge-chrome-<version>.zip.sha256).

From source

bash
git clone https://github.com/chrischall/hemnet-mcpcd hemnet-mcpnpm installnpm run buildnode dist/index.js

Tools

ToolWhat it does
hemnet_autocomplete_locationResolve a place name ("Vasastan") to Hemnet location ids — the starting point for search.
hemnet_search_listingsSearch active for-sale listings by location + filters (price SEK, rooms, m², property type, keywords).
hemnet_get_listingFull detail for one listing (price, fee, running costs, m², rooms, tenure, energy class, broker, description, photos).
hemnet_get_listing_photosJust the gallery photo URLs.
hemnet_search_soldSearch sold listings with final price, asking price, and over/under-asking %.
hemnet_get_sold_listingFull detail for one sold listing.
hemnet_get_market_statsMedian/average final price and price-per-m² for a location, over the most recent max_sales sales (default 200).
hemnet_compare_listingsFetch several listings at once for side-by-side comparison.
hemnet_get_by_addressResolve a free-text street address to a live listing.
hemnet_calculate_mortgageLocal Swedish monthly-cost calculator (interest + amortisation + fee, gross & after-tax). No network.
hemnet_healthcheckVerify the Hemnet GraphQL endpoint is reachable. Reports which transport served the probe (transport: direct fetch or the browser bridge, plus the configured HEMNET_TRANSPORT), the bridge's role/port/extension-link state (bridge, once a bridge exists), a classified error.kind (e.g. cloudflare_challenge, session_not_ready) and a next-step hint.

Example flow

1. hemnet_autocomplete_location { query: "Vasastan" }   → location_id 9259702. hemnet_search_listings { location_ids: ["925970"], rooms_min: 2, price_max: 6000000 }   → listing summaries3. hemnet_get_market_stats { location_ids: ["925970"], housing_form_groups: ["APARTMENTS"] }   → median final price, price-per-m²4. hemnet_calculate_mortgage { price: 4695000, interest_rate: 3.9, monthly_fee: 2800 }   → monthly cost, gross and after-tax

Or pass a free-text location to any search tool and it resolves the top hit for you.

Money & units

All output records use numbers: price / final_price / fee_monthly in SEK, living_area_sqm / land_area_sqm in m², rooms as a number. A derived price_per_sqm is always included when price and living area allow it (even when Hemnet omits it, common on houses). The original Hemnet-formatted strings are kept alongside as *_formatted.

Library use

hemnet-mcp is also importable, so it can serve as a Hemnet portal source inside a larger project (e.g. a cross-portal realty orchestrator):

ts
import { createHemnetClient, computeMarketStats } from 'hemnet-mcp';
const hemnet = createHemnetClient();const { cards } = await hemnet.searchSales({ locationIds: ['925970'] }, { limit: 50 });const stats = computeMarketStats(cards.map(formatSaleCard));

The library entry (import … from 'hemnet-mcp') re-exports the client, the normalised record types, the pure derivations (computeMarketStats, calculateSwedishMortgage, money/url helpers), and every tool registrar (registerHemnetTools(server, client) to graft the tools onto your own MCP server).

Development

bash
npm test               # vitest (mocked transport, no network)npm run test:coverage  # 100% coverage enforced on src/**npm run typechecknpm run build

Tests drive every tool and the client through an in-memory fake transport — no live hemnet.se calls. See CLAUDE.md for architecture, the GraphQL quirks, and contribution conventions.

License

MIT

來源:README.md,提交 1c70117

工具

11

hemnet_autocomplete_location

Resolve a place name to Hemnet location ids

Look up Hemnet location ids for a free-text place name (municipality, district, or area). Returns ranked hits with `location_id`, `full_name`, and `parent_full_name`. Feed a `location_id` into hemnet_search_listings / hemnet_search_sold. Read-only.

輸入參數limitquery必填

hemnet_search_listings

Search Hemnet for-sale listings

Search active for-sale property listings on hemnet.se by location and optional filters (price band in SEK, rooms, living area in m², property-type groups, keywords). Returns listing summaries with price, fee, m², rooms, price-per-m², and coordinates. Provide `location_ids` (from hemnet_autocomplete_location) or a free-text `location`. Read-only.

輸入參數sortlimitoffsetkeywordslocationprice_maxprice_minrooms_maxrooms_minlocation_idsliving_area_maxliving_area_min另有 1 個

hemnet_get_listing

Get a Hemnet for-sale listing by id or URL

Fetch the full detail of a single active for-sale listing by its Hemnet id or a /bostad/ URL. Returns price, monthly fee, yearly running costs, living/land area in m², rooms, tenure, construction year, energy class, broker, description, status labels, coordinates, and gallery photo URLs. For a SOLD listing use hemnet_get_sold_listing instead. Read-only.

輸入參數id必填photo_limit

hemnet_get_listing_photos

Get photo URLs for a Hemnet listing

Return the gallery photo URLs for an active for-sale Hemnet listing by id or /bostad/ URL. Read-only.

輸入參數id必填limit

hemnet_search_sold

Search Hemnet sold listings (slutpriser)

Search SOLD property listings ("slutpriser") on hemnet.se by location and optional filters. Each result carries the achieved final price, the asking price, and the over/under-asking percentage — the core comps signal for valuation. Provide `location_ids` (from hemnet_autocomplete_location) or a free-text `location`. Read-only.

輸入參數sortlimitoffsetkeywordslocationprice_maxprice_minrooms_maxrooms_minlocation_idsliving_area_maxliving_area_min另有 1 個

hemnet_get_sold_listing

Get a Hemnet sold listing by id or URL

Fetch the full detail of a single SOLD listing by its Hemnet id or a /salda/ URL. Returns final price, asking price, price change, m², rooms, tenure, broker, and coordinates. Read-only.

輸入參數id必填

hemnet_compare_listings

Compare several Hemnet listings

Fetch and normalise multiple active for-sale Hemnet listings at once (by id or /bostad/ URL) for side-by-side comparison. Up to 20 targets; input order preserved; per-row errors captured. Read-only.

輸入參數ids必填

hemnet_get_by_address

Resolve a street address to a Hemnet listing

Resolve a free-text Swedish street address to a live Hemnet for-sale listing. Give the `address` (street + number) and a `location` (city/area/municipality). Returns the matched listing with a `matched: true`, the match `score`, and `matched_via`, or `{ resolved: false }` when nothing matches. Scans up to 500 listings in the location; a miss with `truncated: true` is not definitive — pass price_min/price_max or a smaller location to narrow it. Read-only.

輸入參數address必填location必填price_maxprice_min

hemnet_get_market_stats

Hemnet sold-price market statistics

Aggregate median/average statistics from recent SOLD listings for a location (and optional property-type/size filters): median & average final price, median & average price-per-m², and average over/under-asking percentage. The stats cover the most recent `max_sales` sales (default 200, max 500), not necessarily every match — compare `sampled_sales` with `total_matching_sales`. Provide `location_ids` or a free-text `location`. Read-only.

輸入參數sortlimitoffsetkeywordslocationmax_salesprice_maxprice_minrooms_maxrooms_minlocation_idsliving_area_max另有 2 個

hemnet_calculate_mortgage

Calculate a Swedish monthly mortgage cost

Local-only Swedish mortgage calculator (all amounts SEK). Returns the monthly cost broken into interest, mandated amortisation (amorteringskrav from LTV, rules as of 1 April 2026), BRF fee (avgift), and operating cost — with both gross and after-tax (ränteavdrag) totals. Provide `down_payment` OR `down_payment_percent` (defaults to the legal 10% minimum). No network call.

輸入參數price必填monthly_feedown_paymentinterest_rate必填amortization_rategross_yearly_incomedown_payment_percentmonthly_operating_cost

hemnet_healthcheck

Verify the ContextMint Bridge connection end-to-end

Round-trips a small public www.hemnet.se URL (/graphql) through ContextMint Bridge (your signed-in browser tab) and returns diagnostics: the bridge's role (host/peer/null), port, version, the extension link (linked / pair pending / not attached / never answered), the elapsed round-trip time, and a plain-English hint distinguishing 'bridge never came up' from 'extension not connected' from 'this browser can't serve a capability' from 'real www.hemnet.se-side problem'. Read-only, no auth required. Call this when a real tool fails and you want to know which hop broke.

無需輸入參數。

版本歷史

19
  1. v1.2.0最新Nov 4, 2026
  2. v1.1.15Oct 29, 2026
  3. v1.1.14Oct 20, 2026
  4. v1.1.13Oct 17, 2026
  5. v1.1.12Oct 16, 2026
  6. v1.1.11Oct 10, 2026
  7. v1.1.10Oct 7, 2026
  8. v1.1.9Oct 5, 2026
  9. v1.1.8Oct 3, 2026
  10. v1.1.7Oct 1, 2026
  11. v1.1.6Sep 28, 2026
  12. v1.1.5Sep 25, 2026
  13. v1.1.4Sep 23, 2026
  14. v1.1.3Sep 23, 2026
  15. v1.1.2Sep 21, 2026
  16. v1.1.0Sep 20, 2026
  17. v1.0.0Sep 19, 2026
  18. v0.6.5Sep 17, 2026
  19. v0.6.4Sep 16, 2026

評分

已滿足適用檢查項的 90%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分