@squawk/mcp 0.5.0 → 0.7.0

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 CHANGED
@@ -98,7 +98,7 @@ version explicitly in the client config:
98
98
  "mcpServers": {
99
99
  "squawk": {
100
100
  "command": "npx",
101
- "args": ["-y", "@squawk/mcp@0.5.0"]
101
+ "args": ["-y", "@squawk/mcp@0.7.0"]
102
102
  }
103
103
  }
104
104
  }
@@ -264,18 +264,20 @@ do not pay the decompression cost.
264
264
 
265
265
  ### Weather (`@squawk/weather` + `@squawk/weather/fetch`)
266
266
 
267
- | Tool | Purpose |
268
- | ----------------------------- | -------------------------------------------------------------- |
269
- | `parse_metar` | Parse a user-supplied METAR/SPECI string |
270
- | `parse_taf` | Parse a user-supplied TAF |
271
- | `parse_sigmet` | Parse a US-domestic or ICAO SIGMET |
272
- | `parse_airmet` | Parse an AIRMET bulletin |
273
- | `parse_pirep` | Parse a PIREP report |
274
- | `fetch_metar` | Fetch and parse live METARs from the Aviation Weather Center |
275
- | `fetch_taf` | Fetch and parse live TAFs |
276
- | `fetch_pirep` | Fetch PIREPs near a center station |
277
- | `fetch_sigmets` | Fetch active US (CONUS) SIGMETs, optionally filtered by hazard |
278
- | `fetch_international_sigmets` | Fetch active international SIGMETs in ICAO format |
267
+ | Tool | Purpose |
268
+ | ----------------------------- | ------------------------------------------------------------------- |
269
+ | `parse_metar` | Parse a user-supplied METAR/SPECI string |
270
+ | `parse_taf` | Parse a user-supplied TAF |
271
+ | `parse_sigmet` | Parse a US-domestic or ICAO SIGMET |
272
+ | `parse_airmet` | Parse an AIRMET bulletin |
273
+ | `parse_pirep` | Parse a PIREP report |
274
+ | `parse_winds_aloft` | Parse an FD (winds and temperatures aloft) bulletin |
275
+ | `fetch_metar` | Fetch and parse live METARs from the Aviation Weather Center |
276
+ | `fetch_taf` | Fetch and parse live TAFs |
277
+ | `fetch_pirep` | Fetch PIREPs near a center station |
278
+ | `fetch_sigmets` | Fetch active US (CONUS) SIGMETs, optionally filtered by hazard |
279
+ | `fetch_international_sigmets` | Fetch active international SIGMETs in ICAO format |
280
+ | `fetch_winds_aloft` | Fetch and parse a live FD winds-aloft forecast by region and period |
279
281
 
280
282
  ### NOTAMs (`@squawk/notams`)
281
283
 
@@ -1 +1 @@
1
- {"version":3,"file":"weather.d.ts","sourceRoot":"","sources":["../../src/tools/weather.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAyDzE;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAsO5D"}
1
+ {"version":3,"file":"weather.d.ts","sourceRoot":"","sources":["../../src/tools/weather.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAwFzE;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,SAAS,GAAG,IAAI,CAgS5D"}
@@ -8,8 +8,8 @@
8
8
  * and return both the parsed records and any per-record parse errors so the
9
9
  * model can surface partial failures.
10
10
  */
11
- import { parseAirmet, parseMetar, parsePirep, parseSigmet, parseTaf } from '@squawk/weather';
12
- import { fetchInternationalSigmets, fetchMetar, fetchPirep, fetchSigmets, fetchTaf, } from '@squawk/weather/fetch';
11
+ import { parseAirmet, parseMetar, parsePirep, parseSigmet, parseTaf, parseWindsAloft, } from '@squawk/weather';
12
+ import { fetchInternationalSigmets, fetchMetar, fetchPirep, fetchSigmets, fetchTaf, fetchWindsAloft, } from '@squawk/weather/fetch';
13
13
  import { z } from 'zod';
14
14
  import { runParser, summarizeParseErrors } from './tool-helpers.js';
15
15
  /** Allowed values for the AWC SIGMET hazard filter. */
@@ -25,6 +25,24 @@ const PIREP_INTENSITY_VALUES = [
25
25
  'mod',
26
26
  'sev',
27
27
  ];
28
+ /** Allowed geographic regions for the AWC winds-aloft (FD) endpoint. */
29
+ const WINDS_ALOFT_REGION_VALUES = [
30
+ 'contiguousUs',
31
+ 'northeast',
32
+ 'southeast',
33
+ 'northCentral',
34
+ 'southCentral',
35
+ 'rockyMountain',
36
+ 'pacificCoast',
37
+ 'alaska',
38
+ 'hawaii',
39
+ 'westernPacific',
40
+ ];
41
+ /** Allowed altitude bands for the AWC winds-aloft (FD) endpoint. */
42
+ const WINDS_ALOFT_ALTITUDE_BAND_VALUES = [
43
+ 'low',
44
+ 'high',
45
+ ];
28
46
  /**
29
47
  * Optional override for the Aviation Weather Center base URL. Read once at
30
48
  * module load from the `SQUAWK_AWC_BASE_URL` environment variable. When set,
@@ -92,6 +110,13 @@ export function registerWeatherTools(server) {
92
110
  raw: z.string().min(1).describe('Raw PIREP report text.'),
93
111
  },
94
112
  }, ({ raw }) => runParser(raw, parsePirep, 'pirep'));
113
+ server.registerTool('parse_winds_aloft', {
114
+ title: 'Parse a winds-aloft (FD) forecast bulletin',
115
+ description: 'Parses a raw FD (Forecast Winds and Temperatures Aloft) bulletin - sometimes referred to by its older name "FB" - into a structured object with the issue time, valid time, usable period, altitude columns, and per-station forecast levels. Each level includes wind direction, wind speed, and (usually) temperature; light-and-variable winds are flagged, missing columns are flagged, and temperatures above the "TEMPS NEG ABV" threshold are decoded from the implicit-negative wire format.',
116
+ inputSchema: {
117
+ raw: z.string().min(1).describe('Raw FD bulletin text.'),
118
+ },
119
+ }, ({ raw }) => runParser(raw, parseWindsAloft, 'windsAloft'));
95
120
  // ---------------------------------------------------------------------------
96
121
  // Fetch (Aviation Weather Center text API)
97
122
  // ---------------------------------------------------------------------------
@@ -212,4 +237,39 @@ export function registerWeatherTools(server) {
212
237
  structuredContent: payload,
213
238
  };
214
239
  });
240
+ server.registerTool('fetch_winds_aloft', {
241
+ title: 'Fetch a winds-aloft (FD) forecast from the Aviation Weather Center',
242
+ description: 'Fetches a winds-aloft forecast (FD product) from the Aviation Weather Center text API and parses the response. Returns a single parsed bulletin covering many reporting stations at several altitudes. All three inputs (region, altitudeBand, forecastHours) are optional - omit them to let AWC apply its own defaults.',
243
+ inputSchema: {
244
+ region: z
245
+ .enum(WINDS_ALOFT_REGION_VALUES)
246
+ .optional()
247
+ .describe('Optional geographic region. "contiguousUs" covers all 48 contiguous US sites; the per-center regions ("northeast", "southeast", "northCentral", "southCentral", "rockyMountain", "pacificCoast") cover subsets. "alaska", "hawaii", and "westernPacific" are separate regions.'),
248
+ altitudeBand: z
249
+ .enum(WINDS_ALOFT_ALTITUDE_BAND_VALUES)
250
+ .optional()
251
+ .describe('Optional altitude band. "low" covers 3000-39000 ft (9 altitude columns); "high" covers FL450 and above (typically 45000 and 53000 ft).'),
252
+ forecastHours: z
253
+ .union([z.literal(6), z.literal(12), z.literal(24)])
254
+ .optional()
255
+ .describe('Optional forecast horizon in hours from issue time. Must be 6, 12, or 24.'),
256
+ },
257
+ }, async ({ region, altitudeBand, forecastHours }) => {
258
+ const options = baseFetchOptions();
259
+ if (region !== undefined) {
260
+ options.region = region;
261
+ }
262
+ if (altitudeBand !== undefined) {
263
+ options.altitudeBand = altitudeBand;
264
+ }
265
+ if (forecastHours !== undefined) {
266
+ options.forecastHours = forecastHours;
267
+ }
268
+ const { forecast } = await fetchWindsAloft(options);
269
+ const payload = { forecast };
270
+ return {
271
+ content: [{ type: 'text', text: JSON.stringify(payload, null, 2) }],
272
+ structuredContent: payload,
273
+ };
274
+ });
215
275
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@squawk/mcp",
3
- "version": "0.5.0",
3
+ "version": "0.7.0",
4
4
  "type": "module",
5
5
  "description": "Model Context Protocol server exposing squawk's aviation libraries as tools for LLM clients",
6
6
  "author": "Neil Cochran",
@@ -38,26 +38,26 @@
38
38
  },
39
39
  "dependencies": {
40
40
  "@modelcontextprotocol/sdk": "^1.29.0",
41
- "@squawk/airport-data": "^0.5.0",
42
- "@squawk/airports": "^0.4.0",
43
- "@squawk/airspace": "^0.5.0",
41
+ "@squawk/airport-data": "^0.6.0",
42
+ "@squawk/airports": "^0.5.0",
43
+ "@squawk/airspace": "^0.5.1",
44
44
  "@squawk/airspace-data": "^0.3.2",
45
- "@squawk/airway-data": "^0.4.0",
46
- "@squawk/airways": "^0.3.0",
47
- "@squawk/fix-data": "^0.5.0",
48
- "@squawk/fixes": "^0.2.0",
45
+ "@squawk/airway-data": "^0.4.1",
46
+ "@squawk/airways": "^0.3.1",
47
+ "@squawk/fix-data": "^0.5.1",
48
+ "@squawk/fixes": "^0.2.1",
49
49
  "@squawk/flight-math": "^0.5.1",
50
- "@squawk/flightplan": "^0.4.0",
51
- "@squawk/geo": "^0.3.0",
52
- "@squawk/icao-registry": "^0.3.0",
53
- "@squawk/icao-registry-data": "^0.4.0",
54
- "@squawk/navaid-data": "^0.5.0",
55
- "@squawk/navaids": "^0.3.0",
56
- "@squawk/notams": "^0.3.0",
57
- "@squawk/procedure-data": "^0.5.0",
58
- "@squawk/procedures": "^0.4.0",
59
- "@squawk/types": "^0.5.0",
60
- "@squawk/weather": "^0.4.0",
50
+ "@squawk/flightplan": "^0.4.1",
51
+ "@squawk/geo": "^0.3.1",
52
+ "@squawk/icao-registry": "^0.3.1",
53
+ "@squawk/icao-registry-data": "^0.4.1",
54
+ "@squawk/navaid-data": "^0.5.1",
55
+ "@squawk/navaids": "^0.3.1",
56
+ "@squawk/notams": "^0.3.1",
57
+ "@squawk/procedure-data": "^0.5.1",
58
+ "@squawk/procedures": "^0.4.1",
59
+ "@squawk/types": "^0.6.0",
60
+ "@squawk/weather": "^0.5.0",
61
61
  "zod": "^4.3.6"
62
62
  },
63
63
  "devDependencies": {