statyba
# statyba-mcp
[](https://github.com/lietuva-mcp/statyba/actions/workflows/ci.yml)
Construction in Lithuania for Claude and any MCP client. Ask "what permits has the building 1192-5002-0018 had?",
"what is the energy class at Rotušės a. 1, Kaunas?" or "how worn is the block at Leipalingio g. 6A, Kaunas?", and it
reads the open data of Statybos sektoriaus vystymo agentūra (SSVA), Infostatyba's keeper, on get.data.gov.lt.
Zero dependencies: Node's own `fetch`, and nothing else.
---
## What it can do
| Tool | What it answers |
| --- | --- |
| `statyba_documents` | A building's, plot's, document's or address's construction documents in Infostatyba: building permits and the other documents allowing construction, the applications for them, completion declarations and acts, special requirements, notices of start of works. Each with its number, date, type, kind (application, document issued, awaiting approval), status, project, and the buildings it covers (unique number, name, purpose, category, works, year built, address, land plots). Newest first, up to 50. |
| `statyba_energy_certificates` | Energy performance certificates by certificate number, or at an address: the building's own and its flats'. Each with its energy class, purpose, heated area, the energy it counts for heating, CO2, heat sources, and issue and expiry dates. Up to 100, newest first. |
| `statyba_building_condition` | A building's condition as SSVA's buildings data bank assessed it, by address: its wear and risk scores, each element's service life and wear, and each inspection's scores by element and category. |
What a person can look up by, and why:
| Key | Documents | Certificates | Condition |
| --- | --- | --- | --- |
| A building's unique number (Real Estate Register) | yes | no: the certificates' data holds none | no: the data bank holds none |
| A plot's cadastral number | yes | no: none in the data | no: none in the data |
| A document's or certificate's number | yes | yes | — |
| An address (street and house number, and the town) | yes | yes | yes |
The API filters every one of these on its side, so no call reads a table through. Searching by a municipality alone is
left out: Infostatyba's 6.6 million rows would answer it with thousands of documents, and the address already names
the place.
The answer is Markdown: a heading naming what was searched and how many were found, the results as tables (a
building's scores as `**Label:** value` lines), `—` where the data gives no value, and the source on the last line.
A search that finds nothing is one sentence saying so.
What it does not do: name an owner, builder, applicant or certifying expert (the open data holds no owner or builder,
and the expert's number is left out), read SSVA's registers of qualified people and contractors (see below), or log
in to anything.
---
## 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 statyba -- npx -y @lietuva-mcp/statyba
```
**Claude Desktop**: Settings → Developer → Edit Config, and add:
```json
{
"mcpServers": {
"statyba": { "command": "npx", "args": ["-y", "@lietuva-mcp/statyba"] }
}
}
```
Any other MCP client: run `npx -y @lietuva-mcp/statyba` as a stdio server.
---
## How it treats the API
- **It says who it is.** Every request carries
`lietuva-mcp-statyba/<version> (+https://github.com/lietuva-mcp/statyba)` as its user agent.
- **It is paced.** At most one request every 250 ms, the first at once. A call whose turn is more than five seconds
off is refused, not queued. `statyba_documents` and `statyba_energy_certificates` are one request a call;
`statyba_building_condition` is three (the building, its elements' wear, its inspections). get.data.gov.lt's
robots.txt asks crawlers for five seconds between requests; this server is no crawler: it asks only when a person
does.
- **It waits for slow answers.** Infostatyba's table has no index its filters use, so the API reads all of it for each
search: 4 to 24 seconds a query (2026-11-28). A request is given 45 seconds.
- **It takes no for an answer.** The API fails a request with 500 now and then by itself (a page from its firewall
saying the request was blocked, the same request answering a moment later), so a 500, 502 or 504 is sent once more,
in its turn, and no more. A refusal (403, 429, 503, anything else) is reported and never retried. A redirect is
followed only on the API's own address, at most 3 times.
- **It keeps nothing.** No cookies, no cache: every answer 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.
robots.txt allows every path to all agents. data.gov.lt's terms forbid nothing an MCP server does: its regulation page
lists the laws and the privacy policy, and the datasets are CC BY 4.0.
---
## The data
| Tool | Dataset | Licence |
| --- | --- | --- |
| `statyba_documents` | [Statiniai ir su jais susiję dokumentai Lietuvos Respublikos statybos leidimų ir statybos valstybinės priežiūros informacinėje sistemoje „Infostatyba“](https://data.gov.lt/datasets/1000/) (`datasets/gov/ssva/infostatyba`), updated daily | CC BY 4.0 |
| `statyba_energy_certificates` | [Duomenys apie pastatų energinio naudingumo sertifikatus](https://data.gov.lt/datasets/2366/) (`datasets/gov/ssva/pen_sertifikatai`), updated monthly | CC BY 4.0 |
| `statyba_building_condition` | [Pastatų ir jų elementų rizikos bei nusidėvėjimo duomenų rinkiniai](https://data.gov.lt/datasets/4143/) (`datasets/gov/ssva/pastatu_duomenu_bankas`), updated weekly | CC BY 4.0 |
The licences were read on each dataset's page on data.gov.lt (2026-11-28), its "Licencija" line. Every answer carries
its attribution on its last line, such as `_Source: Statybos sektoriaus vystymo agentūra, Duomenys apie pastatų
energinio naudingumo sertifikatus (open data, data.gov.lt/datasets/2366), CC BY 4.0, read 2026-11-28._`. Pass it on
with what you use.
SSVA's other datasets are not read:
- its registers of contractors' certificates ([1314](https://data.gov.lt/datasets/1314/)), of construction managers
and technical supervisors ([1315](https://data.gov.lt/datasets/1315/)), of territorial planning managers
([1317](https://data.gov.lt/datasets/1317/)) and of energy certification experts
([2287](https://data.gov.lt/datasets/2287/)) are CC BY-NC-ND 4.0, which is no open licence, and all but the first
are about natural persons;
- its unformed state land ([3879](https://data.gov.lt/datasets/3879/), CC BY 4.0) has no cadastral number, being land
not yet formed into plots, and is found only by its shape on a map.
What to know about it:
- **Infostatyba's rows are a document, a building and a plot each.** The tool groups them: a document with every
building it covers, a building with every plot. Rows without a document number (14% of them, each only "awaiting
approval", 2026-11-28) name no document and are left out.
- **A plot's number is written three ways.** Infostatyba holds one plot as 2101/0010:1 and as 2101/0010:0001, and
others padded with underscores (…:166_); all three ways are asked for.
- **0000-0000-0000 is no building.** Infostatyba writes it on 359 rows of networks and other structures not yet
registered (2026-11-28), so it is refused as a unique number.
- **An address is matched by its words.** The datasets write addresses each their own way ("Alytus, Voveraičių g.
3", "Rotušės a. 1, Kauno m., Kauno m. sav.", "Kauno miesto sav., Kaunas, Leipalingio g. 6A, LT-46426"), so the
street and house number are matched as written, capitals included, and the place by each word's stem. A house number is not
the start of another: Šilo g. 39 is not 39A nor 391. A like-named place in the same municipality can still match:
every answer gives each address as the data writes it.
- **Typical flat certificates carry no figures.** 1 404 of 3 000 certificates sampled are marked a typical flat's
(tipinio buto), and every one has 0 for heating and CO2 and no heat source; they are answered as `—`.
- **The certificates' units are not given.** The open data names none for heating energy and CO2; they are as the
certificate writes them.
- **The data bank covers some 6 000 buildings** (6 133, 2026-11-28), and its scores are as it gives them: it says
nothing of their scale.
---
## Develop
```sh
pnpm install
pnpm test # node --test, against a fake of the API on 127.0.0.1 serving answers saved from it
pnpm typecheck
pnpm lint
pnpm build # dist/main.js, the published bundle
```
Contributing needs Node 24, which runs the TypeScript sources directly. The API's answers the tests serve are in
`fixtures/`, saved from get.data.gov.lt on 2026-11-28.
Not affiliated with Statybos sektoriaus vystymo agentūra.
## License
The code is MIT. The data it reads is CC BY 4.0, Statybos sektoriaus vystymo agentūra's.
TDQS
Scored across 3 tools
The three tools map to distinct datasets: construction documents/permits, energy performance certificates, and building condition assessments. There is mild overlap when an agent only has an address, since all three accept address-based lookups, but the descriptions make clear which dataset answers which question.
All three names follow the same snake_case `statyba_<dataset>` pattern, which is predictable and readable. The only deviation from the ideal is that they are noun phrases with no verb, though the tools are all read-only lookups so this is coherent.
Three tools for a single open-data domain split into three genuinely different datasets is well scoped and each earns its place. It is on the lean side, but combining these into one tool would hurt clarity more than it helps.
The three main Infostatyba datasets are covered, but the surface is purely identifier-based: there is no way to search a building register by name, filter documents by type or date range, or discover nearby records. An agent with only a vague query (e.g. all permits of a given type/year) hits a dead end.