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)
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
Tools
Example flow
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):
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
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