@dangahagan/weather-mcp 0.1.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/dist/index.js ADDED
@@ -0,0 +1,515 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Weather MCP Server
4
+ * Provides weather data from NOAA API to AI systems via Model Context Protocol
5
+ */
6
+ // Load environment variables from .env file (for local development)
7
+ import 'dotenv/config';
8
+ import { Server } from '@modelcontextprotocol/sdk/server/index.js';
9
+ import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
10
+ import { CallToolRequestSchema, ListToolsRequestSchema, } from '@modelcontextprotocol/sdk/types.js';
11
+ import { NOAAService } from './services/noaa.js';
12
+ import { OpenMeteoService } from './services/openmeteo.js';
13
+ /**
14
+ * Server information
15
+ */
16
+ const SERVER_NAME = 'weather-mcp';
17
+ const SERVER_VERSION = '0.1.0';
18
+ /**
19
+ * Initialize the NOAA service
20
+ */
21
+ const noaaService = new NOAAService({
22
+ userAgent: '(weather-mcp, github.com/weather-mcp)'
23
+ });
24
+ /**
25
+ * Initialize the Open-Meteo service for historical data
26
+ * No API key required - free for non-commercial use
27
+ */
28
+ const openMeteoService = new OpenMeteoService();
29
+ /**
30
+ * Create MCP server instance
31
+ */
32
+ const server = new Server({
33
+ name: SERVER_NAME,
34
+ version: SERVER_VERSION,
35
+ }, {
36
+ capabilities: {
37
+ tools: {},
38
+ },
39
+ });
40
+ /**
41
+ * Handler for listing available tools
42
+ */
43
+ server.setRequestHandler(ListToolsRequestSchema, async () => {
44
+ return {
45
+ tools: [
46
+ {
47
+ name: 'get_forecast',
48
+ description: 'Get future weather forecast for a location (US only). Use this for upcoming weather predictions (e.g., "tomorrow", "this week", "next 7 days"). Returns forecast data including temperature, precipitation, wind, and conditions. For current weather, use get_current_conditions. For past weather, use get_historical_weather. If this tool returns an error, check the error message for status page links and consider using check_service_status to verify API availability.',
49
+ inputSchema: {
50
+ type: 'object',
51
+ properties: {
52
+ latitude: {
53
+ type: 'number',
54
+ description: 'Latitude of the location (-90 to 90)',
55
+ minimum: -90,
56
+ maximum: 90
57
+ },
58
+ longitude: {
59
+ type: 'number',
60
+ description: 'Longitude of the location (-180 to 180)',
61
+ minimum: -180,
62
+ maximum: 180
63
+ },
64
+ days: {
65
+ type: 'number',
66
+ description: 'Number of days to include in forecast (1-7, default: 7)',
67
+ minimum: 1,
68
+ maximum: 7,
69
+ default: 7
70
+ }
71
+ },
72
+ required: ['latitude', 'longitude']
73
+ }
74
+ },
75
+ {
76
+ name: 'get_current_conditions',
77
+ description: 'Get the most recent weather observation for a location (US only). Use this for current weather or when asking about "today\'s weather", "right now", or recent conditions without a specific historical date range. Returns the latest observation from the nearest weather station. For specific past dates or date ranges, use get_historical_weather instead. If this tool returns an error, check the error message for status page links and consider using check_service_status to verify API availability.',
78
+ inputSchema: {
79
+ type: 'object',
80
+ properties: {
81
+ latitude: {
82
+ type: 'number',
83
+ description: 'Latitude of the location (-90 to 90)',
84
+ minimum: -90,
85
+ maximum: 90
86
+ },
87
+ longitude: {
88
+ type: 'number',
89
+ description: 'Longitude of the location (-180 to 180)',
90
+ minimum: -180,
91
+ maximum: 180
92
+ }
93
+ },
94
+ required: ['latitude', 'longitude']
95
+ }
96
+ },
97
+ {
98
+ name: 'get_historical_weather',
99
+ description: 'Get historical weather data for a specific date range in the past. Use this when the user asks about weather on specific past dates (e.g., "yesterday", "last week", "November 4, 2024", "30 years ago"). Automatically uses NOAA API for recent dates (last 7 days, US only) or Open-Meteo API for older dates (worldwide, back to 1940). Do NOT use for current conditions - use get_current_conditions instead. If this tool returns an error, check the error message for status page links and consider using check_service_status to verify API availability.',
100
+ inputSchema: {
101
+ type: 'object',
102
+ properties: {
103
+ latitude: {
104
+ type: 'number',
105
+ description: 'Latitude of the location (-90 to 90)',
106
+ minimum: -90,
107
+ maximum: 90
108
+ },
109
+ longitude: {
110
+ type: 'number',
111
+ description: 'Longitude of the location (-180 to 180)',
112
+ minimum: -180,
113
+ maximum: 180
114
+ },
115
+ start_date: {
116
+ type: 'string',
117
+ description: 'Start date in ISO format (YYYY-MM-DD or ISO 8601 datetime)',
118
+ },
119
+ end_date: {
120
+ type: 'string',
121
+ description: 'End date in ISO format (YYYY-MM-DD or ISO 8601 datetime)',
122
+ },
123
+ limit: {
124
+ type: 'number',
125
+ description: 'Maximum number of observations to return (default: 168 for one week of hourly data)',
126
+ minimum: 1,
127
+ maximum: 500,
128
+ default: 168
129
+ }
130
+ },
131
+ required: ['latitude', 'longitude', 'start_date', 'end_date']
132
+ }
133
+ },
134
+ {
135
+ name: 'check_service_status',
136
+ description: 'Check the operational status of the NOAA and Open-Meteo weather APIs. Use this when experiencing errors or to proactively verify service availability before making weather data requests. Returns current status, helpful messages, and links to official status pages.',
137
+ inputSchema: {
138
+ type: 'object',
139
+ properties: {},
140
+ required: []
141
+ }
142
+ }
143
+ ]
144
+ };
145
+ });
146
+ /**
147
+ * Handler for tool execution
148
+ */
149
+ server.setRequestHandler(CallToolRequestSchema, async (request) => {
150
+ const { name, arguments: args } = request.params;
151
+ try {
152
+ switch (name) {
153
+ case 'get_forecast': {
154
+ const { latitude, longitude, days = 7 } = args;
155
+ // Get forecast data
156
+ const forecast = await noaaService.getForecastByCoordinates(latitude, longitude);
157
+ const periods = forecast.properties.periods.slice(0, days * 2); // Each day typically has 2 periods (day/night)
158
+ // Format the forecast for display
159
+ let output = `# Weather Forecast\n\n`;
160
+ output += `**Location:** ${forecast.properties.elevation.value}m elevation\n`;
161
+ output += `**Updated:** ${new Date(forecast.properties.updated).toLocaleString()}\n\n`;
162
+ for (const period of periods) {
163
+ output += `## ${period.name}\n`;
164
+ output += `**Temperature:** ${period.temperature}°${period.temperatureUnit}\n`;
165
+ output += `**Wind:** ${period.windSpeed} ${period.windDirection}\n`;
166
+ output += `**Forecast:** ${period.shortForecast}\n\n`;
167
+ if (period.detailedForecast) {
168
+ output += `${period.detailedForecast}\n\n`;
169
+ }
170
+ }
171
+ return {
172
+ content: [
173
+ {
174
+ type: 'text',
175
+ text: output
176
+ }
177
+ ]
178
+ };
179
+ }
180
+ case 'get_current_conditions': {
181
+ const { latitude, longitude } = args;
182
+ // Get current observation
183
+ const observation = await noaaService.getCurrentConditions(latitude, longitude);
184
+ const props = observation.properties;
185
+ // Format current conditions
186
+ let output = `# Current Weather Conditions\n\n`;
187
+ output += `**Station:** ${props.station}\n`;
188
+ output += `**Time:** ${new Date(props.timestamp).toLocaleString()}\n\n`;
189
+ if (props.textDescription) {
190
+ output += `**Conditions:** ${props.textDescription}\n`;
191
+ }
192
+ if (props.temperature.value !== null) {
193
+ const tempF = props.temperature.unitCode.includes('degC')
194
+ ? (props.temperature.value * 9 / 5) + 32
195
+ : props.temperature.value;
196
+ output += `**Temperature:** ${Math.round(tempF)}°F\n`;
197
+ }
198
+ if (props.dewpoint.value !== null) {
199
+ const dewF = props.dewpoint.unitCode.includes('degC')
200
+ ? (props.dewpoint.value * 9 / 5) + 32
201
+ : props.dewpoint.value;
202
+ output += `**Dewpoint:** ${Math.round(dewF)}°F\n`;
203
+ }
204
+ if (props.relativeHumidity.value !== null) {
205
+ output += `**Humidity:** ${Math.round(props.relativeHumidity.value)}%\n`;
206
+ }
207
+ if (props.windSpeed.value !== null) {
208
+ const windMph = props.windSpeed.unitCode.includes('km_h')
209
+ ? props.windSpeed.value * 0.621371
210
+ : props.windSpeed.value * 2.23694; // m/s to mph
211
+ const windDir = props.windDirection.value;
212
+ output += `**Wind:** ${Math.round(windMph)} mph`;
213
+ if (windDir !== null) {
214
+ output += ` from ${Math.round(windDir)}°`;
215
+ }
216
+ output += `\n`;
217
+ }
218
+ if (props.barometricPressure.value !== null) {
219
+ const pressureInHg = props.barometricPressure.value * 0.0002953;
220
+ output += `**Pressure:** ${pressureInHg.toFixed(2)} inHg\n`;
221
+ }
222
+ if (props.visibility.value !== null) {
223
+ const visibilityMiles = props.visibility.value * 0.000621371;
224
+ output += `**Visibility:** ${visibilityMiles.toFixed(1)} miles\n`;
225
+ }
226
+ return {
227
+ content: [
228
+ {
229
+ type: 'text',
230
+ text: output
231
+ }
232
+ ]
233
+ };
234
+ }
235
+ case 'get_historical_weather': {
236
+ const { latitude, longitude, start_date, end_date, limit = 168 } = args;
237
+ // Parse dates
238
+ const startTime = new Date(start_date);
239
+ const endTime = new Date(end_date);
240
+ // Validate date parsing
241
+ if (isNaN(startTime.getTime()) || isNaN(endTime.getTime())) {
242
+ throw new Error('Invalid date format. Please use ISO format (YYYY-MM-DD or full ISO 8601 datetime).');
243
+ }
244
+ // Validate date range
245
+ if (startTime > endTime) {
246
+ throw new Error(`Invalid date range: start date (${start_date}) must be before end date (${end_date}).`);
247
+ }
248
+ // Validate dates are not in the future
249
+ const now = new Date();
250
+ if (startTime > now) {
251
+ throw new Error(`Start date (${start_date}) cannot be in the future. Current date is ${now.toISOString().split('T')[0]}.`);
252
+ }
253
+ if (endTime > now) {
254
+ throw new Error(`End date (${end_date}) cannot be in the future. Current date is ${now.toISOString().split('T')[0]}.`);
255
+ }
256
+ // Determine which API to use based on date range
257
+ // If start date is more than 7 days old, use CDO API for archival data
258
+ const sevenDaysAgo = new Date(now.getTime() - 7 * 24 * 60 * 60 * 1000);
259
+ const useArchivalData = startTime < sevenDaysAgo;
260
+ if (useArchivalData) {
261
+ // Use Open-Meteo API for historical/archival data
262
+ try {
263
+ // Determine whether to use hourly or daily data based on date range
264
+ const daysDiff = Math.ceil((endTime.getTime() - startTime.getTime()) / (1000 * 60 * 60 * 24));
265
+ const useHourly = daysDiff <= 31; // Use hourly for up to 31 days
266
+ const weatherData = await openMeteoService.getHistoricalWeather(latitude, longitude, start_date.split('T')[0], // Ensure YYYY-MM-DD format
267
+ end_date.split('T')[0], useHourly);
268
+ // Format the response based on data granularity
269
+ if (useHourly && weatherData.hourly) {
270
+ // Format hourly observations
271
+ let output = `# Historical Weather Observations (Hourly)\n\n`;
272
+ output += `**Period:** ${startTime.toLocaleDateString()} to ${endTime.toLocaleDateString()}\n`;
273
+ output += `**Location:** ${weatherData.latitude.toFixed(4)}°N, ${Math.abs(weatherData.longitude).toFixed(4)}°${weatherData.longitude >= 0 ? 'E' : 'W'} (${weatherData.elevation}m elevation)\n`;
274
+ output += `**Number of observations:** ${weatherData.hourly.time.length}\n`;
275
+ output += `**Data source:** Open-Meteo Historical Weather API (Reanalysis)\n\n`;
276
+ const maxObservations = Math.min(limit, weatherData.hourly.time.length);
277
+ for (let i = 0; i < maxObservations; i++) {
278
+ const time = new Date(weatherData.hourly.time[i]);
279
+ output += `## ${time.toLocaleString()}\n`;
280
+ if (weatherData.hourly.temperature_2m?.[i] !== null && weatherData.hourly.temperature_2m?.[i] !== undefined) {
281
+ output += `- **Temperature:** ${Math.round(weatherData.hourly.temperature_2m[i])}°F\n`;
282
+ }
283
+ if (weatherData.hourly.apparent_temperature?.[i] !== null && weatherData.hourly.apparent_temperature?.[i] !== undefined) {
284
+ output += `- **Feels Like:** ${Math.round(weatherData.hourly.apparent_temperature[i])}°F\n`;
285
+ }
286
+ if (weatherData.hourly.weather_code?.[i] !== null && weatherData.hourly.weather_code?.[i] !== undefined) {
287
+ output += `- **Conditions:** ${openMeteoService.getWeatherDescription(weatherData.hourly.weather_code[i])}\n`;
288
+ }
289
+ if (weatherData.hourly.precipitation?.[i] !== null && weatherData.hourly.precipitation?.[i] !== undefined && weatherData.hourly.precipitation[i] > 0) {
290
+ output += `- **Precipitation:** ${weatherData.hourly.precipitation[i].toFixed(2)} in\n`;
291
+ }
292
+ if (weatherData.hourly.snowfall?.[i] !== null && weatherData.hourly.snowfall?.[i] !== undefined && weatherData.hourly.snowfall[i] > 0) {
293
+ output += `- **Snowfall:** ${weatherData.hourly.snowfall[i].toFixed(1)} in\n`;
294
+ }
295
+ if (weatherData.hourly.wind_speed_10m?.[i] !== null && weatherData.hourly.wind_speed_10m?.[i] !== undefined) {
296
+ output += `- **Wind:** ${Math.round(weatherData.hourly.wind_speed_10m[i])} mph`;
297
+ if (weatherData.hourly.wind_direction_10m?.[i] !== null && weatherData.hourly.wind_direction_10m?.[i] !== undefined) {
298
+ output += ` from ${Math.round(weatherData.hourly.wind_direction_10m[i])}°`;
299
+ }
300
+ output += `\n`;
301
+ }
302
+ if (weatherData.hourly.relative_humidity_2m?.[i] !== null && weatherData.hourly.relative_humidity_2m?.[i] !== undefined) {
303
+ output += `- **Humidity:** ${Math.round(weatherData.hourly.relative_humidity_2m[i])}%\n`;
304
+ }
305
+ if (weatherData.hourly.pressure_msl?.[i] !== null && weatherData.hourly.pressure_msl?.[i] !== undefined) {
306
+ const pressureInHg = weatherData.hourly.pressure_msl[i] * 0.02953;
307
+ output += `- **Pressure:** ${pressureInHg.toFixed(2)} inHg\n`;
308
+ }
309
+ if (weatherData.hourly.cloud_cover?.[i] !== null && weatherData.hourly.cloud_cover?.[i] !== undefined) {
310
+ output += `- **Cloud Cover:** ${weatherData.hourly.cloud_cover[i]}%\n`;
311
+ }
312
+ output += `\n`;
313
+ }
314
+ return {
315
+ content: [
316
+ {
317
+ type: 'text',
318
+ text: output
319
+ }
320
+ ]
321
+ };
322
+ }
323
+ else if (weatherData.daily) {
324
+ // Format daily summaries
325
+ let output = `# Historical Weather Data (Daily Summaries)\n\n`;
326
+ output += `**Period:** ${startTime.toLocaleDateString()} to ${endTime.toLocaleDateString()}\n`;
327
+ output += `**Location:** ${weatherData.latitude.toFixed(4)}°N, ${Math.abs(weatherData.longitude).toFixed(4)}°${weatherData.longitude >= 0 ? 'E' : 'W'} (${weatherData.elevation}m elevation)\n`;
328
+ output += `**Number of days:** ${weatherData.daily.time.length}\n`;
329
+ output += `**Data source:** Open-Meteo Historical Weather API (Reanalysis)\n\n`;
330
+ for (let i = 0; i < weatherData.daily.time.length; i++) {
331
+ const date = new Date(weatherData.daily.time[i]);
332
+ output += `## ${date.toLocaleDateString()}\n`;
333
+ if (weatherData.daily.temperature_2m_max?.[i] !== null && weatherData.daily.temperature_2m_max?.[i] !== undefined) {
334
+ output += `- **High Temperature:** ${Math.round(weatherData.daily.temperature_2m_max[i])}°F\n`;
335
+ }
336
+ if (weatherData.daily.temperature_2m_min?.[i] !== null && weatherData.daily.temperature_2m_min?.[i] !== undefined) {
337
+ output += `- **Low Temperature:** ${Math.round(weatherData.daily.temperature_2m_min[i])}°F\n`;
338
+ }
339
+ if (weatherData.daily.temperature_2m_mean?.[i] !== null && weatherData.daily.temperature_2m_mean?.[i] !== undefined) {
340
+ output += `- **Average Temperature:** ${Math.round(weatherData.daily.temperature_2m_mean[i])}°F\n`;
341
+ }
342
+ if (weatherData.daily.weather_code?.[i] !== null && weatherData.daily.weather_code?.[i] !== undefined) {
343
+ output += `- **Conditions:** ${openMeteoService.getWeatherDescription(weatherData.daily.weather_code[i])}\n`;
344
+ }
345
+ if (weatherData.daily.precipitation_sum?.[i] !== null && weatherData.daily.precipitation_sum?.[i] !== undefined) {
346
+ output += `- **Precipitation:** ${weatherData.daily.precipitation_sum[i].toFixed(2)} in\n`;
347
+ }
348
+ if (weatherData.daily.snowfall_sum?.[i] !== null && weatherData.daily.snowfall_sum?.[i] !== undefined && weatherData.daily.snowfall_sum[i] > 0) {
349
+ output += `- **Snowfall:** ${weatherData.daily.snowfall_sum[i].toFixed(1)} in\n`;
350
+ }
351
+ if (weatherData.daily.wind_speed_10m_max?.[i] !== null && weatherData.daily.wind_speed_10m_max?.[i] !== undefined) {
352
+ output += `- **Max Wind Speed:** ${Math.round(weatherData.daily.wind_speed_10m_max[i])} mph\n`;
353
+ }
354
+ output += `\n`;
355
+ }
356
+ return {
357
+ content: [
358
+ {
359
+ type: 'text',
360
+ text: output
361
+ }
362
+ ]
363
+ };
364
+ }
365
+ else {
366
+ throw new Error('No weather data available in response');
367
+ }
368
+ }
369
+ catch (error) {
370
+ // If Open-Meteo API fails, provide helpful error message
371
+ const errorMessage = error instanceof Error ? error.message : 'Unknown error';
372
+ throw new Error(`Unable to retrieve historical data: ${errorMessage}`);
373
+ }
374
+ }
375
+ else {
376
+ // Use real-time NOAA API for recent data (last 7 days)
377
+ const observations = await noaaService.getHistoricalObservations(latitude, longitude, startTime, endTime, limit);
378
+ if (!observations.features || observations.features.length === 0) {
379
+ return {
380
+ content: [
381
+ {
382
+ type: 'text',
383
+ text: `No historical observations found for the specified date range (${start_date} to ${end_date}).\n\nThis may occur because:\n- The dates are outside the station's available data range\n- There are gaps in the observation records for this location\n- The weather station near this location may not have archived data for these dates\n\nNote: Historical weather data availability varies by location and weather station. Some stations have limited historical records.`
384
+ }
385
+ ]
386
+ };
387
+ }
388
+ // Format the observations
389
+ let output = `# Historical Weather Observations\n\n`;
390
+ output += `**Period:** ${startTime.toLocaleDateString()} to ${endTime.toLocaleDateString()}\n`;
391
+ output += `**Number of observations:** ${observations.features.length}\n`;
392
+ output += `**Data source:** NOAA Real-time API\n\n`;
393
+ for (const obs of observations.features) {
394
+ const props = obs.properties;
395
+ output += `## ${new Date(props.timestamp).toLocaleString()}\n`;
396
+ if (props.temperature.value !== null) {
397
+ const tempF = props.temperature.unitCode.includes('degC')
398
+ ? (props.temperature.value * 9 / 5) + 32
399
+ : props.temperature.value;
400
+ output += `- **Temperature:** ${Math.round(tempF)}°F\n`;
401
+ }
402
+ if (props.textDescription) {
403
+ output += `- **Conditions:** ${props.textDescription}\n`;
404
+ }
405
+ if (props.windSpeed.value !== null) {
406
+ const windMph = props.windSpeed.unitCode.includes('km_h')
407
+ ? props.windSpeed.value * 0.621371
408
+ : props.windSpeed.value * 2.23694;
409
+ output += `- **Wind:** ${Math.round(windMph)} mph\n`;
410
+ }
411
+ output += `\n`;
412
+ }
413
+ return {
414
+ content: [
415
+ {
416
+ type: 'text',
417
+ text: output
418
+ }
419
+ ]
420
+ };
421
+ }
422
+ }
423
+ case 'check_service_status': {
424
+ // Check status of both services
425
+ const noaaStatus = await noaaService.checkServiceStatus();
426
+ const openMeteoStatus = await openMeteoService.checkServiceStatus();
427
+ // Format the status report
428
+ let output = `# Weather API Service Status\n\n`;
429
+ output += `**Check Time:** ${new Date().toLocaleString()}\n\n`;
430
+ // NOAA Status
431
+ output += `## NOAA Weather API (Forecasts & Current Conditions)\n\n`;
432
+ output += `**Status:** ${noaaStatus.operational ? '✅ Operational' : '❌ Issues Detected'}\n`;
433
+ output += `**Message:** ${noaaStatus.message}\n`;
434
+ output += `**Status Page:** ${noaaStatus.statusPage}\n`;
435
+ output += `**Coverage:** United States locations only\n\n`;
436
+ if (!noaaStatus.operational) {
437
+ output += `**Recommended Actions:**\n`;
438
+ output += `- Check planned outages: https://weather-gov.github.io/api/planned-outages\n`;
439
+ output += `- View service notices: https://www.weather.gov/notification\n`;
440
+ output += `- Report issues: nco.ops@noaa.gov or (301) 683-1518\n\n`;
441
+ }
442
+ // Open-Meteo Status
443
+ output += `## Open-Meteo API (Historical Weather Data)\n\n`;
444
+ output += `**Status:** ${openMeteoStatus.operational ? '✅ Operational' : '❌ Issues Detected'}\n`;
445
+ output += `**Message:** ${openMeteoStatus.message}\n`;
446
+ output += `**Status Page:** ${openMeteoStatus.statusPage}\n`;
447
+ output += `**Coverage:** Global (worldwide locations)\n\n`;
448
+ if (!openMeteoStatus.operational) {
449
+ output += `**Recommended Actions:**\n`;
450
+ output += `- Check production status: https://open-meteo.com/en/docs/model-updates\n`;
451
+ output += `- View GitHub issues: https://github.com/open-meteo/open-meteo/issues\n`;
452
+ output += `- Review documentation: https://open-meteo.com/en/docs\n\n`;
453
+ }
454
+ // Overall status summary
455
+ const bothOperational = noaaStatus.operational && openMeteoStatus.operational;
456
+ const neitherOperational = !noaaStatus.operational && !openMeteoStatus.operational;
457
+ if (bothOperational) {
458
+ output += `## Overall Status: ✅ All Services Operational\n\n`;
459
+ output += `Both NOAA and Open-Meteo APIs are functioning normally. Weather data requests should succeed.\n`;
460
+ }
461
+ else if (neitherOperational) {
462
+ output += `## Overall Status: ❌ Multiple Service Issues\n\n`;
463
+ output += `Both weather APIs are experiencing issues. Please check the status pages above for updates.\n`;
464
+ }
465
+ else {
466
+ output += `## Overall Status: ⚠️ Partial Service Availability\n\n`;
467
+ if (noaaStatus.operational) {
468
+ output += `NOAA API is operational: Forecasts and current conditions for US locations are available.\n`;
469
+ output += `Open-Meteo API has issues: Historical weather data may be unavailable.\n`;
470
+ }
471
+ else {
472
+ output += `Open-Meteo API is operational: Historical weather data is available globally.\n`;
473
+ output += `NOAA API has issues: Forecasts and current conditions for US locations may be unavailable.\n`;
474
+ }
475
+ }
476
+ return {
477
+ content: [
478
+ {
479
+ type: 'text',
480
+ text: output
481
+ }
482
+ ]
483
+ };
484
+ }
485
+ default:
486
+ throw new Error(`Unknown tool: ${name}`);
487
+ }
488
+ }
489
+ catch (error) {
490
+ const errorMessage = error instanceof Error ? error.message : 'Unknown error occurred';
491
+ return {
492
+ content: [
493
+ {
494
+ type: 'text',
495
+ text: `Error: ${errorMessage}`
496
+ }
497
+ ],
498
+ isError: true
499
+ };
500
+ }
501
+ });
502
+ /**
503
+ * Start the server
504
+ */
505
+ async function main() {
506
+ const transport = new StdioServerTransport();
507
+ await server.connect(transport);
508
+ // Log to stderr so it doesn't interfere with MCP communication
509
+ console.error('Weather MCP Server running on stdio');
510
+ }
511
+ main().catch((error) => {
512
+ console.error('Fatal error in main():', error);
513
+ process.exit(1);
514
+ });
515
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;GAGG;AAEH,oEAAoE;AACpE,OAAO,eAAe,CAAC;AAEvB,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EACL,qBAAqB,EACrB,sBAAsB,GACvB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D;;GAEG;AACH,MAAM,WAAW,GAAG,aAAa,CAAC;AAClC,MAAM,cAAc,GAAG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CAAC,CAAC,CAAC;AAEH;;GAEG;AACH,KAAK,UAAU,IAAI;IACjB,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAEhC,+DAA+D;IAC/D,OAAO,CAAC,KAAK,CAAC,qCAAqC,CAAC,CAAC;AACvD,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,OAAO,CAAC,KAAK,CAAC,wBAAwB,EAAE,KAAK,CAAC,CAAC;IAC/C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
@@ -0,0 +1,74 @@
1
+ /**
2
+ * Service for interacting with the NOAA Weather API
3
+ */
4
+ import type { PointsResponse, ForecastResponse, ObservationResponse, ObservationCollectionResponse, StationCollectionResponse } from '../types/noaa.js';
5
+ export interface NOAAServiceConfig {
6
+ userAgent?: string;
7
+ baseURL?: string;
8
+ timeout?: number;
9
+ maxRetries?: number;
10
+ }
11
+ export declare class NOAAService {
12
+ private client;
13
+ private maxRetries;
14
+ constructor(config?: NOAAServiceConfig);
15
+ /**
16
+ * Handle API errors with retry logic and helpful status information
17
+ */
18
+ private handleError;
19
+ /**
20
+ * Make request with retry logic
21
+ */
22
+ private makeRequest;
23
+ /**
24
+ * Check if the NOAA API is operational
25
+ * Performs a lightweight health check by requesting a well-known endpoint
26
+ * @returns Object with status information
27
+ */
28
+ checkServiceStatus(): Promise<{
29
+ operational: boolean;
30
+ message: string;
31
+ statusPage: string;
32
+ timestamp: string;
33
+ }>;
34
+ /**
35
+ * Convert lat/lon coordinates to NWS grid information
36
+ * This is the first step for getting forecast or observation data
37
+ */
38
+ getPointData(latitude: number, longitude: number): Promise<PointsResponse>;
39
+ /**
40
+ * Get forecast for a location using grid coordinates
41
+ */
42
+ getForecast(office: string, gridX: number, gridY: number): Promise<ForecastResponse>;
43
+ /**
44
+ * Get hourly forecast for a location using grid coordinates
45
+ */
46
+ getHourlyForecast(office: string, gridX: number, gridY: number): Promise<ForecastResponse>;
47
+ /**
48
+ * Get forecast for a location using lat/lon (convenience method)
49
+ * This combines getPointData and getForecast
50
+ */
51
+ getForecastByCoordinates(latitude: number, longitude: number): Promise<ForecastResponse>;
52
+ /**
53
+ * Get nearest observation stations for a location
54
+ */
55
+ getStations(latitude: number, longitude: number): Promise<StationCollectionResponse>;
56
+ /**
57
+ * Get the latest observation from a station
58
+ */
59
+ getLatestObservation(stationId: string): Promise<ObservationResponse>;
60
+ /**
61
+ * Get observations from a station within a time range
62
+ */
63
+ getObservations(stationId: string, startTime?: Date, endTime?: Date, limit?: number): Promise<ObservationCollectionResponse>;
64
+ /**
65
+ * Get current conditions for a location (convenience method)
66
+ * This combines getStations and getLatestObservation
67
+ */
68
+ getCurrentConditions(latitude: number, longitude: number): Promise<ObservationResponse>;
69
+ /**
70
+ * Get historical observations for a location (convenience method)
71
+ */
72
+ getHistoricalObservations(latitude: number, longitude: number, startTime: Date, endTime: Date, limit?: number): Promise<ObservationCollectionResponse>;
73
+ }
74
+ //# sourceMappingURL=noaa.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"noaa.d.ts","sourceRoot":"","sources":["../../src/services/noaa.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,OAAO,KAAK,EACV,cAAc,EACd,gBAAgB,EAChB,mBAAmB,EACnB,6BAA6B,EAC7B,yBAAyB,EAE1B,MAAM,kBAAkB,CAAC;AAE1B,MAAM,WAAW,iBAAiB;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,qBAAa,WAAW;IACtB,OAAO,CAAC,MAAM,CAAgB;IAC9B,OAAO,CAAC,UAAU,CAAS;gBAEf,MAAM,GAAE,iBAAsB;IA0B1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