Skip to content

Norway Open Data MCP v0.4.0 — Geospatial toolset

Latest

Choose a tag to compare

@iamkm1 iamkm1 released this 26 Jul 21:27
6b03c37

Adds a curated geospatial toolset built on the new geodata, environment and land namespaces and profiles.natureAtLocation() in norway-open-data-sdk@0.8.0. The curated tool set grows from 20 to 28.

Additive release. No existing tool changes its name, input schema or data payload, and the first twenty entries of tools/list keep their names and their order — a test now pins that prefix rather than assuming it.

No new environment variable and no credential of any kind. Geonorge, Naturbase and NIBIO are all anonymous, so 23 of the 28 tools work with no configuration at all.

npx -y norway-open-data-mcp

New tools

Geonorge — Norway's national geospatial metadata catalogue

Tool Purpose
search_geonorge_datasets Discover which Norwegian geodata exists, and whose, by text, publisher or theme
get_geonorge_metadata Licence, use limitations, extent, CRS, update regime and advertised endpoints for one record

Miljødirektoratet / Naturbase and NIBIO

Tool Purpose
get_protected_areas_at Which conservation areas legally cover one coordinate, with protection form, IUCN category, managing authority and the Lovdata regulation
search_protected_areas Conservation areas intersecting a bounded rectangle
get_nature_types_at Mapped NiN nature localities of national importance, with condition, biodiversity value and red-list status
get_intervention_free_nature_at January 2023 intervention-free (INON) wilderness-distance zones
get_land_resources_at NIBIO's generalized AR50 land-resource classification

The headline tool

get_nature_profile answers one coordinate from Miljødirektoratet, NIBIO and Kartverket at once, delegating the whole composition to the SDK's profiles.natureAtLocation(). Every section reports its own provider, licence, retrieval time and why it is present or absent — and one provider failing costs only its own section. A null section means the provider failed; an empty array means it answered and holds nothing.

Safety and honesty properties

  • An empty nature result is never an environmental clearance. These are four selected Naturbase datasets with uneven survey coverage, not a register of everything of environmental value. Every result says so, in both the structured warnings and the rendered text.
  • Geometry is returned exactly as published, or not at all. Off by default. Every ring of a polygon and every part of a multipolygon survives; an oversized geometry is dropped whole and reported, never simplified and never stripped of its holes. geometrySummary reports part, hole and vertex counts either way, so a caller always knows an area has holes even when the coordinates were too large to send.
  • Every search is bounded. Limits on every tool, truncated/hasMore taken from the SDK rather than inferred, bounding boxes capped at 2° × 4°, provider requests per call capped, and a continuation offset when the provider held more. No tool can download a national dataset.
  • No generic map-service proxy. No tool accepts a URL, host, endpoint, WFS type name or layer name — a registry-wide test fails the build if one ever appears. The catalogue tools still let a model discover any published Norwegian service and say where it is; they just never fetch it.
  • AR50 class codes are passed through undecoded except landTypeCode, whose SOSI code list is citable. Restating a land classification this project cannot cite would be worse than returning the provider's own code.
  • Geonorge contacts are reduced to organization and role. The named individuals and e-mail addresses the catalogue publishes are not relayed.
  • Coordinates are WGS84 degrees and are never reprojected. Naturbase publishes EPSG:25833 and NIBIO EPSG:4258; both convert server-side and sourceCrs retains the original declaration.

Fixed

  • Provenance no longer collapses two sets of licence terms into one. De-duplication keyed on provider id, so the Naturbase intervention-free layer — same naturbase id, but its own NLOD 1.0 licence and its own required wording Miljødirektoratet - inngrepsfri natur 01.2023 — silently lost its terms. It now keys on licence and attribution as well. Unchanged for every provider whose id maps to one set of terms.
  • Profile provenance unions the SDK's new sources array, so a provider the SDK credits cannot be dropped by this layer.

Provider limitations found by live testing

Both handled explicitly rather than papered over:

  • get_intervention_free_nature_at and get_nature_profile require a limit of at least 2. The SDK derives its upstream page size from the remaining limit, so a limit of 1 asks Miljødirektoratet's intervention-free WFS for a single feature — which that service answers with a page the SDK rejects as invalid. Deterministic and specific to that layer.
  • pageSize is deliberately not forwarded to the SDK. Overriding it with the caller's limit broke the same service. The MCP layer bounds what it returns, not how the SDK talks to a provider.

Also in this release

A root .gitattributes declaring * text=auto eol=lf. Without it, a clone on a machine with core.autocrlf=true checked out CRLF working files while Prettier is configured for LF, so pnpm format:check failed on a completely untouched checkout. Committed blobs were already LF, so no tracked content changed.

Verification

  • format check, ESLint, tsc --noEmit, static stdout/safety audit
  • 464 unit and evaluation tests (up from 397); coverage 94.9% statements / 84.78% branches / 95% functions / 95.54% lines, with no threshold lowered and no test removed or skipped
  • 29 protocol integration tests over real stdio, plus a package smoke test that installs the tarball outside the repository and drives the installed binary
  • 29 opt-in live tests against the real Geonorge, Naturbase, NIBIO and existing providers
  • Published from a tag by GitHub Actions using OIDC trusted publishing, with npm provenance attested to this repository, this workflow file and this commit. No long-lived npm token exists anywhere in the release path.

Full detail in CHANGELOG.md, the tool catalogue and the capability matrix.