Norway Location Transport Mcp

io.github.trondbjoroy由 GitHub 帳號 trondbjoroy 發布v0.1.1更新於 Oct 24, 2026

Norwegian transport (Entur) and geodata (Kartverket): trips, departures, addresses, elevation.

已驗證Streamable HTTP可網頁執行位置與生活資料與分析

概覽

AI 產生的概覽

為助理提供挪威大眾運輸與地理資料工具:行程規劃、班次、地址、地名、海拔和座標轉換。

可以做什麼
搜尋並驗證官方地址、地名及附近地物,查詢某地點或地址所屬的市鎮、郡及地籍編號。取得某點的地形海拔,或沿路徑取樣產生海拔剖面,含總距離、累計上升和下降,並在 EPSG 座標系統之間轉換座標。將地點解析為大眾運輸站點 ID,並尋找座標附近的站點。規劃點對點行程,可依運輸方式、時間和步行速度篩選,並取得含即時延誤和取消資訊的下一班次。查詢站點與路線的即時狀態、月台、輪椅無障礙資訊和票價區,以及車輛即時位置。尋找共享單車、電動滑板車和共享汽車及停靠站。
適用情境
適合回答挪威交通與地理方面的實際問題:如何從一地到另一地、下一班何時發車、某座標附近有什麼、某條路線起伏如何,或某地址屬於哪個市鎮。
執行需求
可作為遠端 HTTP 端點執行,也可作為本機程序執行(npm 套件,需 Node.js,stdio)。不需 API 金鑰或帳號;Entur 要求自我識別的用戶端名稱,可透過環境變數 ET_CLIENT_NAME 設定(未設定時使用套件預設值)。需要能連線至 Entur 和 Kartverket 服務的網路。
安裝前請注意
僅供唯讀查詢,不寫入或修改資料。查詢會送往第三方挪威公共 API(Entur、Kartverket/Geonorge),因此所查地址和座標會傳送給它們。資料採 NLOD 授權,展示時應註明來源。遇到限流時會回傳錯誤並要求重試。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Norway Location Transport Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/io.github.trondbjoroy%2Fnorway-location-transport-mcp/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

{
  "mcpServers": {
    "norway-location-transport": {
      "type": "http",
      "url": "https://norway-location-transport-mcp.met-mcp-worker.workers.dev/mcp"
    }
  }
}

README

norway-location-transport-mcp

An MCP server that gives AI agents structured access to Norwegian public transport and geospatial data, through the free Entur and Kartverket / Geonorge APIs.

The two sources compose: trip planning needs geocoding, elevation needs address resolution, and admin lookups tie coordinates to places. One server answers practical local questions — "how do I get from here to Bergen?", "what is the elevation along this hike?", "which kommune is this address in?", "are there e-scooters nearby?".

Both data sources are free with no paid tiers and no API keys. Entur requires only a self-identifying ET-Client-Name header (see below); Kartverket requires nothing.

Tools

Location & geodata (Kartverket)

  • search_address(query?, street?, number?, postal_code?, municipality_number?, max_results) — search official addresses by free text or fields; supports the * wildcard. Returns coordinates and cadastral numbers.
  • find_addresses_near(latitude, longitude, radius_m, max_results) — all addresses within a radius of a point, with distances.
  • validate_address(address) — validate and normalize a free-text address (fuzzy). Returns valid, the normalized match, and alternatives.
  • search_place_names(query, max_results) — search official place names; returns feature type (Fjell, Innsjø, …), municipality, county, and coordinates. Supports *.
  • find_place_names_near(latitude, longitude, radius_m, max_results) — nearest named features to a point, with distances.
  • get_elevation(latitude, longitude) — terrain elevation from the national elevation model (DTM).
  • get_elevation_profile(path, samples) — elevation sampled along a path; returns the profile plus total distance, ascent, and descent.
  • transform_coordinates(x, y, from_epsg, to_epsg) — convert between reference systems (e.g. WGS84 4326 → UTM33 25833).
  • lookup_admin_unit(latitude?, longitude?, address?) — which kommune and fylke a coordinate or address falls in, with official codes.
  • lookup_property(address?, latitude?, longitude?, max_results) — cadastral (matrikkel) identifiers (kommune / gnr / bnr / fnr) via the open address register.

Public transport (Entur)

  • resolve_stop_place(query, max_results) — resolve a place or address to Entur Stop Place IDs.
  • find_stops_near(latitude, longitude, radius_m, max_results) — reverse-geocode a coordinate to the nearest stop places.
  • plan_trip(from_place?/from_latitude/from_longitude, to_place?/to_latitude/to_longitude, date_time?, arrive_by?, transport_modes?, walk_speed?, num_trip_patterns) — plan a point-to-point journey; filter by mode and walk speed. Returns trip patterns with legs, modes, durations, and realtime times.
  • get_departures(stop_place_id, count) — next departures from a stop, with realtime delays, cancellations, and platform.
  • get_realtime_status(stop_place_id? | line_id?) — realtime health: for a stop, on-time/delayed/cancelled counts; for a line, active vehicles and delays.
  • get_stop_accessibility(stop_place_id) — per-quay wheelchair access and a summary. (See the accessibility note below.)
  • list_quays(stop_place_id) — all quays (platforms) at a stop, with codes and coordinates.
  • get_fare_zones(stop_place_id) — the fare (tariff) zone(s) a stop belongs to.
  • find_shared_vehicles(latitude, longitude, range_m, form_factors?, count) — free-floating shared vehicles (bikes, e-scooters, cars, mopeds) across all operators.
  • find_docking_stations(latitude, longitude, range_m, count) — docking stations with available vehicle and free-dock counts.
  • get_vehicle_positions(codespace_id?, line_id?, max_results) — live vehicle positions with bearing, speed, and delay.

Tool definitions live in src/kartverket.ts and src/entur.ts, combined in src/tools.ts and shared by both the stdio and HTTP entry points.

Setup

bash
npm installnpm run buildnpm test

npm test spawns the server over stdio and calls every tool against the live APIs.

Run it

Over stdio (for most MCP clients):

bash
node dist/index.js

Over Streamable HTTP (for HTTP-based clients):

bash
node dist/http.js# listens on http://localhost:3000/mcp  (override with PORT)

The Entur client-name requirement

Entur's terms require every request to carry an identifying ET-Client-Name header, formatted like company-app. This server sends one on every Entur request. Set your own value with the ET_CLIENT_NAME environment variable:

bash
ET_CLIENT_NAME="acme-travelbot" node dist/index.js

If unset, a package default is used. Kartverket needs no header or key.

Use with Claude Code

bash
claude mcp add norway -- node C:\Users\trond\norway-location-transport-mcp\dist\index.js

Then ask, for example: "Plan a trip from Oslo S to Bergen and tell me the elevation of Galdhøpiggen."

Remote version (Cloudflare Workers)

worker/ holds a remote deployment: the same 21 tools served over MCP Streamable HTTP, so the server can be added as a claude.ai connector. It shares the tool definitions with the local server (src/tools.ts takes z as a parameter, so it works with both the local MCP SDK v1 / zod 3 and the worker's SDK v2 / zod 4).

bash
cd workernpm installnpm run dev     # local test at http://127.0.0.1:8787/mcpnode test-http.mjs

Deploy it (needs a Cloudflare account and wrangler login):

bash
cd workernpm run deploy

Set your Entur client name as a worker variable:

bash
cd workernpx wrangler secret put ET_CLIENT_NAME

After deploy, add the remotes entry with your workers.dev URL to server.json.

Example calls

Get the next departures from Oslo S:

json
{ "name": "get_departures", "arguments": { "stop_place_id": "NSR:StopPlace:59872", "count": 5 } }

Plan a bus/tram-only trip with a set walk speed:

json
{ "name": "plan_trip", "arguments": {  "from_place": "NSR:StopPlace:59872",  "to_latitude": 59.95, "to_longitude": 10.78,  "transport_modes": ["bus", "tram"], "walk_speed": 1.4} }

Elevation profile along a short path:

json
{ "name": "get_elevation_profile", "arguments": {  "path": [{ "latitude": 61.636, "longitude": 8.312 }, { "latitude": 61.64, "longitude": 8.32 }],  "samples": 20} }

Convert a WGS84 coordinate to UTM33:

json
{ "name": "transform_coordinates", "arguments": { "x": 10.7461, "y": 59.9127, "from_epsg": 4326, "to_epsg": 25833 } }

Notes and limits

  • Coordinates are WGS84 latitude/longitude everywhere. The Kartverket APIs are queried with EPSG 4326 so the numbers match; EUREF89 (4258) differs by well under a metre in Norway.
  • Accessibility: Entur's free JourneyPlanner exposes wheelchair access per quay. Deeper equipment detail (elevators, tactile guidance) lives only in Entur's authenticated Stop Register API and is not available here; the tool says so.
  • Rate limiting from either source is surfaced as a clear error asking the agent to retry.
  • Attribution: data from Kartverket / Geonorge and Entur is under NLOD. Credit the sources when you show the data.

How it works

  • src/index.ts speaks MCP over stdio (JSON-RPC on stdin/stdout). src/http.ts speaks MCP over Streamable HTTP with session management. Both build the same server via src/server.ts.
  • Each tool declares a Zod input schema with descriptions the LLM reads directly — no external docs needed to call a tool.
  • Results are JSON text trimmed to what an agent needs, not the raw upstream payloads.
  • Never write to stdout with console.log; it corrupts the stdio protocol. Log to stderr.

License

MIT © Trond Bjørøy. Data © Kartverket and Entur, under NLOD.

來源:README.md,提交 f1b7c49

工具

21

search_address

Search Norwegian addresses

Search official Norwegian addresses (Kartverket) and get coordinates. Use `query` for free text, or the specific fields for a structured search. Wildcards with `*` are supported (e.g. street 'Storg*'). Returns coordinates, postal code, municipality, and cadastral numbers for each match.

輸入參數querynumberstreetmax_resultspostal_codemunicipality_number

find_addresses_near

Find addresses near a coordinate

Find all official addresses within a radius of a coordinate (Kartverket). Each result includes its distance from the point. Good for 'what is at this location?'.

輸入參數latitude必填radius_mlongitude必填max_results

validate_address

Validate and normalize an address

Check whether a free-text address exists in the official register and return its normalized form with coordinates. Uses fuzzy matching, so it also corrects small spelling errors. Returns `valid`, the best normalized match, and alternatives.

輸入參數address必填

search_place_names

Search Norwegian place names

Search official Norwegian place names (Kartverket Sentralt stedsnavnregister). Returns each name's feature type (e.g. Fjell, Innsjø, By), municipality, county, and coordinates. Supports the * wildcard and corrects small spelling errors.

輸入參數query必填max_results

find_place_names_near

Find place names near a coordinate

Find the nearest official named features to a coordinate (Kartverket). Each result includes its feature type and distance from the point.

輸入參數latitude必填radius_mlongitude必填max_results

get_elevation

Get elevation at a coordinate

Get the terrain elevation (metres above sea level) at a coordinate from the Norwegian national elevation model (Kartverket DTM). Covers mainland Norway.

輸入參數latitude必填longitude必填

get_elevation_profile

Get an elevation profile along a path

Sample the terrain elevation evenly along a path of coordinates (Kartverket DTM) and return the profile plus total distance, ascent, and descent. Useful for hikes and routes. Give the path vertices in order; `samples` controls resolution.

輸入參數path必填samples

transform_coordinates

Transform coordinates between systems

Convert a coordinate between reference systems using Kartverket's transformer. Give EPSG codes for source and target. Axis order: x is easting (longitude for geographic systems), y is northing (latitude). Common EPSG codes: 4326 WGS84, 4258 EUREF89 (both lon/lat), 25832 UTM32/EUREF89, 25833 UTM33, 25835 UTM35 (east/north in metres).

輸入參數x必填y必填to_epsg必填from_epsg必填

lookup_admin_unit

Look up municipality and county

Find which municipality (kommune) and county (fylke) a location falls in, with official codes (Kartverket). Give either a coordinate or a free-text address.

輸入參數addresslatitudelongitude

lookup_property

Look up property (matrikkel) info

Look up cadastral (matrikkel) identifiers for a property via the open address register (Kartverket): municipality number, gårdsnummer (gnr), bruksnummer (bnr), and festenummer. Give a free-text address or a coordinate. Full ownership data requires Kartverket's authenticated Matrikkel API; this returns the open address-linked identifiers.

輸入參數addresslatitudelongitudemax_results

resolve_stop_place

Resolve a place to a Stop Place ID

Turn a place or address into Entur Stop Place IDs (public transport stops/stations). Use the returned ID with the departure, trip, accessibility, quay, and fare-zone tools.

輸入參數query必填max_results

find_stops_near

Find stop places near a coordinate

Reverse-geocode a coordinate to the nearest public transport stop places (Entur), each with its distance. Use the returned IDs with the departure and trip tools.

輸入參數latitude必填radius_mlongitude必填max_results

plan_trip

Plan a public transport trip

Plan a point-to-point public transport journey in Norway (Entur JourneyPlanner). Give each endpoint either as a Stop Place ID or as coordinates. Optionally set a departure or arrival time, filter transport modes, and set walk speed. Returns trip patterns with legs, modes, durations, and realtime times.

輸入參數to_placearrive_bydate_timefrom_placewalk_speedto_latitudeto_longitudefrom_latitudefrom_longitudetransport_modesnum_trip_patterns

get_departures

Get next departures from a stop

Get the next departures from a stop place (Entur), including realtime delays and cancellations. Each departure shows line, destination, scheduled and expected times, delay, platform, and whether it is cancelled.

輸入參數countstop_place_id必填

get_realtime_status

Get realtime status for a stop or line

Get a realtime health summary. For a stop, pass stop_place_id: it summarizes how many upcoming departures are on time, delayed, or cancelled. For a line, pass line_id: it reports how many vehicles are currently active and their delays.

輸入參數line_idstop_place_id

get_stop_accessibility

Get stop accessibility

Get accessibility information for a stop place (Entur): per-quay (platform) wheelchair access, and a summary. Note: Entur's free API exposes wheelchair access per quay; deeper equipment detail (elevators, tactile guidance) is only in Entur's authenticated Stop Register API and is not available here.

輸入參數stop_place_id必填

list_quays

List quays (platforms) for a stop

List all quays (platforms/stopping points) at a stop place (Entur), with their public codes, coordinates, and wheelchair access.

輸入參數stop_place_id必填

get_fare_zones

Get fare zones for a stop

Get the fare (tariff) zone(s) a stop place belongs to (Entur). Fare zones set the ticket price for a journey.

輸入參數stop_place_id必填

find_shared_vehicles

Find shared vehicles nearby

Find free-floating shared vehicles (city bikes, e-scooters, car share, mopeds) near a coordinate across all Norwegian operators (Entur Mobility). Each result shows the operator, type, battery, and location.

輸入參數countrange_mlatitude必填longitude必填form_factors

find_docking_stations

Find docking stations nearby

Find shared-mobility docking stations (e.g. city bike stations) near a coordinate (Entur Mobility), with available vehicle and free-dock counts per station.

輸入參數countrange_mlatitude必填longitude必填

get_vehicle_positions

Get live vehicle positions

Get live positions of public transport vehicles (Entur realtime), filtered by operator codespace and/or line. Each vehicle shows its position, bearing, speed, and delay. Codespace examples: ATB (Trondheim), KOL (Stavanger), SKY (Bergen area). Get a line_id from get_departures.

輸入參數line_idmax_resultscodespace_id

版本歷史

1
  1. v0.1.1最新Sep 16, 2026

評分

已滿足適用檢查項的 100%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分