regitra-mcp
# regitra-mcp
[](https://github.com/lietuva-mcp/regitra/actions/workflows/ci.yml)
Statistics on Lithuania's registered vehicles and vehicle transactions for Claude and any MCP client. Ask "how many
Toyota RAV4s are registered in Lithuania?" or "how were October's vehicle sale contracts paid?", and it asks AB
„Regitra“'s open data on get.data.gov.lt to count them.
It answers counts only, which the API computes itself: never a vehicle, a document or a person.
Zero dependencies: Node's own `fetch`, and nothing else.
---
## What it can do
| Tool | What it answers |
| --- | --- |
| `regitra_vehicle_count` | How many vehicles the register holds with a plate, of a make, a model or both, the name matched anywhere in Regitra's (by default) or exactly. |
| `regitra_transaction_count` | How many transaction documents (sale contracts, invoices, gifts, inheritances and the rest) were issued, by kind, days of issue, country, currency, payment method and amount; with `by: "payment_method"`, the count for each payment method too. |
The answer is Markdown: a heading naming what was counted, the count and each filter given as `**Label:** value`
lines, the breakdown by payment method as a table, and the source, the dataset and its licence, on the last line.
Values are in Lithuanian, as Regitra writes them.
What it does not do, because the API cannot without reading a whole table: add amounts up (it has no `sum`), list
the models of a make or group by any field (it has no grouping or `distinct`), or tie a transaction to the vehicle's
make or model (the dataset holds neither). It never reads a row.
---
## 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 regitra -- npx -y @lietuva-mcp/regitra
```
**Claude Desktop**: Settings → Developer → Edit Config, and add:
```json
{
"mcpServers": {
"regitra": { "command": "npx", "args": ["-y", "@lietuva-mcp/regitra"] }
}
}
```
Any other MCP client: run `npx -y @lietuva-mcp/regitra` as a stdio server.
---
## How it treats the API
- **It says who it is.** Every request carries
`lietuva-mcp-regitra/<version> (+https://github.com/lietuva-mcp/regitra)` as its user agent.
- **It asks for counts only.** Every request is a `count()` with filters, answered by the API as one number; no
row, and so no identifier, ever reaches this server. A count is one request; a breakdown by payment method is five,
one after another.
- **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. get.data.gov.lt's robots.txt allows every path and asks crawlers for 5 seconds
between requests; this server crawls nothing, and asks only for the counts a question needs.
- **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 nothing.** No login, no cookies, no cache: every count 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
| Tool | Dataset | Licence |
| --- | --- | --- |
| `regitra_vehicle_count` | [Transporto priemonių valstybiniai numeriai pagal markę ir modelį](https://data.gov.lt/datasets/2749/) (`datasets/gov/regitra/ktpr`, model `ValstybinisNumeris`), updated daily | CC BY 4.0 |
| `regitra_transaction_count` | [Transporto priemonių sandorių duomenys](https://data.gov.lt/datasets/2812/) (`datasets/gov/regitra/tpsais`, model `Sandoris`), updated daily | CC BY 4.0 |
Both are AB „Regitra“'s data, published by Valstybės duomenų agentūra. The licences were read on 2026-11-28 on each
dataset's data.gov.lt page and on the EU's data portal, which lists the same licence for each
([2749](https://data.europa.eu/data/datasets/https-data-gov-lt-datasets-2749-~~1),
[2812](https://data.europa.eu/data/datasets/https-data-gov-lt-datasets-2812-~~1)). Pass each answer's source line
on with what you use.
data.gov.lt links no terms of use of its own beyond each dataset's licence.
Regitra's third dataset on the API, valid driving licences (`datasets/gov/regitra/ktpvr`), is pseudonymised data
about people; this server does not read it at all.
What to know about it:
- **The vehicle dataset is a plate, a make and a model, nothing more.** One row per plate, the plate itself masked
(`XXX000`); no year, fuel, colour, owner or place. Regitra does not say whether vehicles struck off the register
stay in it; the count is what the dataset holds (2,309,907 on 2026-11-28).
- **Names are not written alike.** A Toyota RAV4 is `RAV4`, `TOYOTA RAV4` or `RAV4 HYBRID`; Škoda is `SKODA`. So a
make or model is matched anywhere in Regitra's name by default (24,590 RAV4s), and `match: "exact"` takes only the
name written just so (9,160 `RAV4`). Names are compared in upper case, as Regitra writes nearly all of them.
- **Transactions are documents, not vehicles.** One row per document recorded since 2021-05-01, of any of 19 kinds,
sale contracts (`Pirkimo-pardavimo sutartis`) and invoices (`Sąskaita (mokėjimą patvirtinantis dokumentas)`) among
them. Amounts are in each document's own currency, so an amount filter needs `currency`.
- **The API is slow at times.** A count took from 0.2 to 17 seconds on 2026-11-28, the same one at different
moments. A request unanswered after twenty seconds is given up on and said to be.
---
## 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 AB „Regitra“ or Valstybės duomenų agentūra.
## License
The code is MIT. The data it reads is CC BY 4.0, AB „Regitra“'s, published by Valstybės duomenų agentūra.
TDQS
Scored across 2 tools
The two tools target separate datasets and query types: vehicle population counts by make/model versus transaction document counts by filters. Both are counts, but the resource and parameters are clearly differentiated, so an agent can readily choose between them.
Both tools use the same regitra_ prefix and a noun + count suffix, giving a predictable pattern. There is no inconsistent casing or verb style.
Only two tools are exposed; while each is substantial, the surface is thin and provides no complementary operations. The narrow count-only scope makes two plausible, but it sits at the borderline of the 1–2 tool range.
The server covers only count queries for two Regitra datasets, with no way to list valid document types, makes/models, or retrieve records. Some gaps are API limitations, but agents lack discovery operations and must guess filter values, leaving the surface notably incomplete.