fpv-airspace 0.4.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +41 -240
- package/dist/index.js +724 -94
- package/licences/northern-ireland.md +24 -0
- package/licences/openstreetmap-ODbL.md +1 -1
- package/package.json +11 -1
package/README.md
CHANGED
|
@@ -1,26 +1,32 @@
|
|
|
1
|
-
# FPV Airspace
|
|
1
|
+
# <img src="assets/icon.svg" width="40" alt="" valign="middle"> FPV Airspace
|
|
2
2
|
|
|
3
|
-
An MCP server that
|
|
3
|
+
An MCP server and map that answer the question existing airspace tools do not: **can I legally take off and fly a drone here, in the UK?**
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
<p align="center"><img src="docs/images/hero.webp" alt="The FPV Airspace map at Durdle Door: satellite imagery, footpaths, parking, hazards, the weather timeline and a drone marker" width="900"></p>
|
|
6
|
+
|
|
7
|
+
Airspace restriction data is the easy half. A UK pilot actually has to clear three layers: permanent airspace restrictions (aerodrome flight restriction zones, prohibited, restricted and danger areas, the 400 m zone around every prison), temporary restrictions (NOTAMs), and landowner rules (National Trust byelaws, Forestry England permits, council park byelaws). The practical workaround pilots use is launching from a public right of way, where no landowner permission is needed. This server puts all of that behind thirteen tools that take a place name, a postcode or coordinates, covers England, Wales, Scotland and Northern Ireland, and draws it on a map that Claude can show inline or that you can open on a phone.
|
|
6
8
|
|
|
7
9
|
Informational only. It is not a substitute for a NATS pre-flight briefing, the CAA Drone Code, or permission from the landowner and any relevant aerodrome.
|
|
8
10
|
|
|
11
|
+
[](https://github.com/sponsors/noodlemctwoodle)
|
|
12
|
+
|
|
13
|
+
FPV Airspace is free and stays free: the data licences it relies on are for non-commercial use, so nothing is ever paywalled. If it saves you a wasted trip, a [one-off donation](https://donate.stripe.com/3cI28sesu6T0f4n7IP2Nq00), a [monthly donation](https://donate.stripe.com/8x2bJ23NQcdke0j3sz2Nq01) or [sponsoring on GitHub](https://github.com/sponsors/noodlemctwoodle) helps cover the hosting and the weather API.
|
|
14
|
+
|
|
9
15
|
## What it answers
|
|
10
16
|
|
|
11
|
-
- **Is this point inside a restriction?** `check_location
|
|
12
|
-
- **What is this aerodrome's zone?** `get_aerodrome_zone` by name or ICAO code
|
|
13
|
-
- **Is there a NOTAM in force?** `check_notams`
|
|
14
|
-
- **What does my route cross?** `check_route` for
|
|
15
|
-
- **Can I take off here?** `check_takeoff_site
|
|
16
|
-
- **Where can I park?** `find_parking`
|
|
17
|
-
- **Can I fly here, now?** `preflight_briefing
|
|
18
|
-
- **What is the ground doing?** `check_terrain`
|
|
19
|
-
- **Where could I take off?** `find_takeoff_spots` scores
|
|
20
|
-
- **What can my drone do?** `check_drone_rules
|
|
21
|
-
- **Is the weather flyable?** `check_weather
|
|
22
|
-
- **Show me.**
|
|
23
|
-
- Plus `geocode`
|
|
17
|
+
- **Is this point inside a restriction?** `check_location`: a one-line verdict and every zone containing the point, prisons included.
|
|
18
|
+
- **What is this aerodrome's zone?** `get_aerodrome_zone` by name or ICAO code.
|
|
19
|
+
- **Is there a NOTAM in force?** `check_notams` from the live NATS bulletin; unplaceable NOTAMs are listed, never dropped.
|
|
20
|
+
- **What does my route cross?** `check_route` for waypoints or an area, with the distance at which each zone is entered.
|
|
21
|
+
- **Can I take off here?** `check_takeoff_site`: nearest rights of way, parking, ground hazards, landowner rules, access land, designations and the council at the point.
|
|
22
|
+
- **Where can I park?** `find_parking` from OpenStreetMap, nearest first.
|
|
23
|
+
- **Can I fly here, now?** `preflight_briefing`: one GO, CAUTION or NO-GO with reasons from airspace, NOTAMs, weather, geomagnetic activity, paths, parking and your drone's rules.
|
|
24
|
+
- **What is the ground doing?** `check_terrain` against the 120 m rule along a route or around a point.
|
|
25
|
+
- **Where could I take off?** `find_takeoff_spots` scores and ranks candidate spots, and the map numbers them.
|
|
26
|
+
- **What can my drone do?** `check_drone_rules`: subcategory, separation, registration and Remote ID under the CAA class mark rules.
|
|
27
|
+
- **Is the weather flyable?** `check_weather`: hourly ratings against small-drone limits, plus the K-index.
|
|
28
|
+
- **Show me.** Every location answer on the hosted server carries a map that Claude renders inline.
|
|
29
|
+
- Plus `geocode` and `get_data_status`. Arguments and examples for each are in [docs/tools.md](docs/tools.md).
|
|
24
30
|
|
|
25
31
|
## Quick start
|
|
26
32
|
|
|
@@ -50,7 +56,7 @@ Add to `claude_desktop_config.json` (Settings > Developer > Edit Config):
|
|
|
50
56
|
|
|
51
57
|
`OS_NAMES_API_KEY` is optional. Without it, geocoding uses OpenStreetMap's Nominatim. With a free key from the [OS Data Hub](https://osdatahub.os.uk/), Ordnance Survey place names are tried first.
|
|
52
58
|
|
|
53
|
-
On first use the server downloads the current airspace data pack (about
|
|
59
|
+
On first use the server downloads the current airspace data pack (about 195 MB compressed, 527 MB on disk: 1,069 restriction zones, 520,000 rights of way, 94,000 landowner and designation polygons, 586,000 parking spots and 816,000 ground hazards) into `~/.cache/fpv-airspace` and reports progress on stderr. NOTAM and geocoding tools work while it downloads. The pack is refreshed automatically when a new AIRAC cycle is published.
|
|
54
60
|
|
|
55
61
|
### Claude Desktop extension (.mcpb)
|
|
56
62
|
|
|
@@ -66,241 +72,36 @@ claude mcp add fpv-airspace -- npx -y fpv-airspace
|
|
|
66
72
|
|
|
67
73
|
The same server runs as a Cloudflare Worker at **`https://fpv-airspace.fetchlabs.co.uk/mcp`**, which is what Claude's mobile app and voice mode can reach: they cannot run local servers, only remote connectors. Add it on claude.ai under Settings > Connectors > Add custom connector with that URL, and it becomes available on every surface, including voice conversations. Every tool accepts `format: "brief"`, which returns two or three spoken-friendly sentences instead of the full report.
|
|
68
74
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
```bash
|
|
72
|
-
npx wrangler login
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
```bash
|
|
76
|
-
npm run worker:setup
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
The setup script creates the D1 database and KV namespace, writes their ids into `wrangler.toml`, and loads the latest national pack into D1. Then `npm run worker:deploy` prints the URL. With the repository variable `CLOUDFLARE_DEPLOY=true` and the `CLOUDFLARE_API_TOKEN` / `CLOUDFLARE_ACCOUNT_ID` secrets set, GitHub Actions deploys on every push to `main` and reloads D1 whenever a new data pack is built.
|
|
80
|
-
|
|
81
|
-
### Hosted (streamable HTTP on your own server)
|
|
82
|
-
|
|
83
|
-
```bash
|
|
84
|
-
npx -y fpv-airspace --transport http --port 8080
|
|
85
|
-
# or
|
|
86
|
-
docker build -t fpv-airspace . && docker run -p 8080:8080 -v drone-data:/data fpv-airspace
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
`POST /mcp` speaks the MCP streamable HTTP transport (stateless), `GET /healthz` reports pack and NOTAM cache state.
|
|
90
|
-
|
|
91
|
-
## Tools
|
|
92
|
-
|
|
93
|
-
Every tool accepts `format: "text"` (default, a plain-text report), `format: "json"` (the same data as structured JSON) or `format: "brief"` (two or three sentences written to be read aloud, for voice). Tools that take a location accept either `place` (name, postcode or landmark) or `lat` and `lon`. When a place name matches several places, the tool returns the candidates instead of guessing.
|
|
94
|
-
|
|
95
|
-
### `check_location`
|
|
96
|
-
|
|
97
|
-
Permanent airspace restrictions and landowner rules at a point.
|
|
98
|
-
|
|
99
|
-
| Argument | Type | Notes |
|
|
100
|
-
|---|---|---|
|
|
101
|
-
| `place` / `lat`+`lon` | string / numbers | One form only |
|
|
102
|
-
| `include_above_120m` | boolean | Also list zones whose lower limit is above 400 ft |
|
|
103
|
-
|
|
104
|
-
Example prompt: *"Can I fly my drone at Tyndale Monument?"*
|
|
105
|
-
|
|
106
|
-
```
|
|
107
|
-
No permanent airspace restriction at this point.
|
|
108
|
-
Note: "the layby below Tyndale Monument" was not found; results are for "Tyndale Monument".
|
|
109
|
-
|
|
110
|
-
Location: Tyndale Monument, North Nibley, Gloucestershire (51.68390, -2.40540) via nominatim
|
|
111
|
-
...
|
|
112
|
-
Attribution: Airspace restrictions: UK AIP ENR 5.1 UAS Flight Restrictions dataset © NATS Limited ...; Geocoding © OpenStreetMap contributors (ODbL), via Nominatim
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
### `get_aerodrome_zone`
|
|
116
|
-
|
|
117
|
-
| Argument | Type | Notes |
|
|
118
|
-
|---|---|---|
|
|
119
|
-
| `aerodrome` | string | Name or ICAO code, e.g. `Bristol` or `EGGD` |
|
|
120
|
-
| `include_geojson` | boolean | Include zone geometry |
|
|
121
|
-
|
|
122
|
-
Example prompt: *"Show me the Gatwick FRZ."*
|
|
123
|
-
|
|
124
|
-
### `check_notams`
|
|
125
|
-
|
|
126
|
-
| Argument | Type | Notes |
|
|
127
|
-
|---|---|---|
|
|
128
|
-
| `place` / `lat`+`lon` | | |
|
|
129
|
-
| `radius_km` | 0–50 | Also list NOTAMs whose circle comes within this distance. 0 = covering only |
|
|
130
|
-
| `date` | ISO 8601 | Defaults to now; the bulletin covers the next 7 days |
|
|
131
|
-
| `max_results` | 1–50 | |
|
|
132
|
-
|
|
133
|
-
Example prompt: *"Any NOTAMs over Durdle Door this Saturday?"*
|
|
134
|
-
|
|
135
|
-
### `check_route`
|
|
136
|
-
|
|
137
|
-
| Argument | Type | Notes |
|
|
138
|
-
|---|---|---|
|
|
139
|
-
| `waypoints` | array of `[lon, lat]` or place names | 2–50 points; routes over 500 km are rejected |
|
|
140
|
-
| `area` | `{ bbox: [w, s, e, n] }` or GeoJSON Polygon | Instead of waypoints |
|
|
141
|
-
| `include_above_120m` | boolean | |
|
|
142
|
-
|
|
143
|
-
Example prompt: *"Check a route from Clevedon to Portishead along the coast."*
|
|
144
|
-
|
|
145
|
-
### `check_takeoff_site`
|
|
146
|
-
|
|
147
|
-
| Argument | Type | Notes |
|
|
148
|
-
|---|---|---|
|
|
149
|
-
| `place` / `lat`+`lon` | | |
|
|
150
|
-
| `max_paths` | 1–20 | Rights of way to list (default 5) |
|
|
151
|
-
| `search_radius_m` | 50–5000 | Default 1000 |
|
|
75
|
+
Running your own copy, on Cloudflare or as plain streamable HTTP or Docker, is covered in [docs/hosting.md](docs/hosting.md).
|
|
152
76
|
|
|
153
|
-
|
|
77
|
+
## The map
|
|
154
78
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
...
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
### `find_parking`
|
|
164
|
-
|
|
165
|
-
| Argument | Type | Notes |
|
|
166
|
-
|---|---|---|
|
|
167
|
-
| `place` / `lat`+`lon` | | |
|
|
168
|
-
| `max_results` | 1–20 | Default 5 |
|
|
169
|
-
| `search_radius_m` | 100–10000 | Default 2000 |
|
|
170
|
-
| `include_private` | boolean | Also list private, customers-only and permit parking |
|
|
171
|
-
|
|
172
|
-
Example prompt: *"Where can I park near Durdle Door?"*
|
|
173
|
-
|
|
174
|
-
### `check_weather`
|
|
175
|
-
|
|
176
|
-
| Argument | Type | Notes |
|
|
177
|
-
|---|---|---|
|
|
178
|
-
| `place` / `lat`+`lon` | | |
|
|
179
|
-
| `date` | ISO 8601 | A bare date reports daylight hours; a date-time starts there. Defaults to now |
|
|
180
|
-
| `hours` | 1–24 | Hours to report from the start (default 6) |
|
|
181
|
-
|
|
182
|
-
Example prompt: *"Is it flyable at Ilkley Moor on Saturday afternoon?"*
|
|
183
|
-
|
|
184
|
-
Ratings are advisory: caution from 8 m/s, poor from 10.7 m/s sustained or 12 m/s gusts, any rain, visibility under 1.5 km, and a caution for freezing temperatures, low cloud or strong wind at 120 m.
|
|
185
|
-
|
|
186
|
-
The report also carries the NOAA planetary K-index (geomagnetic activity), which affects GPS accuracy and compass behaviour: quiet, unsettled, active (Kp 4) or storm (Kp 5 and above). It does not change the weather rating; the briefing tool treats a storm as caution.
|
|
187
|
-
|
|
188
|
-
### `preflight_briefing`
|
|
189
|
-
|
|
190
|
-
One report for a take-off point and time. `place` / `lat`+`lon`, `date` (default now), `hours` (window length, default 3), optional `drone` and `a2_certificate`, `frz_permission` when an aerodrome has already agreed the flight, `notam_radius_km` (default 10), `max_paths`. The status is deterministic: prohibited, prison or restricted airspace, an FRZ without permission, or a landowner ban is NO-GO; an FRZ with permission, a covering NOTAM, a danger area, poor weather, a geomagnetic storm, a physical ground hazard within 200 m, or any live source that could not be read is CAUTION; otherwise GO. Notes (marginal weather, nearby or unlocated NOTAMs, a school, hospital or park within 150 m, no right of way nearby, A3 separation) never change the status. The JSON carries each sub-result, the reasons and an `outages` list.
|
|
191
|
-
|
|
192
|
-
### `check_terrain`
|
|
193
|
-
|
|
194
|
-
Ground elevation against the 120 m rule. Give `waypoints` (2 to 50) for a profile, or a point with `radius_m` (default 500) for the ground around it; `flight_height_m` (default 120) is the planned height above take-off and `step_m` the sample spacing. Reports the highest and lowest ground relative to the take-off point and warns when the ground rises within 30 m of the flight height (caution) or above it (poor), or falls far enough that the flight would be more than 120 m above the surface. Elevations come from Copernicus GLO-90 via Open-Meteo at about 90 m resolution, so cliffs and buildings are not resolved.
|
|
195
|
-
|
|
196
|
-
### `find_takeoff_spots`
|
|
197
|
-
|
|
198
|
-
Candidate spots come from the nearest rights of way (the closest point of each plus samples every 250 m), public parking and open access land within `search_radius_m` (default 3 km), de-duplicated on a 50 m grid and capped at 60. Each is checked against the airspace and landowner layers: prohibited, restricted, prison and aerodrome zones and take-off bans exclude it; a covering NOTAM, a danger area, a landowner rule or a ground hazard within 200 m lower the score; being on a right of way, having parking within 300 m and open access land raise it; distance from the centre costs a little. Scores are integers with a reason per term, so the ordering is deterministic. `max_results` (default 3), optional `drone` and `a2_certificate` (a school, hospital, park or similar within 150 m costs a little, and a lot for A3 pilots). The JSON lists the spots and the excluded candidates grouped by reason. A right of way is a right to pass, not to stop and fly.
|
|
199
|
-
|
|
200
|
-
### `check_drone_rules`
|
|
201
|
-
|
|
202
|
-
Which UK open category rules apply to a consumer drone. Give `model` (looked up in the curated catalogue in `src/services/drones/catalogue.ts`: DJI, Autel, Potensic, HoverAir and Parrot models with take-off weight, EU C-class and UK class marks) or `weight_g` with an optional `class_mark` (C0 to C4, UK0 to UK4, or none). Set `a2_certificate` if the pilot holds an A2 CofC and `date` to see the rules on a future date. The answer gives the subcategory, overflight and separation rules, registration (Flyer ID and Operator ID, 100 g threshold from 2026), Remote ID dates (UK1 to UK3 from 2026, camera aircraft of 100 g or more otherwise from 2028) and the transition under which EU C-class labels count as UK classes until the end of 2027. Rules and dates live in `src/services/drones/rules.ts` with the CAA pages they were taken from; the catalogue is community-maintained like the byelaw list, and an unconfirmed class mark is left null so the aircraft is treated as legacy.
|
|
79
|
+
<table align="center"><tr>
|
|
80
|
+
<td><img src="docs/images/phone-empty.webp" alt="The map on a phone before a location is chosen" width="230"></td>
|
|
81
|
+
<td><img src="docs/images/phone.webp" alt="Durdle Door on a phone with the location sheet collapsed" width="230"></td>
|
|
82
|
+
<td><img src="docs/images/phone-sheet.webp" alt="The location sheet expanded: counts, drone picker, conditions and the weather timeline" width="230"></td>
|
|
83
|
+
</tr></table>
|
|
203
84
|
|
|
204
|
-
|
|
85
|
+
Search a place, tap the map or use your position; every zone, NOTAM, path, landowner rule, parking spot and ground hazard in view is drawn with its own icon, a long press lists what is under a point, the card shows the coming week's flyability hour by hour, and the overlays load as you pan. Claude renders the same map inline with an answer. The full guide, with the layers key and more screenshots, is in [docs/map.md](docs/map.md).
|
|
205
86
|
|
|
206
|
-
|
|
87
|
+
## Documentation
|
|
207
88
|
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
Map tiles © OpenStreetMap contributors; imagery © Esri, Maxar, Earthstar Geographics, and the GIS User Community; rain radar © RainViewer; weather © Open-Meteo.com (CC BY 4.0).
|
|
215
|
-
|
|
216
|
-
### `geocode`
|
|
217
|
-
|
|
218
|
-
| Argument | Type | Notes |
|
|
219
|
-
|---|---|---|
|
|
220
|
-
| `query` | string | |
|
|
221
|
-
| `limit` | 1–10 | |
|
|
222
|
-
|
|
223
|
-
### `get_data_status`
|
|
224
|
-
|
|
225
|
-
No arguments. Reports pack tag, AIRAC effective dates, per-source fetch dates and licences, NOTAM cache age, geocoding providers and every attribution string.
|
|
226
|
-
|
|
227
|
-
## Data sources and attribution
|
|
228
|
-
|
|
229
|
-
| Layer | Source | Refresh | Licence |
|
|
230
|
-
|---|---|---|---|
|
|
231
|
-
| Flight restrictions | [NATS UK AIP ENR 5.1 UAS Flight Restrictions dataset](https://nats-uk.ead-it.com/cms-nats/opencms/en/uas-restriction-zones/) (AIXM 5.1, cross-checked against the NATS KML) | Every AIRAC cycle (28 days) | © NATS Limited; redistribution terms unconfirmed, see [licences/NATS.md](licences/NATS.md) |
|
|
232
|
-
| NOTAMs | [NATS AIS contingency PIB](https://www.nats.aero/do-it-online/pre-flight-information-bulletins/) (all UK NOTAMs in force or within 7 days) | Hourly upstream, 30 min cache | Informational; obtain an official briefing |
|
|
233
|
-
| Rights of way | Council open data aggregated by [rowmaps.com](https://www.rowmaps.com/) (143 authorities, England and Wales) | Weekly | Open Government Licence v3 per council, OS attribution, see [licences/rowmaps.md](licences/rowmaps.md) |
|
|
234
|
-
| National Trust land | [National Trust Open Data](https://open-data-national-trust.hub.arcgis.com/) Always Open and Limited Access | When edited | OGL v3 / CC-BY |
|
|
235
|
-
| Council byelaws | [data/byelaws/seed.yaml](data/byelaws/seed.yaml) in this repository | Manual | MIT; incomplete by nature |
|
|
236
|
-
| Elevation | [Open-Meteo Elevation API](https://open-meteo.com/en/docs/elevation-api), Copernicus GLO-90 DEM | Live, cached 30 days per 100 m cell | CC BY 4.0 (Open-Meteo), Copernicus data licence |
|
|
237
|
-
| Geomagnetic activity | [NOAA SWPC planetary K-index](https://services.swpc.noaa.gov/products/noaa-planetary-k-index.json) | Live, cached 15 min | US Government, public domain |
|
|
238
|
-
| Drone rules | [CAA class marks](https://www.caa.co.uk/drones/getting-started-with-drones-and-model-aircraft/class-marks/) and the [Drone Code](https://register-drones.caa.co.uk/drone-code), summarised in `src/services/drones/rules.ts`; drone catalogue curated from manufacturer specifications | With the code | Crown copyright, OGL v3; the CAA pages are authoritative |
|
|
239
|
-
| Open access land | [Natural England CRoW Access Layer](https://naturalengland-defra.opendata.arcgis.com/datasets/Defra::crow-act-2000-access-layer/about), [NRW open country and common land](https://datamap.gov.wales/) | With the pack | OGL v3, see [licences/natural-england.md](licences/natural-england.md) and [licences/natural-resources-wales.md](licences/natural-resources-wales.md) |
|
|
240
|
-
| SSSI and National Parks | Natural England and Natural Resources Wales designation boundaries | With the pack | OGL v3, advisory only |
|
|
241
|
-
| Forestry England land | [Forestry England Legal Boundary](https://data-forestry.opendata.arcgis.com/) | With the pack | OGL v3 with acknowledgement, see [licences/forestry-england.md](licences/forestry-england.md); byelaws need a permit for drones |
|
|
242
|
-
| Scottish core paths | [Core Paths - Scotland, Improvement Service Spatial Hub](https://data.spatialhub.scot/dataset/core_paths-is) (needs a free account key, `SPATIALHUB_AUTHKEY`) | Weekly | OGL v3 per council, see [licences/improvement-service-core-paths.md](licences/improvement-service-core-paths.md) |
|
|
243
|
-
| Local authorities | [ONS Local Authority Districts (May 2026) BSC](https://geoportal.statistics.gov.uk/) | With the pack | OGL v3, see [licences/ONS.md](licences/ONS.md) |
|
|
244
|
-
| Ground hazards | OpenStreetMap via the Geofabrik extract: railways, motorways and trunk roads, power lines and minor lines, pylons, substations, generators, helipads, masts, military land, schools, nurseries, hospitals, fire and fuel stations, parks, cemeteries | Weekly | ODbL, see [licences/openstreetmap-ODbL.md](licences/openstreetmap-ODbL.md); advisory only |
|
|
245
|
-
| Parking and laybys | OpenStreetMap via the [Geofabrik Great Britain extract](https://download.geofabrik.de/europe/great-britain.html) (`amenity=parking`, `highway=rest_area`) | Weekly | ODbL |
|
|
246
|
-
| Country boundaries | ONS Countries (December 2024) BUC | Yearly | OGL v3 |
|
|
247
|
-
| Geocoding | postcodes.io, OS Names API (optional), Nominatim | Live, cached 30 days | OGL v3; ODbL |
|
|
248
|
-
| Weather | [Open-Meteo](https://open-meteo.com/) forecast API | Live, cached 15 min | CC BY 4.0 |
|
|
249
|
-
|
|
250
|
-
Every response ends with an `Attribution:` line listing only the sources actually used, including the per-council attribution that the OGL requires for rights-of-way data.
|
|
251
|
-
|
|
252
|
-
The permanent layers are assembled into a data pack by [`.github/workflows/build-pack.yml`](.github/workflows/build-pack.yml), published as a GitHub Release tagged `pack-<AIRAC date>-<run>`, and verified by sha256 on download. See [CLAUDE.md](CLAUDE.md) for the pipeline layout.
|
|
253
|
-
|
|
254
|
-
## Configuration
|
|
255
|
-
|
|
256
|
-
| Variable | Default | Purpose |
|
|
257
|
-
|---|---|---|
|
|
258
|
-
| `OS_NAMES_API_KEY` | unset | Enables the OS Names geocoder |
|
|
259
|
-
| `OS_NAMES_URL` | `https://api.os.uk/search/names/v1/find` | |
|
|
260
|
-
| `OPEN_METEO_ELEVATION_URL` | `https://api.open-meteo.com/v1/elevation` | |
|
|
261
|
-
| `ELEVATION_CACHE_TTL_SECONDS` | `2592000` | Terrain does not change |
|
|
262
|
-
| `NOAA_KP_URL` | `https://services.swpc.noaa.gov/products/noaa-planetary-k-index.json` | |
|
|
263
|
-
| `SPACE_WEATHER_CACHE_TTL_SECONDS` | `900` | |
|
|
264
|
-
| `OSM_PBF_URL`, `NE_CROW_URL`, `NE_SSSI_URL`, `NE_NATIONAL_PARKS_URL`, `NRW_WFS_URL`, `FE_LEGAL_BOUNDARY_URL`, `ONS_LAD_URL`, `SPATIALHUB_WFS_URL` | (upstream defaults) | Build only: override a source endpoint when a publisher moves it; the `NRW_*_TYPENAME` and `SPATIALHUB_TYPENAME` variables do the same for WFS layer names |
|
|
265
|
-
| `SPATIALHUB_AUTHKEY` | (unset) | Build only: Spatial Hub account key for Scottish core paths; without it the pack has none |
|
|
266
|
-
| `NOMINATIM_URL` | `https://nominatim.openstreetmap.org/search` | Self-host to lift the 1 req/s limit |
|
|
267
|
-
| `POSTCODES_IO_URL` | `https://api.postcodes.io` | |
|
|
268
|
-
| `NOTAM_PIB_URL` | `https://pibs.nats.co.uk/operational/pibs/PIB.xml` | |
|
|
269
|
-
| `NOTAM_CACHE_TTL_SECONDS` | `1800` | |
|
|
270
|
-
| `OPEN_METEO_URL` | `https://api.open-meteo.com/v1/forecast` | |
|
|
271
|
-
| `WEATHER_CACHE_TTL_SECONDS` | `900` | |
|
|
272
|
-
| `GEOCODE_CACHE_TTL_SECONDS` | `2592000` | 30 days |
|
|
273
|
-
| `HTTP_TIMEOUT_MS` | `8000` | Live calls |
|
|
274
|
-
| `FPV_AIRSPACE_CACHE_DIR` | `~/.cache/fpv-airspace` | Pack and caches (`DRONE_AIRSPACE_CACHE_DIR` and an existing `~/.cache/uk-drone-airspace-mcp` are still honoured) |
|
|
275
|
-
| `PACK_MANIFEST_URL` | latest GitHub release manifest | Point at a mirror or `file://` |
|
|
276
|
-
| `PACK_PATH` | unset | Use a local pack and skip downloads |
|
|
277
|
-
| `PACK_UPDATE_CHECK` | `true` | Background check for a newer pack |
|
|
278
|
-
| `PACK_STALE_HOURS` | `24` | How often to check |
|
|
279
|
-
| `LOG_LEVEL` | `info` | `debug`, `info`, `warn`, `error`, `silent` |
|
|
280
|
-
| `MCP_TRANSPORT` / `--transport` | `stdio` | `stdio` or `http` |
|
|
281
|
-
| `PORT` / `--port` | `8080` | HTTP transport |
|
|
89
|
+
- [Tools](docs/tools.md): every tool, its arguments and example prompts.
|
|
90
|
+
- [The map](docs/map.md): search, layers, hazards, weather, the phone layout and URL parameters.
|
|
91
|
+
- [Data sources and attribution](docs/data-sources.md): where each layer comes from, how often it refreshes and under what licence.
|
|
92
|
+
- [Configuration](docs/configuration.md): environment variables for the server and the build.
|
|
93
|
+
- [Hosting](docs/hosting.md): Cloudflare Worker, streamable HTTP and Docker.
|
|
94
|
+
- [Development](docs/development.md): tests, packs and releases.
|
|
282
95
|
|
|
283
96
|
## Caveats
|
|
284
97
|
|
|
285
|
-
- Rights-of-way data is an interpretation of each council's Definitive Map, not the Definitive Map itself, and covers England and Wales
|
|
286
|
-
- The landowner rule layer holds National Trust land and a hand-curated list of council byelaws. Absence of a rule never means take-off is permitted.
|
|
98
|
+
- Rights-of-way data is an interpretation of each council's Definitive Map, not the Definitive Map itself, and covers England and Wales. Scotland has no definitive map (access rights apply instead, and core paths need a Spatial Hub key) and Northern Ireland has no definitive map either: only councils that publish their asserted paths appear, so absence there means unknown; the tools say so.
|
|
99
|
+
- The landowner rule layer holds National Trust and Forestry England land and a hand-curated list of council byelaws and policies. The National Trust's open data omits its Northern Ireland properties. Absence of a rule never means take-off is permitted.
|
|
100
|
+
- Ground hazards and parking come from OpenStreetMap and are as complete as the map is; they are advisory and never change a verdict.
|
|
287
101
|
- Only zones reaching below 400 ft (120 m) count towards a verdict; higher zones are listed on request.
|
|
288
102
|
- NOTAMs are read from the NATS contingency bulletin, which may lag the live system by up to an hour.
|
|
289
103
|
- ICAO codes for aerodromes come from a curated table covering major and well-known UK aerodromes; lookups by name always work.
|
|
290
104
|
|
|
291
|
-
## Development
|
|
292
|
-
|
|
293
|
-
```bash
|
|
294
|
-
npm install
|
|
295
|
-
npm test # offline vitest suite
|
|
296
|
-
npm run lint && npm run typecheck
|
|
297
|
-
npm run build && npx @modelcontextprotocol/inspector node dist/index.js
|
|
298
|
-
npm run pack:build -- --region south-west --tag pack-dev # build a small real pack (network)
|
|
299
|
-
PACK_PATH=build/pack/pack-dev.sqlite node dist/index.js
|
|
300
|
-
```
|
|
301
|
-
|
|
302
|
-
Releases: tag `vX.Y.Z` to publish to npm and attach the `.mcpb` bundle. The data pack has its own release cadence driven by `build-pack.yml`.
|
|
303
|
-
|
|
304
105
|
## Licence
|
|
305
106
|
|
|
306
107
|
MIT. Data sources carry their own licences; see the [licences](licences/) folder.
|