Skip to main content
Glama
README.md
# nt-mcp

[![ci](https://github.com/lietuva-mcp/nt/actions/workflows/ci.yml/badge.svg)](https://github.com/lietuva-mcp/nt/actions/workflows/ci.yml)

Lithuania's Real Estate Register (Nekilnojamojo turto registras) for Claude and any MCP client. Ask "when was
building 64734229290313 built, and what are its walls?" or "what is land plot 34840309324 used for?", and it reads
Registrų centras' open data on get.data.gov.lt.

Zero dependencies: Node's own `fetch`, and nothing else.

---

## What it can do

| Tool | What it answers |
| --- | --- |
| `nt_building` | One building by its id: type and purpose, structure category, municipality and eldership, floors, the years its construction started and was completed and of any modernisation, energy performance class, areas in m², premises formed in it, utilities (heating, water supply, sewage, gas, hot water, electricity, stove, bathroom, ventilation) and the materials of its foundation, walls, partitions, roof, ceiling, floor, finishes, windows and doors. |
| `nt_land_plot` | One land plot by its id: purpose, municipality and eldership, area, land use in hectares (farming land and of it arable land, gardens, meadows; forest, roads, built-up land, water; other land and of it trees, swamps, damaged and unused land), drained and irrigated land, and the productivity score of its farming land. |

Values are the register's own Lithuanian names, every code decoded by the register's classifiers: walls `19` is
`Blokeliai`, energy class `1` is `A++`. A part the register does not describe is left out.

**The id is the open data's own.** The open data lists each building and plot under an id of its own, 11 to 17
digits, that no document carries. It does not publish unique numbers (unikalus Nr., such as `4400-1234-5678`),
addresses or owners, and the address register's open data does not link an address to a building or plot either
way. So a building cannot be looked up here by the number on its documents or by its address: asked for a unique
number, the tools say so. The ids are in the open data itself, at `datasets/gov/rc/ntr/ntr_pastatai` and
`datasets/gov/rc/ntr/ntr_zemes_sklypai` on get.data.gov.lt.

What it does not do: name owners (they are not in the open data), read premises or engineering structures, or log
in to anything. A plot's way of use (naudojimo būdas) is declared in the data but empty in every row, so it is not
answered.

---

## Install it

You need Node.js 22 or newer (`node --version`; get it from [nodejs.org](https://nodejs.org)).

**Claude Code**

```sh
claude mcp add nt -- npx -y @lietuva-mcp/nt
```

**Claude Desktop**: Settings → Developer → Edit Config, and add:

```json
{
  "mcpServers": {
    "nt": { "command": "npx", "args": ["-y", "@lietuva-mcp/nt"] }
  }
}
```

Any other MCP client: run `npx -y @lietuva-mcp/nt` as a stdio server.

---

## How it treats the API

- **It says who it is.** Every request carries `lietuva-mcp-nt/<version> (+https://github.com/lietuva-mcp/nt)` as
  its user agent.
- **It is paced.** At most one request every 250 ms, the first at once, as
  [lietuva-mcp/jar](https://github.com/lietuva-mcp/jar) found the same API needs. A call whose turn is more than
  five seconds off is refused, not queued. A building or plot is one request; the first call also reads the
  classifiers, six more.
- **It takes no for an answer.** The API fails a request with 500, 502 or 504 now and then by itself, so that one
  request is sent once more, in its turn, and no more. A refusal (403, 429, 503, a bot check, anything else) is
  reported and never retried. A redirect is followed only on get.data.gov.lt itself, at most 3 times.
- **It keeps almost nothing.** The register's classifiers (attribute values, object types, purposes,
  municipalities, elderships) are read once per process; every building and plot is asked for afresh.

Hosting it for other people? Set `LIETUVA_MCP_OPERATOR` to your name, such as `example.com`, and the user agent says
`operated by example.com`, so the API knows whose many requests come from your address.

---

## The data

The register is Registrų centras' open data, published on [get.data.gov.lt](https://get.data.gov.lt) under
[CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), as its pages on data.gov.lt say: the buildings
([1812](https://data.gov.lt/datasets/1812/)), the land plots ([1811](https://data.gov.lt/datasets/1811/)) and the
classifiers they are named by ([1895](https://data.gov.lt/datasets/1895/), [1896](https://data.gov.lt/datasets/1896/),
[1897](https://data.gov.lt/datasets/1897/)). Every answer carries its attribution in a `source` field, such as
`Registrų centras, Nekilnojamojo turto registras: datasets/gov/rc/ntr/ntr_pastatai, named by its classifiers and the
Adresų registras (open data, get.data.gov.lt, CC BY 4.0)`. Pass it on with what you use.

---

## Develop

```sh
pnpm install
pnpm test        # node --test, against a fake of the API on 127.0.0.1, serving answers saved from it in fixtures/
pnpm typecheck
pnpm lint
pnpm build       # dist/main.js, the published bundle
```

Contributing needs Node 24, which runs the TypeScript sources directly.

Not affiliated with Registrų centras.

## License

The code is MIT. The data it reads is CC BY 4.0, Registrų centras'.