miskai-mcp
# miskai-mcp
[](https://github.com/lietuva-mcp/miskai/actions/workflows/ci.yml)
Lithuania's valid felling permits (leidimai kirsti mišką) for Claude and any MCP client. Ask "what may be cut on
parcel 3863/0009:0327?", "what clear-cuts are planned within 3 km of here?" or "how much pine may be felled in Varėna
district?", and it reads the State Forest Service's (Valstybinė miškų tarnyba, VMT) live map of permits,
[atvira.amvmt.lt](https://atvira.amvmt.lt), which VMT updates daily.
Zero dependencies: Node's own `fetch`, and nothing else.
---
## What it can do
| Tool | What it answers |
| --- | --- |
| `miskai_permits_by_parcel` | The valid permits on a private forest's land parcel, by its cadastral number (`3863/0009:0327`), or on any forest quarter, a state one too, by its forest district and quarter (`Matuizų`, `348`), with a plot and the unit if wanted. Up to 100, newest first. |
| `miskai_permits_near` | How many valid permits have a polygon within 0.1 to 25 km of a point (latitude, longitude), and 20 of them (or up to 50), each with its distance and its polygon's centroid: the nearest, or with `issued_since` the newest, newest first and then nearest. |
| `miskai_permits_in` | A summary of the valid permits in a municipality, a State Forest Enterprise unit or a forest district: their count, area and volume, the same by cutting kind and by species, as the service itself sums them, and the newest 10 (or up to 50). |
| `miskai_permit` | One permit by its id, every field, and its polygon as GeoJSON, simplified to about 5 m. |
Both take the same filters: `cutting_kind`, `species` and `ownership`, matched in any case as the map writes them, and
`issued_since`, the permits valid from that day or later.
Every permit has its id, type, status, validity, cadastral number (private forests), municipality, unit, forest
district, quarter and plots, area (ha), volume (m³), dominant species, cutting kind, regeneration and ownership.
Answers are Markdown: a table, or `**Label:** value` lines, values in Lithuanian as the map gives them, `—` where it
gives none. Areas and volumes are to two decimals: the layer holds areas as single-precision floats, and its sums of
them carry noise past the second decimal (`3238.7999946177006` ha).
"Valid" is every permit not cancelled whose validity ends today or later, including ones that start later; with
`valid_on`, those valid on that day.
What it does not do: find a place by its name (give a point, a parcel or a quarter), read permits no longer on the
map, or name owners (the map has none).
---
## 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 miskai -- npx -y @lietuva-mcp/miskai
```
**Claude Desktop**: Settings → Developer → Edit Config, and add:
```json
{
"mcpServers": {
"miskai": { "command": "npx", "args": ["-y", "@lietuva-mcp/miskai"] }
}
}
```
Any other MCP client: run `npx -y @lietuva-mcp/miskai` as a stdio server.
---
## How it treats VMT
VMT publishes the map as open data ("Atviri duomenys suteikia galimybę stebėti, kur ir kokie darbai yra numatyti")
but states no licence or terms of use for it, on the map, its ArcGIS items or its own pages, and its host serves no
robots.txt; every answer credits it as `Valstybinė miškų tarnyba, leidimų kirsti mišką žemėlapis (atvira.amvmt.lt)`
and says so.
- **It says who it is.** Every request carries `lietuva-mcp-miskai/<version> (+https://github.com/lietuva-mcp/miskai)`
as its user agent.
- **It asks the map's own service.** The layer behind the map
([lkmp_data](https://services6.arcgis.com/9d0vtWtIrdsf4pvs/arcgis/rest/services/lkmp_data/FeatureServer/0), an
ArcGIS Online feature service), through its public query operation, and nothing else: not the geocoders the map
uses, which are VMT's paid services.
- **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. A call is one to four requests; the first that names a unit, district, cutting kind,
species or ownership reads that field's names once.
- **It lets the service count.** Totals come from the service's own statistics; the table is never paged through.
- **It takes no for an answer.** A 500, 502 or 504, in the status or in the service's answer, is asked 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 the service itself, at most 3 times.
- **It keeps almost nothing.** No cookies, no login; only the names it matches arguments against, once per process.
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 VMT knows whose many requests come from your address.
Municipality names are Registrų centras' address register's
([get.data.gov.lt](https://get.data.gov.lt/datasets/gov/rc/ar/savivaldybe/Savivaldybe), CC BY 4.0), by the codes the
map gives.
---
## Develop
```sh
pnpm install
pnpm test # node --test, against a fake of the service on 127.0.0.1 replaying its answers (fixtures/)
pnpm record # asks the real service, paced, for any answer a test needs that fixtures/ lacks, and saves it
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 Valstybinė miškų tarnyba or Esri.
## License
The code is MIT. The map's data is VMT's, published as open data with no licence stated.
TDQS
Scored across 4 tools
The four tools separate query modes well: permits by parcel/forest unit, permits near a point, an area-level summary, and single-permit detail with polygon. The only mild overlap is forest-district/municipality filtering between miskai_permits_by_parcel and miskai_permits_in, but one lists permits while the other aggregates, and the descriptions make that distinction clear.
All tool names use snake_case with the miskai_ prefix and follow a predictable permits_<mode> pattern, with the singular miskai_permit reserved for one permit. The plural/singular distinction is semantically meaningful and consistent throughout.
Four tools is well-scoped for a read-only map query service. Each tool covers a distinct access pattern—by location, by proximity, by area summary, and by single permit ID—with no redundant or filler tools.
The surface covers the core query workflows: locating permits by parcel or forest unit, proximity search, area aggregation, and full permit detail including geometry. Minor gaps remain, such as no bulk geometry retrieval and no explicit reference-data listing for filter values, though the tools expose valid names when rejecting unrecognized filters.