@dangahagan/weather-mcp 1.2.1 → 1.6.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 +290 -10
- package/dist/config/tools.d.ts +44 -0
- package/dist/config/tools.d.ts.map +1 -0
- package/dist/config/tools.js +256 -0
- package/dist/config/tools.js.map +1 -0
- package/dist/errors/ApiError.d.ts +6 -6
- package/dist/errors/ApiError.d.ts.map +1 -1
- package/dist/errors/ApiError.js +2 -1
- package/dist/errors/ApiError.js.map +1 -1
- package/dist/handlers/forecastHandler.d.ts.map +1 -1
- package/dist/handlers/forecastHandler.js +5 -3
- package/dist/handlers/forecastHandler.js.map +1 -1
- package/dist/handlers/lightningHandler.d.ts +14 -0
- package/dist/handlers/lightningHandler.d.ts.map +1 -0
- package/dist/handlers/lightningHandler.js +258 -0
- package/dist/handlers/lightningHandler.js.map +1 -0
- package/dist/handlers/locationHandler.d.ts.map +1 -1
- package/dist/handlers/locationHandler.js +27 -1
- package/dist/handlers/locationHandler.js.map +1 -1
- package/dist/handlers/marineConditionsHandler.d.ts.map +1 -1
- package/dist/handlers/marineConditionsHandler.js +11 -7
- package/dist/handlers/marineConditionsHandler.js.map +1 -1
- package/dist/handlers/riverConditionsHandler.d.ts +11 -0
- package/dist/handlers/riverConditionsHandler.d.ts.map +1 -0
- package/dist/handlers/riverConditionsHandler.js +176 -0
- package/dist/handlers/riverConditionsHandler.js.map +1 -0
- package/dist/handlers/statusHandler.d.ts +1 -1
- package/dist/handlers/statusHandler.d.ts.map +1 -1
- package/dist/handlers/statusHandler.js +10 -1
- package/dist/handlers/statusHandler.js.map +1 -1
- package/dist/handlers/weatherImageryHandler.d.ts +14 -0
- package/dist/handlers/weatherImageryHandler.d.ts.map +1 -0
- package/dist/handlers/weatherImageryHandler.js +143 -0
- package/dist/handlers/weatherImageryHandler.js.map +1 -0
- package/dist/handlers/wildfireHandler.d.ts +11 -0
- package/dist/handlers/wildfireHandler.d.ts.map +1 -0
- package/dist/handlers/wildfireHandler.js +186 -0
- package/dist/handlers/wildfireHandler.js.map +1 -0
- package/dist/index.js +422 -228
- package/dist/index.js.map +1 -1
- package/dist/services/blitzortung.d.ts +67 -0
- package/dist/services/blitzortung.d.ts.map +1 -0
- package/dist/services/blitzortung.js +475 -0
- package/dist/services/blitzortung.js.map +1 -0
- package/dist/services/nifc.d.ts +44 -0
- package/dist/services/nifc.d.ts.map +1 -0
- package/dist/services/nifc.js +151 -0
- package/dist/services/nifc.js.map +1 -0
- package/dist/services/noaa.d.ts +56 -1
- package/dist/services/noaa.d.ts.map +1 -1
- package/dist/services/noaa.js +232 -1
- package/dist/services/noaa.js.map +1 -1
- package/dist/services/rainviewer.d.ts +37 -0
- package/dist/services/rainviewer.d.ts.map +1 -0
- package/dist/services/rainviewer.js +115 -0
- package/dist/services/rainviewer.js.map +1 -0
- package/dist/types/imagery.d.ts +82 -0
- package/dist/types/imagery.d.ts.map +1 -0
- package/dist/types/imagery.js +6 -0
- package/dist/types/imagery.js.map +1 -0
- package/dist/types/lightning.d.ts +89 -0
- package/dist/types/lightning.d.ts.map +1 -0
- package/dist/types/lightning.js +6 -0
- package/dist/types/lightning.js.map +1 -0
- package/dist/types/noaa.d.ts +170 -0
- package/dist/types/noaa.d.ts.map +1 -1
- package/dist/types/wildfire.d.ts +83 -0
- package/dist/types/wildfire.d.ts.map +1 -0
- package/dist/types/wildfire.js +5 -0
- package/dist/types/wildfire.js.map +1 -0
- package/dist/utils/distance.d.ts +25 -0
- package/dist/utils/distance.d.ts.map +1 -0
- package/dist/utils/distance.js +40 -0
- package/dist/utils/distance.js.map +1 -0
- package/dist/utils/geohash.d.ts +62 -0
- package/dist/utils/geohash.d.ts.map +1 -0
- package/dist/utils/geohash.js +146 -0
- package/dist/utils/geohash.js.map +1 -0
- package/dist/utils/logger.d.ts +16 -0
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/logger.js +25 -0
- package/dist/utils/logger.js.map +1 -1
- package/dist/utils/timezone.d.ts.map +1 -1
- package/dist/utils/timezone.js +7 -9
- package/dist/utils/timezone.js.map +1 -1
- package/package.json +9 -5
package/README.md
CHANGED
|
@@ -91,6 +91,39 @@ An MCP (Model Context Protocol) server that provides **global weather data** to
|
|
|
91
91
|
- Safety assessment for maritime activities (sailing, boating, surfing)
|
|
92
92
|
- Wave interpretation guide based on Douglas Sea Scale
|
|
93
93
|
- Important: Data has limited coastal accuracy - NOT for navigation
|
|
94
|
+
- **Weather Imagery**: Visual weather radar and precipitation maps (NEW in v1.5.0)
|
|
95
|
+
- Global precipitation radar from RainViewer API
|
|
96
|
+
- Static radar images showing current precipitation
|
|
97
|
+
- Animated radar loops (up to 2 hours of history)
|
|
98
|
+
- Tile URLs for efficient rendering
|
|
99
|
+
- Automatic coordinate-to-tile calculation
|
|
100
|
+
- Visual confirmation of approaching weather
|
|
101
|
+
- Free, no API key required
|
|
102
|
+
- **Lightning Activity**: Real-time lightning strike detection and safety monitoring (NEW in v1.5.0)
|
|
103
|
+
- Real-time strike detection from Blitzortung.org network
|
|
104
|
+
- Strikes within customizable radius (default: 100km)
|
|
105
|
+
- 4-level safety assessment (Safe, Elevated, High, Extreme)
|
|
106
|
+
- Distance to nearest strike with comprehensive statistics
|
|
107
|
+
- Strike polarity and amplitude information
|
|
108
|
+
- Safety recommendations based on proximity
|
|
109
|
+
- Critical for outdoor activity safety planning
|
|
110
|
+
- Free, no API key required
|
|
111
|
+
- **River Conditions**: Monitor river levels and flood status for safety and recreation (NEW in v1.6.0)
|
|
112
|
+
- Current water levels from NOAA and USGS gauges
|
|
113
|
+
- Flood stage thresholds (action, minor, moderate, major)
|
|
114
|
+
- Streamflow data in cubic feet per second
|
|
115
|
+
- Distance-based gauge filtering within customizable radius
|
|
116
|
+
- Safety assessment for boating and recreation
|
|
117
|
+
- Historical flood crest data when available
|
|
118
|
+
- US coverage via NOAA NWPS and USGS Water Services
|
|
119
|
+
- **Wildfire Information**: Track active wildfires and fire perimeters (NEW in v1.6.0)
|
|
120
|
+
- Active wildfire locations and prescribed burns
|
|
121
|
+
- Fire size, containment status, and discovery date
|
|
122
|
+
- Distance-based proximity filtering
|
|
123
|
+
- 4-level safety assessment (Extreme Danger, High Alert, Caution, Awareness)
|
|
124
|
+
- Evacuation recommendations based on proximity
|
|
125
|
+
- Detailed fire attributes (type, location, status)
|
|
126
|
+
- Data from NIFC WFIGS (National Interagency Fire Center)
|
|
94
127
|
- **Service Status Checking**: Proactively verify API availability with health checks
|
|
95
128
|
- **Enhanced Error Handling**: Detailed, actionable error messages with status page links
|
|
96
129
|
- **Intelligent Caching**: Built-in in-memory cache reduces API calls and improves performance
|
|
@@ -112,6 +145,10 @@ The cache automatically stores and retrieves weather data with intelligent expir
|
|
|
112
145
|
|
|
113
146
|
- **Location Searches**: Cached for 30 days (locations don't move)
|
|
114
147
|
- **Climate Normals**: Cached indefinitely (30-year averages are static) - NEW in v1.2.0
|
|
148
|
+
- **Weather Imagery**: Cached for 15 minutes (radar updates frequently) - NEW in v1.5.0
|
|
149
|
+
- **Lightning Strikes**: Cached for 5 minutes (real-time safety data) - NEW in v1.5.0
|
|
150
|
+
- **River Conditions**: Cached for 1 hour (gauge data updates frequently) - NEW in v1.6.0
|
|
151
|
+
- **Wildfire Information**: Cached for 30 minutes (fire data changes rapidly) - NEW in v1.6.0
|
|
115
152
|
- **Marine Conditions**: Cached for 1 hour (marine data updates hourly) - NEW in v0.6.0
|
|
116
153
|
- **Air Quality Data**: Cached for 1 hour (air quality updates hourly) - v0.5.0
|
|
117
154
|
- **Fire Weather Data**: Cached for 2 hours (gridpoint data updates ~hourly) - v0.5.0
|
|
@@ -124,6 +161,45 @@ The cache automatically stores and retrieves weather data with intelligent expir
|
|
|
124
161
|
|
|
125
162
|
### Configuration
|
|
126
163
|
|
|
164
|
+
#### Tool Selection (NEW in v1.4.0)
|
|
165
|
+
|
|
166
|
+
Control which MCP tools are exposed to reduce context overhead and customize functionality. By default, only **basic** tools are enabled.
|
|
167
|
+
|
|
168
|
+
**Available Presets:**
|
|
169
|
+
- `basic` (default): Essential weather tools (5 tools) - forecast, current_conditions, alerts, search_location, check_service_status
|
|
170
|
+
- `standard`: Basic + historical_weather (6 tools)
|
|
171
|
+
- `full`: Standard + air_quality (7 tools)
|
|
172
|
+
- `all`: All available tools (12 tools) - includes marine_conditions, weather_imagery, lightning_activity, river_conditions, wildfire_info
|
|
173
|
+
|
|
174
|
+
**Configuration Examples:**
|
|
175
|
+
|
|
176
|
+
```bash
|
|
177
|
+
# Use a preset
|
|
178
|
+
export ENABLED_TOOLS=full
|
|
179
|
+
|
|
180
|
+
# Select specific tools
|
|
181
|
+
export ENABLED_TOOLS=forecast,current,alerts,air_quality
|
|
182
|
+
|
|
183
|
+
# Add tools to a preset
|
|
184
|
+
export ENABLED_TOOLS=basic,+historical,+air_quality
|
|
185
|
+
|
|
186
|
+
# Remove tools from a preset
|
|
187
|
+
export ENABLED_TOOLS=all,-marine
|
|
188
|
+
|
|
189
|
+
# Complex combinations
|
|
190
|
+
export ENABLED_TOOLS=standard,+air_quality,-alerts
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
**Tool Aliases:**
|
|
194
|
+
Short names are supported: `forecast`, `current`, `conditions`, `alerts`, `warnings`, `historical`, `history`, `status`, `location`, `search`, `air_quality`, `aqi`, `marine`, `ocean`, `waves`, `imagery`, `radar`, `satellite`, `lightning`, `strikes`, `thunderstorm`
|
|
195
|
+
|
|
196
|
+
**Benefits:**
|
|
197
|
+
- **Reduced Context**: Load only needed tools to reduce initial MCP context
|
|
198
|
+
- **Better Security**: Only expose necessary functionality
|
|
199
|
+
- **Customization**: Tailor the server to your specific use case
|
|
200
|
+
|
|
201
|
+
#### Cache Configuration
|
|
202
|
+
|
|
127
203
|
Caching is **enabled by default** with sensible settings. To customize:
|
|
128
204
|
|
|
129
205
|
```bash
|
|
@@ -162,9 +238,9 @@ For detailed information about caching architecture and configuration, see [.git
|
|
|
162
238
|
npm install -g @dangahagan/weather-mcp
|
|
163
239
|
```
|
|
164
240
|
|
|
165
|
-
**Via npx (no installation):**
|
|
241
|
+
**Via npx (no installation, always uses latest):**
|
|
166
242
|
```bash
|
|
167
|
-
npx -y @dangahagan/weather-mcp
|
|
243
|
+
npx -y @dangahagan/weather-mcp@latest
|
|
168
244
|
```
|
|
169
245
|
|
|
170
246
|
Then configure in your MCP client using:
|
|
@@ -173,7 +249,7 @@ Then configure in your MCP client using:
|
|
|
173
249
|
"mcpServers": {
|
|
174
250
|
"weather": {
|
|
175
251
|
"command": "npx",
|
|
176
|
-
"args": ["-y", "@dangahagan/weather-mcp"]
|
|
252
|
+
"args": ["-y", "@dangahagan/weather-mcp@latest"]
|
|
177
253
|
}
|
|
178
254
|
}
|
|
179
255
|
}
|
|
@@ -206,6 +282,59 @@ npm install
|
|
|
206
282
|
npm run build
|
|
207
283
|
```
|
|
208
284
|
|
|
285
|
+
## Upgrading to Latest Version
|
|
286
|
+
|
|
287
|
+
### Upgrading npm Installation
|
|
288
|
+
|
|
289
|
+
If you installed via npm globally:
|
|
290
|
+
|
|
291
|
+
```bash
|
|
292
|
+
# Check your current version
|
|
293
|
+
npm list -g @dangahagan/weather-mcp
|
|
294
|
+
|
|
295
|
+
# Update to latest version
|
|
296
|
+
npm update -g @dangahagan/weather-mcp
|
|
297
|
+
|
|
298
|
+
# Or reinstall to ensure latest version
|
|
299
|
+
npm install -g @dangahagan/weather-mcp@latest
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
**For npx users:** If you're using `@latest` (recommended), no upgrade needed! The `npx -y @dangahagan/weather-mcp@latest` command always fetches the newest version.
|
|
303
|
+
|
|
304
|
+
### Upgrading from Source
|
|
305
|
+
|
|
306
|
+
If you cloned the repository:
|
|
307
|
+
|
|
308
|
+
```bash
|
|
309
|
+
# Navigate to your installation directory
|
|
310
|
+
cd /path/to/weather-mcp
|
|
311
|
+
|
|
312
|
+
# Fetch latest changes
|
|
313
|
+
git fetch origin
|
|
314
|
+
|
|
315
|
+
# Check current version
|
|
316
|
+
git describe --tags
|
|
317
|
+
|
|
318
|
+
# Update to latest release
|
|
319
|
+
git checkout main
|
|
320
|
+
git pull origin main
|
|
321
|
+
|
|
322
|
+
# Reinstall dependencies and rebuild
|
|
323
|
+
npm install
|
|
324
|
+
npm run build
|
|
325
|
+
```
|
|
326
|
+
|
|
327
|
+
**After upgrading:**
|
|
328
|
+
- Restart your MCP client (Claude Desktop, Claude Code, etc.)
|
|
329
|
+
- Check the changelog at [CHANGELOG.md](./CHANGELOG.md) for breaking changes
|
|
330
|
+
- Verify the new version with the latest features
|
|
331
|
+
|
|
332
|
+
**Version Check:**
|
|
333
|
+
You can verify your installed version by checking:
|
|
334
|
+
- npm: `npm list -g @dangahagan/weather-mcp`
|
|
335
|
+
- Source: `git describe --tags` or check `package.json`
|
|
336
|
+
- Latest release: https://github.com/dgahagan/weather-mcp/releases
|
|
337
|
+
|
|
209
338
|
## Usage with AI Assistants
|
|
210
339
|
|
|
211
340
|
This MCP server works with any client that supports the Model Context Protocol, including:
|
|
@@ -225,6 +354,19 @@ For detailed setup instructions for each client, see **[CLIENT_SETUP.md](./docs/
|
|
|
225
354
|
|
|
226
355
|
Edit `~/.config/claude-code/mcp_settings.json` (macOS/Linux) or `%APPDATA%\claude-code\mcp_settings.json` (Windows):
|
|
227
356
|
|
|
357
|
+
**Recommended (npx, always latest):**
|
|
358
|
+
```json
|
|
359
|
+
{
|
|
360
|
+
"mcpServers": {
|
|
361
|
+
"weather": {
|
|
362
|
+
"command": "npx",
|
|
363
|
+
"args": ["-y", "@dangahagan/weather-mcp@latest"]
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
```
|
|
368
|
+
|
|
369
|
+
**Alternative (from source):**
|
|
228
370
|
```json
|
|
229
371
|
{
|
|
230
372
|
"mcpServers": {
|
|
@@ -515,6 +657,144 @@ Provides comprehensive marine weather data with intelligent dual-source support:
|
|
|
515
657
|
- Wave period for planning and safety
|
|
516
658
|
- Optional 5-day forecast with daily summaries
|
|
517
659
|
|
|
660
|
+
### 9. get_weather_imagery (NEW in v1.5.0)
|
|
661
|
+
Get weather radar and precipitation imagery for visual weather analysis.
|
|
662
|
+
|
|
663
|
+
**Parameters:**
|
|
664
|
+
- `latitude` (required): Latitude coordinate (-90 to 90)
|
|
665
|
+
- `longitude` (required): Longitude coordinate (-180 to 180)
|
|
666
|
+
- `type` (required): Imagery type - "precipitation", "radar", or "satellite" (Note: satellite not yet implemented)
|
|
667
|
+
- `animated` (optional): Return animated loop vs static image (default: false)
|
|
668
|
+
- `layers` (optional): Additional map layers (reserved for future use)
|
|
669
|
+
|
|
670
|
+
**Description:**
|
|
671
|
+
Provides access to weather radar and precipitation imagery from RainViewer API with global coverage. Returns tile URLs for efficient rendering of current precipitation or animated radar loops showing up to 2 hours of history. Perfect for visual confirmation of approaching weather systems.
|
|
672
|
+
|
|
673
|
+
**Examples:**
|
|
674
|
+
```
|
|
675
|
+
"Show me the current radar for New York"
|
|
676
|
+
"Get animated precipitation radar for London for the last 2 hours"
|
|
677
|
+
"Is there any precipitation showing on radar near me?"
|
|
678
|
+
```
|
|
679
|
+
|
|
680
|
+
**Returns:**
|
|
681
|
+
- Precipitation radar imagery (static or animated)
|
|
682
|
+
- Tile URLs for efficient rendering
|
|
683
|
+
- Frame timestamps for animated sequences
|
|
684
|
+
- Coverage area and resolution information
|
|
685
|
+
- Automatic coordinate-to-tile calculation
|
|
686
|
+
- Up to 2 hours of historical radar frames when animated
|
|
687
|
+
|
|
688
|
+
**Note:** Satellite imagery is planned for a future release. Precipitation radar provides global coverage via the free RainViewer API.
|
|
689
|
+
|
|
690
|
+
### 10. get_lightning_activity (NEW in v1.5.0)
|
|
691
|
+
Get real-time lightning strike detection and safety assessment for outdoor activity planning.
|
|
692
|
+
|
|
693
|
+
**Parameters:**
|
|
694
|
+
- `latitude` (required): Latitude coordinate (-90 to 90)
|
|
695
|
+
- `longitude` (required): Longitude coordinate (-180 to 180)
|
|
696
|
+
- `radius` (optional): Search radius in kilometers (1-500, default: 100)
|
|
697
|
+
- `timeWindow` (optional): Historical time window in minutes (1-180, default: 60)
|
|
698
|
+
|
|
699
|
+
**Description:**
|
|
700
|
+
Provides real-time lightning strike detection from the Blitzortung.org global lightning detection network. Includes comprehensive safety assessment with 4 risk levels based on strike proximity. Critical for outdoor safety planning including boating, hiking, golfing, and other outdoor activities.
|
|
701
|
+
|
|
702
|
+
**Examples:**
|
|
703
|
+
```
|
|
704
|
+
"Are there any lightning strikes near Miami?"
|
|
705
|
+
"Check for lightning activity within 50km"
|
|
706
|
+
"Is it safe to be outside based on lightning?"
|
|
707
|
+
"Show me recent lightning strikes in the last hour"
|
|
708
|
+
```
|
|
709
|
+
|
|
710
|
+
**Returns:**
|
|
711
|
+
- Real-time lightning strikes within specified radius
|
|
712
|
+
- 4-level safety assessment:
|
|
713
|
+
- **Safe** (>50km): No immediate lightning threat
|
|
714
|
+
- **Elevated** (16-50km): Monitor conditions, plan indoor access
|
|
715
|
+
- **High** (8-16km): Seek shelter immediately
|
|
716
|
+
- **Extreme** (<8km): Active thunderstorm, dangerous conditions
|
|
717
|
+
- Comprehensive statistics:
|
|
718
|
+
- Total strikes and strike density (per sq km)
|
|
719
|
+
- Strikes per minute rate
|
|
720
|
+
- Distance to nearest strike
|
|
721
|
+
- Average distance of all strikes
|
|
722
|
+
- Strike details:
|
|
723
|
+
- Polarity (cloud-to-ground vs intra-cloud)
|
|
724
|
+
- Amplitude in kiloamperes (kA)
|
|
725
|
+
- Precise timestamp and location
|
|
726
|
+
- Safety recommendations based on proximity
|
|
727
|
+
- Geographic region-optimized data retrieval
|
|
728
|
+
|
|
729
|
+
**Note:** Data provided by Blitzortung.org, a free community-operated lightning detection network. May have regional coverage variations.
|
|
730
|
+
|
|
731
|
+
### 11. get_river_conditions (NEW in v1.6.0)
|
|
732
|
+
Monitor river levels and flood status using NOAA and USGS data sources.
|
|
733
|
+
|
|
734
|
+
**Parameters:**
|
|
735
|
+
- `latitude` (required): Latitude coordinate (-90 to 90)
|
|
736
|
+
- `longitude` (required): Longitude coordinate (-180 to 180)
|
|
737
|
+
- `radius` (optional): Search radius in kilometers (1-500, default: 50)
|
|
738
|
+
|
|
739
|
+
**Description:**
|
|
740
|
+
Provides comprehensive river and streamflow monitoring for flood safety and recreation planning. Automatically finds the nearest river gauges within the specified radius and reports current water levels, flood stages, and flow rates. Uses NOAA National Water Prediction Service (NWPS) for gauge locations and USGS Water Services for real-time streamflow data.
|
|
741
|
+
|
|
742
|
+
**Examples:**
|
|
743
|
+
```
|
|
744
|
+
"What are the river conditions near St. Louis?" (latitude: 38.6270, longitude: -90.1994)
|
|
745
|
+
"Check for flooding on the Mississippi River"
|
|
746
|
+
"Is the river level safe for kayaking?"
|
|
747
|
+
"Show me nearby river gauge readings"
|
|
748
|
+
```
|
|
749
|
+
|
|
750
|
+
**Returns:**
|
|
751
|
+
- Nearest river gauges with current water levels
|
|
752
|
+
- Flood stage thresholds (action, minor, moderate, major)
|
|
753
|
+
- Current flood status and forecast
|
|
754
|
+
- Streamflow data (cubic feet per second)
|
|
755
|
+
- Distance to each gauge from query location
|
|
756
|
+
- River and location names
|
|
757
|
+
- Safety assessment for recreation
|
|
758
|
+
- Historical context (flood crests if available)
|
|
759
|
+
|
|
760
|
+
**Note:** US coverage only. Data provided by NOAA National Water Prediction Service and USGS Water Services.
|
|
761
|
+
|
|
762
|
+
### 12. get_wildfire_info (NEW in v1.6.0)
|
|
763
|
+
Monitor active wildfires and fire perimeters for safety and evacuation planning.
|
|
764
|
+
|
|
765
|
+
**Parameters:**
|
|
766
|
+
- `latitude` (required): Latitude coordinate (-90 to 90)
|
|
767
|
+
- `longitude` (required): Longitude coordinate (-180 to 180)
|
|
768
|
+
- `radius` (optional): Search radius in kilometers (1-500, default: 100)
|
|
769
|
+
|
|
770
|
+
**Description:**
|
|
771
|
+
Provides critical wildfire monitoring and safety information using NIFC (National Interagency Fire Center) data. Reports active wildfires and prescribed burns within the specified radius, including fire size, containment status, and proximity-based safety assessments. Essential for residents in fire-prone regions and outdoor activity planning.
|
|
772
|
+
|
|
773
|
+
**Examples:**
|
|
774
|
+
```
|
|
775
|
+
"Are there any wildfires near Los Angeles?" (latitude: 34.0522, longitude: -118.2437)
|
|
776
|
+
"Check for active fires in Colorado"
|
|
777
|
+
"How close is the nearest wildfire?"
|
|
778
|
+
"Show me fire perimeters and containment status"
|
|
779
|
+
```
|
|
780
|
+
|
|
781
|
+
**Returns:**
|
|
782
|
+
- Active wildfire locations within search radius
|
|
783
|
+
- Fire size in acres and hectares
|
|
784
|
+
- Containment percentage with visual indicator
|
|
785
|
+
- Distance from query location to each fire
|
|
786
|
+
- Discovery date and days active
|
|
787
|
+
- Fire type (Wildfire vs Prescribed Fire)
|
|
788
|
+
- Location details (state, county, city)
|
|
789
|
+
- 4-level safety assessment:
|
|
790
|
+
- **EXTREME DANGER** (<5km): Evacuate if advised
|
|
791
|
+
- **HIGH ALERT** (5-25km): Prepare for evacuation
|
|
792
|
+
- **CAUTION** (25-50km): Monitor conditions
|
|
793
|
+
- **AWARENESS** (>50km): Stay informed
|
|
794
|
+
- Evacuation recommendations and safety guidance
|
|
795
|
+
|
|
796
|
+
**Note:** Data from NIFC WFIGS (Wildland Fire Interagency Geospatial Services). Always consult official sources for evacuation orders at https://inciweb.nwcg.gov/
|
|
797
|
+
|
|
518
798
|
## Error Handling & Service Status
|
|
519
799
|
|
|
520
800
|
### Enhanced Error Messages
|
|
@@ -589,7 +869,7 @@ Use the `check_service_status` tool to proactively verify API availability:
|
|
|
589
869
|
|
|
590
870
|
### Automated Test Suite
|
|
591
871
|
|
|
592
|
-
This project includes a comprehensive test suite with
|
|
872
|
+
This project includes a comprehensive test suite with 1,042 automated tests:
|
|
593
873
|
|
|
594
874
|
```bash
|
|
595
875
|
# Run all tests
|
|
@@ -606,14 +886,14 @@ npm run test:ui
|
|
|
606
886
|
```
|
|
607
887
|
|
|
608
888
|
**Test Coverage:**
|
|
609
|
-
- **
|
|
610
|
-
- **100% coverage** on critical utilities (cache, validation, units, errors, normals, snow, timezone)
|
|
611
|
-
- **
|
|
612
|
-
- All tests execute in ~
|
|
889
|
+
- **1,042 tests** across unit and integration test suites (111 new tests in v1.6.0)
|
|
890
|
+
- **100% coverage** on critical utilities (cache, validation, units, errors, normals, snow, timezone, distance, geohash, security)
|
|
891
|
+
- **100% pass rate** with comprehensive security and boundary validation
|
|
892
|
+
- All tests execute in ~2 seconds
|
|
613
893
|
|
|
614
894
|
**Test Categories:**
|
|
615
|
-
- **Unit Tests** (
|
|
616
|
-
- **Integration Tests** (
|
|
895
|
+
- **Unit Tests** (965 tests) - Cache, validation, units, errors, config, retry logic, normals, snow, timezone, distance, security, geohash
|
|
896
|
+
- **Integration Tests** (77 tests) - Error recovery, service status checks, safety & hazards features
|
|
617
897
|
|
|
618
898
|
### Quick API Connectivity Test
|
|
619
899
|
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tool configuration for Weather MCP Server
|
|
3
|
+
*
|
|
4
|
+
* Supports both presets and individual tool control for flexible configuration.
|
|
5
|
+
*
|
|
6
|
+
* Usage examples:
|
|
7
|
+
* - ENABLED_TOOLS=basic # Only basic weather tools
|
|
8
|
+
* - ENABLED_TOOLS=full # All tools except experimental
|
|
9
|
+
* - ENABLED_TOOLS=basic,+air_quality # Basic tools + air quality
|
|
10
|
+
* - ENABLED_TOOLS=all,-marine # All tools except marine
|
|
11
|
+
* - ENABLED_TOOLS=forecast,current,alerts # Specific tools only
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* Available tool names in the Weather MCP Server
|
|
15
|
+
*/
|
|
16
|
+
export type ToolName = 'get_forecast' | 'get_current_conditions' | 'get_alerts' | 'get_historical_weather' | 'check_service_status' | 'search_location' | 'get_air_quality' | 'get_marine_conditions' | 'get_weather_imagery' | 'get_lightning_activity' | 'get_river_conditions' | 'get_wildfire_info';
|
|
17
|
+
/**
|
|
18
|
+
* Tool configuration singleton
|
|
19
|
+
*/
|
|
20
|
+
declare class ToolConfig {
|
|
21
|
+
private enabledTools;
|
|
22
|
+
constructor();
|
|
23
|
+
/**
|
|
24
|
+
* Check if a specific tool is enabled
|
|
25
|
+
*/
|
|
26
|
+
isEnabled(tool: ToolName): boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Get all enabled tools
|
|
29
|
+
*/
|
|
30
|
+
getEnabledTools(): ToolName[];
|
|
31
|
+
/**
|
|
32
|
+
* Get available presets
|
|
33
|
+
*/
|
|
34
|
+
static getPresets(): Record<string, ToolName[]>;
|
|
35
|
+
/**
|
|
36
|
+
* Get available tool aliases
|
|
37
|
+
*/
|
|
38
|
+
static getAliases(): Record<string, ToolName>;
|
|
39
|
+
}
|
|
40
|
+
export declare const toolConfig: ToolConfig;
|
|
41
|
+
export declare const PRESETS: Record<string, ToolName[]>;
|
|
42
|
+
export declare const ALIASES: Record<string, ToolName>;
|
|
43
|
+
export {};
|
|
44
|
+
//# sourceMappingURL=tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/config/tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH;;GAEG;AACH,MAAM,MAAM,QAAQ,GAChB,cAAc,GACd,wBAAwB,GACxB,YAAY,GACZ,wBAAwB,GACxB,sBAAsB,GACtB,iBAAiB,GACjB,iBAAiB,GACjB,uBAAuB,GACvB,qBAAqB,GACrB,wBAAwB,GACxB,sBAAsB,GACtB,mBAAmB,CAAC;AAoNxB;;GAEG;AACH,cAAM,UAAU;IACd,OAAO,CAAC,YAAY,CAAgB;;IAapC;;OAEG;IACH,SAAS,CAAC,IAAI,EAAE,QAAQ,GAAG,OAAO;IAIlC;;OAEG;IACH,eAAe,IAAI,QAAQ,EAAE;IAI7B;;OAEG;IACH,MAAM,CAAC,UAAU,IAAI,MAAM,CAAC,MAAM,EAAE,QAAQ,EAAE,CAAC;IAI/C;;OAEG;IACH,MAAM,CAAC,UAAU,IAAI,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC;CAG9C;AAGD,eAAO,MAAM,UAAU,YAAmB,CAAC;AAG3C,eAAO,MAAM,OAAO,4BAAe,CAAC;AACpC,eAAO,MAAM,OAAO,0BAAe,CAAC"}
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tool configuration for Weather MCP Server
|
|
3
|
+
*
|
|
4
|
+
* Supports both presets and individual tool control for flexible configuration.
|
|
5
|
+
*
|
|
6
|
+
* Usage examples:
|
|
7
|
+
* - ENABLED_TOOLS=basic # Only basic weather tools
|
|
8
|
+
* - ENABLED_TOOLS=full # All tools except experimental
|
|
9
|
+
* - ENABLED_TOOLS=basic,+air_quality # Basic tools + air quality
|
|
10
|
+
* - ENABLED_TOOLS=all,-marine # All tools except marine
|
|
11
|
+
* - ENABLED_TOOLS=forecast,current,alerts # Specific tools only
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* Tool presets for easy configuration
|
|
15
|
+
*/
|
|
16
|
+
const TOOL_PRESETS = {
|
|
17
|
+
// Essential weather tools - minimal overhead
|
|
18
|
+
basic: [
|
|
19
|
+
'get_forecast',
|
|
20
|
+
'get_current_conditions',
|
|
21
|
+
'get_alerts',
|
|
22
|
+
'search_location',
|
|
23
|
+
'check_service_status'
|
|
24
|
+
],
|
|
25
|
+
// Basic + historical data
|
|
26
|
+
standard: [
|
|
27
|
+
'get_forecast',
|
|
28
|
+
'get_current_conditions',
|
|
29
|
+
'get_alerts',
|
|
30
|
+
'get_historical_weather',
|
|
31
|
+
'search_location',
|
|
32
|
+
'check_service_status'
|
|
33
|
+
],
|
|
34
|
+
// Standard + environmental data
|
|
35
|
+
full: [
|
|
36
|
+
'get_forecast',
|
|
37
|
+
'get_current_conditions',
|
|
38
|
+
'get_alerts',
|
|
39
|
+
'get_historical_weather',
|
|
40
|
+
'search_location',
|
|
41
|
+
'check_service_status',
|
|
42
|
+
'get_air_quality'
|
|
43
|
+
],
|
|
44
|
+
// All available tools
|
|
45
|
+
all: [
|
|
46
|
+
'get_forecast',
|
|
47
|
+
'get_current_conditions',
|
|
48
|
+
'get_alerts',
|
|
49
|
+
'get_historical_weather',
|
|
50
|
+
'check_service_status',
|
|
51
|
+
'search_location',
|
|
52
|
+
'get_air_quality',
|
|
53
|
+
'get_marine_conditions',
|
|
54
|
+
'get_weather_imagery',
|
|
55
|
+
'get_lightning_activity',
|
|
56
|
+
'get_river_conditions',
|
|
57
|
+
'get_wildfire_info'
|
|
58
|
+
]
|
|
59
|
+
};
|
|
60
|
+
/**
|
|
61
|
+
* Tool aliases for convenience (short names)
|
|
62
|
+
*/
|
|
63
|
+
const TOOL_ALIASES = {
|
|
64
|
+
'forecast': 'get_forecast',
|
|
65
|
+
'current': 'get_current_conditions',
|
|
66
|
+
'conditions': 'get_current_conditions',
|
|
67
|
+
'alerts': 'get_alerts',
|
|
68
|
+
'warnings': 'get_alerts',
|
|
69
|
+
'historical': 'get_historical_weather',
|
|
70
|
+
'history': 'get_historical_weather',
|
|
71
|
+
'status': 'check_service_status',
|
|
72
|
+
'location': 'search_location',
|
|
73
|
+
'search': 'search_location',
|
|
74
|
+
'air_quality': 'get_air_quality',
|
|
75
|
+
'aqi': 'get_air_quality',
|
|
76
|
+
'marine': 'get_marine_conditions',
|
|
77
|
+
'ocean': 'get_marine_conditions',
|
|
78
|
+
'waves': 'get_marine_conditions',
|
|
79
|
+
'imagery': 'get_weather_imagery',
|
|
80
|
+
'radar': 'get_weather_imagery',
|
|
81
|
+
'satellite': 'get_weather_imagery',
|
|
82
|
+
'lightning': 'get_lightning_activity',
|
|
83
|
+
'strikes': 'get_lightning_activity',
|
|
84
|
+
'thunderstorm': 'get_lightning_activity',
|
|
85
|
+
'river': 'get_river_conditions',
|
|
86
|
+
'rivers': 'get_river_conditions',
|
|
87
|
+
'flood': 'get_river_conditions',
|
|
88
|
+
'streamflow': 'get_river_conditions',
|
|
89
|
+
'wildfire': 'get_wildfire_info',
|
|
90
|
+
'wildfires': 'get_wildfire_info',
|
|
91
|
+
'fire': 'get_wildfire_info',
|
|
92
|
+
'fires': 'get_wildfire_info',
|
|
93
|
+
'smoke': 'get_wildfire_info'
|
|
94
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* Parse the ENABLED_TOOLS environment variable
|
|
97
|
+
*
|
|
98
|
+
* Supports:
|
|
99
|
+
* - Presets: "basic", "standard", "full", "all"
|
|
100
|
+
* - Individual tools: "forecast,current,alerts"
|
|
101
|
+
* - Adding to presets: "basic,+air_quality"
|
|
102
|
+
* - Removing from presets: "all,-marine"
|
|
103
|
+
* - Combinations: "standard,+air_quality,-alerts"
|
|
104
|
+
*
|
|
105
|
+
* @param envValue The ENABLED_TOOLS environment variable value
|
|
106
|
+
* @returns Set of enabled tool names
|
|
107
|
+
*/
|
|
108
|
+
function parseEnabledTools(envValue) {
|
|
109
|
+
// Default to "basic" preset if not specified
|
|
110
|
+
if (!envValue) {
|
|
111
|
+
return new Set(TOOL_PRESETS.basic);
|
|
112
|
+
}
|
|
113
|
+
const parts = envValue.toLowerCase().split(',').map(s => s.trim()).filter(Boolean);
|
|
114
|
+
let enabledTools = new Set();
|
|
115
|
+
let hasBaseSet = false;
|
|
116
|
+
for (const part of parts) {
|
|
117
|
+
// Handle additions (+tool)
|
|
118
|
+
if (part.startsWith('+')) {
|
|
119
|
+
const toolName = part.slice(1);
|
|
120
|
+
const resolvedTool = resolveToolName(toolName);
|
|
121
|
+
if (resolvedTool) {
|
|
122
|
+
enabledTools.add(resolvedTool);
|
|
123
|
+
}
|
|
124
|
+
else {
|
|
125
|
+
console.warn(`Unknown tool to add: "${toolName}"`);
|
|
126
|
+
}
|
|
127
|
+
continue;
|
|
128
|
+
}
|
|
129
|
+
// Handle removals (-tool)
|
|
130
|
+
if (part.startsWith('-')) {
|
|
131
|
+
const toolName = part.slice(1);
|
|
132
|
+
const resolvedTool = resolveToolName(toolName);
|
|
133
|
+
if (resolvedTool) {
|
|
134
|
+
enabledTools.delete(resolvedTool);
|
|
135
|
+
}
|
|
136
|
+
else {
|
|
137
|
+
console.warn(`Unknown tool to remove: "${toolName}"`);
|
|
138
|
+
}
|
|
139
|
+
continue;
|
|
140
|
+
}
|
|
141
|
+
// Handle presets
|
|
142
|
+
if (part in TOOL_PRESETS) {
|
|
143
|
+
if (!hasBaseSet) {
|
|
144
|
+
// First preset replaces the default
|
|
145
|
+
enabledTools = new Set(TOOL_PRESETS[part]);
|
|
146
|
+
hasBaseSet = true;
|
|
147
|
+
}
|
|
148
|
+
else {
|
|
149
|
+
// Additional presets merge with existing
|
|
150
|
+
for (const tool of TOOL_PRESETS[part]) {
|
|
151
|
+
enabledTools.add(tool);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
continue;
|
|
155
|
+
}
|
|
156
|
+
// Handle individual tools
|
|
157
|
+
const resolvedTool = resolveToolName(part);
|
|
158
|
+
if (resolvedTool) {
|
|
159
|
+
if (!hasBaseSet) {
|
|
160
|
+
// First individual tool creates a new set
|
|
161
|
+
enabledTools = new Set([resolvedTool]);
|
|
162
|
+
hasBaseSet = true;
|
|
163
|
+
}
|
|
164
|
+
else {
|
|
165
|
+
enabledTools.add(resolvedTool);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
else {
|
|
169
|
+
console.warn(`Unknown tool or preset: "${part}"`);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
return enabledTools;
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Resolve a tool name or alias to the canonical tool name
|
|
176
|
+
* @param name Tool name or alias
|
|
177
|
+
* @returns Canonical tool name or undefined if not found
|
|
178
|
+
*/
|
|
179
|
+
function resolveToolName(name) {
|
|
180
|
+
const normalized = name.toLowerCase();
|
|
181
|
+
// Check if it's already a canonical name
|
|
182
|
+
if (isToolName(normalized)) {
|
|
183
|
+
return normalized;
|
|
184
|
+
}
|
|
185
|
+
// Check aliases
|
|
186
|
+
if (normalized in TOOL_ALIASES) {
|
|
187
|
+
return TOOL_ALIASES[normalized];
|
|
188
|
+
}
|
|
189
|
+
return undefined;
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Type guard to check if a string is a valid ToolName
|
|
193
|
+
*/
|
|
194
|
+
function isToolName(name) {
|
|
195
|
+
const validTools = [
|
|
196
|
+
'get_forecast',
|
|
197
|
+
'get_current_conditions',
|
|
198
|
+
'get_alerts',
|
|
199
|
+
'get_historical_weather',
|
|
200
|
+
'check_service_status',
|
|
201
|
+
'search_location',
|
|
202
|
+
'get_air_quality',
|
|
203
|
+
'get_marine_conditions',
|
|
204
|
+
'get_weather_imagery',
|
|
205
|
+
'get_lightning_activity',
|
|
206
|
+
'get_river_conditions',
|
|
207
|
+
'get_wildfire_info'
|
|
208
|
+
];
|
|
209
|
+
return validTools.includes(name);
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Tool configuration singleton
|
|
213
|
+
*/
|
|
214
|
+
class ToolConfig {
|
|
215
|
+
enabledTools;
|
|
216
|
+
constructor() {
|
|
217
|
+
this.enabledTools = parseEnabledTools(process.env.ENABLED_TOOLS);
|
|
218
|
+
// Log enabled tools for debugging
|
|
219
|
+
if (this.enabledTools.size > 0) {
|
|
220
|
+
console.error(`[ToolConfig] Enabled tools (${this.enabledTools.size}): ${Array.from(this.enabledTools).join(', ')}`);
|
|
221
|
+
}
|
|
222
|
+
else {
|
|
223
|
+
console.error('[ToolConfig] Warning: No tools enabled!');
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Check if a specific tool is enabled
|
|
228
|
+
*/
|
|
229
|
+
isEnabled(tool) {
|
|
230
|
+
return this.enabledTools.has(tool);
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Get all enabled tools
|
|
234
|
+
*/
|
|
235
|
+
getEnabledTools() {
|
|
236
|
+
return Array.from(this.enabledTools);
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* Get available presets
|
|
240
|
+
*/
|
|
241
|
+
static getPresets() {
|
|
242
|
+
return { ...TOOL_PRESETS };
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Get available tool aliases
|
|
246
|
+
*/
|
|
247
|
+
static getAliases() {
|
|
248
|
+
return { ...TOOL_ALIASES };
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
// Export singleton instance
|
|
252
|
+
export const toolConfig = new ToolConfig();
|
|
253
|
+
// Export preset definitions for documentation
|
|
254
|
+
export const PRESETS = TOOL_PRESETS;
|
|
255
|
+
export const ALIASES = TOOL_ALIASES;
|
|
256
|
+
//# sourceMappingURL=tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../../src/config/tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAmBH;;GAEG;AACH,MAAM,YAAY,GAA+B;IAC/C,6CAA6C;IAC7C,KAAK,EAAE;QACL,cAAc;QACd,wBAAwB;QACxB,YAAY;QACZ,iBAAiB;QACjB,sBAAsB;KACvB;IAED,0BAA0B;IAC1B,QAAQ,EAAE;QACR,cAAc;QACd,wBAAwB;QACxB,YAAY;QACZ,wBAAwB;QACxB,iBAAiB;QACjB,sBAAsB;KACvB;IAED,gCAAgC;IAChC,IAAI,EAAE;QACJ,cAAc;QACd,wBAAwB;QACxB,YAAY;QACZ,wBAAwB;QACxB,iBAAiB;QACjB,sBAAsB;QACtB,iBAAiB;KAClB;IAED,sBAAsB;IACtB,GAAG,EAAE;QACH,cAAc;QACd,wBAAwB;QACxB,YAAY;QACZ,wBAAwB;QACxB,sBAAsB;QACtB,iBAAiB;QACjB,iBAAiB;QACjB,uBAAuB;QACvB,qBAAqB;QACrB,wBAAwB;QACxB,sBAAsB;QACtB,mBAAmB;KACpB;CACF,CAAC;AAEF;;GAEG;AACH,MAAM,YAAY,GAA6B;IAC7C,UAAU,EAAE,cAAc;IAC1B,SAAS,EAAE,w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