bbr-mcp
An MCP server for Danish buildings and addresses. It lets a model:
- find an address from free text,
- look up the address's details and coordinates,
- read the BBR buildings and units registered there: use, year built, areas, materials, heating installation and medium, housing type, rooms, and more. Code values come with their official Danish text.
It calls the official services live on each request:
| Data | Service | Credential |
|---|---|---|
| Addresses (DAR) | Adressevælger, Klimadatastyrelsen's replacement for DAWA autocomplete | none |
| Buildings and units (BBR) | Datafordeler GraphQL, BBR/v3 |
DATAFORDELER_API_KEY |
It uses no DAWA (closed in 2026) and no legacy Datafordeler REST or username/password login (both end 15 January 2027).
Tools
| Tool | Input | Returns |
|---|---|---|
address_search |
text, level (adresse or husnummer), limit |
DAR ids and labels of the matching addresses |
address_get |
id of a unit address or a husnummer |
full address, postcode, municipality and road code, husnummer id, coordinates |
buildings |
one of husnummer_id, address_id, building_id, jordstykke_id; limit |
BBR buildings (byg0xx fields) |
units |
one of address_id, building_id, unit_id; limit |
BBR units (enh0xx fields) |
buildings_in_area |
an area (bbox, polygon_wkt, center + radius_m, or around_address_id + radius_m), crs (25832 or 4326); filters uses, heating, heating_medium; include_not_existing; limit |
a summary of the buildings (by use, heating installation, heating medium, supplementary heat and year built, total areas) and a compact list |
buildings_for_addresses |
addresses (free text) or husnummer_ids, at most 200; include_units |
each address's match (with exact and alternatives) and buildings, plus a summary over all of them |
Area and list notes:
-
Size limits. An area may be up to 25 km² and up to 10,000 buildings. A radius may be up to 2.5 km.
-
Coordinates. WGS84 longitude/latitude is converted to EPSG:25832 locally, because BBR's spatial filter takes only its own coordinate system.
-
Filters. BBR can filter on use and status itself. It has no heating filter, so
heatingandheating_mediumapply to the fetched buildings. A building whose heating is registered on its units (code 99) doesn't match them. -
Address matching. Free-text addresses go through Adressevælger, and
exactsays whether the match is the same address written differently. Check non-exact matches before relying on them. -
Coded fields come as
{"code": "1", "text": "Fjernvarme/blokvarme"}, and empty fields are left out. -
Coordinates are EPSG:25832 (ETRS89 / UTM 32N, metres).
-
Every BBR query asks for the data as registered and valid now.
-
resultsandcounthold only buildings and units that stand now (status6 Opført). BBR keeps demolished buildings (status10 Historisk), and also holds planned, under-construction and shelved ones. These are listed apart innot_existing, each with astate. Objects registered by mistake (11 Fejlregistreret) are only counted.
Building states
BBR's own values are never changed. Every row keeps its status code and official text. state and the grouping
are this server's reading:
| Status | state |
Basis |
|---|---|---|
| 6 Opført | in results |
BBR D0130 Logisk Intern Datamodel, section 3.2 |
| 2 Projekteret | planned | D0130 |
| 3 Under opførsel | under construction | D0130 |
| 10 Historisk | demolished or otherwise ceased | D0130: "ved nedrivning af en bygning sættes status til historisk" |
| 14 Henlagt | shelved, never built | D0130 |
| 11 Fejlregistreret | only counted | D0130: registered by mistake |
| 9 Afsluttet | closed without being built | inferred: in a November 2026 sample, no status-9 building had a year built |
| 13 Delvis afsluttet | partly completed, may be partly in use | inferred: most have a year built and heating. D0130 does not list this status for buildings, but BBR uses it. |
| 12 Midlertidig afsluttet | status unclear | not defined in D0130, and mixed in the data |
Setup
- Create an IT-system with an API key in Datafordeler Administration. A new key takes about 15 minutes to become active.
- Install uv.
- Add the server to your MCP client, for example Claude Code:
claude mcp add bbr -e DATAFORDELER_API_KEY=<key> -- uvx bbr-mcp
Or in a JSON client config:
{
"mcpServers": {
"bbr": {
"command": "uvx",
"args": ["bbr-mcp"],
"env": { "DATAFORDELER_API_KEY": "<key>" }
}
}
}
| Environment variable | |
|---|---|
DATAFORDELER_API_KEY |
required for the BBR tools |
ADRESSEVAELGER_TOKEN |
optional. Adressevælger has no user accounts yet and asks everyone to send adressevaelger123, the default. Set your own token once accounts arrive. |
bbr-mcp --self-test checks the installation offline: the tools are registered and the code lists translate.
Development
uv sync
uv run ruff check
uv run ruff format --check
uv run pytest # offline, HTTP mocked
cp .example.env .env # then fill in DATAFORDELER_API_KEY
set -a; . ./.env; set +a; uv run pytest -m live
uv run scripts/update_codes.py # refresh src/bbr_mcp/codes.json from teknik.bbr.dk
Data and licences
The code is MIT-licensed. The data keeps its own terms:
- BBR: Bygnings- og Boligregistret (BBR), CC BY 4.0. The code lists come from teknik.bbr.dk/kodelister.
- DAR: Danmarks Adresseregister, Klimadatastyrelsen, CC BY 4.0.
Credit these sources when you share results. Every tool result carries a source line for this.
Related
boligmcp (MIT) is a much broader property-report MCP server over the same services: ownership, valuation, sales, plans and more. This project covers only addresses, buildings and units.
Metadata
Release files for bbr-mcp 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| bbr_mcp-0.1.1.tar.gz | 95.6 kB | With provenance | Details for bbr_mcp-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bbr_mcp-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for bbr_mcp-0.1.1-py3-none-any.whl |
Total release size: 121.5 kB
Release files / bbr_mcp-0.1.1.tar.gz
| Download URL | bbr_mcp-0.1.1.tar.gz |
|---|---|
| Size | 95.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
98c81454a5fe7e9025077c467f7851bda0c5118b3c53e659399833d1622ab940
|
|
BLAKE2b-256 checksum How to use checksums |
8192dcd8f291cac9d7cb4f7e06a56cc9148a02b0752bee38a4203cbc291dfefe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.
Transparency logRelease files / bbr_mcp-0.1.1-py3-none-any.whl
| Download URL | bbr_mcp-0.1.1-py3-none-any.whl |
|---|---|
| Size | 26.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b3d286d3af6cfaa1e392ef01c0ea7a25186e46b666ff6eda1f515bfb125f81b8
|
|
BLAKE2b-256 checksum How to use checksums |
f5079094d4d5cd77e322a8ff1e6a392c70fdd04ca249ee826237ae00806e20a4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.
Transparency logSecurity for bbr-mcp 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for bbr_mcp-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 24, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.