@cyanheads/aviation-weather-mcp-server 0.1.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/AGENTS.md +379 -0
- package/CLAUDE.md +379 -0
- package/Dockerfile +99 -0
- package/LICENSE +201 -0
- package/README.md +311 -0
- package/changelog/0.1.x/0.1.1.md +23 -0
- package/changelog/template.md +127 -0
- package/dist/config/server-config.d.ts +14 -0
- package/dist/config/server-config.d.ts.map +1 -0
- package/dist/config/server-config.js +31 -0
- package/dist/config/server-config.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +31 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp-server/prompts/definitions/aviation-preflight-brief.prompt.d.ts +12 -0
- package/dist/mcp-server/prompts/definitions/aviation-preflight-brief.prompt.d.ts.map +1 -0
- package/dist/mcp-server/prompts/definitions/aviation-preflight-brief.prompt.js +65 -0
- package/dist/mcp-server/prompts/definitions/aviation-preflight-brief.prompt.js.map +1 -0
- package/dist/mcp-server/tools/definitions/aviation-find-stations.tool.d.ts +40 -0
- package/dist/mcp-server/tools/definitions/aviation-find-stations.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/aviation-find-stations.tool.js +130 -0
- package/dist/mcp-server/tools/definitions/aviation-find-stations.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/aviation-get-advisories.tool.d.ts +49 -0
- package/dist/mcp-server/tools/definitions/aviation-get-advisories.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/aviation-get-advisories.tool.js +133 -0
- package/dist/mcp-server/tools/definitions/aviation-get-advisories.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/aviation-get-metar.tool.d.ts +42 -0
- package/dist/mcp-server/tools/definitions/aviation-get-metar.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/aviation-get-metar.tool.js +129 -0
- package/dist/mcp-server/tools/definitions/aviation-get-metar.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/aviation-get-pireps.tool.d.ts +60 -0
- package/dist/mcp-server/tools/definitions/aviation-get-pireps.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/aviation-get-pireps.tool.js +238 -0
- package/dist/mcp-server/tools/definitions/aviation-get-pireps.tool.js.map +1 -0
- package/dist/mcp-server/tools/definitions/aviation-get-taf.tool.d.ts +42 -0
- package/dist/mcp-server/tools/definitions/aviation-get-taf.tool.d.ts.map +1 -0
- package/dist/mcp-server/tools/definitions/aviation-get-taf.tool.js +140 -0
- package/dist/mcp-server/tools/definitions/aviation-get-taf.tool.js.map +1 -0
- package/dist/services/aviation-weather/aviation-weather-service.d.ts +60 -0
- package/dist/services/aviation-weather/aviation-weather-service.d.ts.map +1 -0
- package/dist/services/aviation-weather/aviation-weather-service.js +512 -0
- package/dist/services/aviation-weather/aviation-weather-service.js.map +1 -0
- package/dist/services/aviation-weather/types.d.ts +283 -0
- package/dist/services/aviation-weather/types.d.ts.map +1 -0
- package/dist/services/aviation-weather/types.js +7 -0
- package/dist/services/aviation-weather/types.js.map +1 -0
- package/package.json +107 -0
- package/server.json +127 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2025 Casey Hand @cyanheads
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|
package/README.md
ADDED
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
<h1>@cyanheads/aviation-weather-mcp-server</h1>
|
|
3
|
+
<p><b>Fetch METARs, TAFs, PIREPs, and SIGMETs/AIRMETs from the NWS Aviation Weather Center via MCP. STDIO or Streamable HTTP.</b>
|
|
4
|
+
<div>5 Tools • 1 Prompt</div>
|
|
5
|
+
</p>
|
|
6
|
+
</div>
|
|
7
|
+
|
|
8
|
+
<div align="center">
|
|
9
|
+
|
|
10
|
+
[](./CHANGELOG.md) [](./LICENSE) [](https://github.com/users/cyanheads/packages/container/package/aviation-weather-mcp-server) [](https://modelcontextprotocol.io/) [](https://www.npmjs.com/package/@cyanheads/aviation-weather-mcp-server) [](https://www.typescriptlang.org/) [](https://bun.sh/)
|
|
11
|
+
|
|
12
|
+
</div>
|
|
13
|
+
|
|
14
|
+
<div align="center">
|
|
15
|
+
|
|
16
|
+
[](https://github.com/cyanheads/aviation-weather-mcp-server/releases/latest/download/aviation-weather-mcp-server.mcpb) [](https://cursor.com/en/install-mcp?name=aviation-weather-mcp-server&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsIkBjeWFuaGVhZHMvYXZpYXRpb24td2VhdGhlci1tY3Atc2VydmVyIl19) [](https://vscode.dev/redirect?url=vscode:mcp/install?%7B%22name%22%3A%22aviation-weather-mcp-server%22%2C%22command%22%3A%22npx%22%2C%22args%22%3A%5B%22-y%22%2C%22%40cyanheads%2Faviation-weather-mcp-server%22%5D%7D)
|
|
17
|
+
|
|
18
|
+
[](https://www.npmjs.com/package/@cyanheads/mcp-ts-core)
|
|
19
|
+
|
|
20
|
+
</div>
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Tools
|
|
25
|
+
|
|
26
|
+
Five tools covering aviation weather — station lookup, current observations, terminal forecasts, pilot reports, and active advisories:
|
|
27
|
+
|
|
28
|
+
| Tool | Description |
|
|
29
|
+
|:-----|:------------|
|
|
30
|
+
| `aviation_find_stations` | Resolve airports and weather stations by ICAO ID, bounding box, or US state. Returns ICAO/IATA/FAA IDs, coordinates, elevation, and available data types. |
|
|
31
|
+
| `aviation_get_metar` | Get current weather observations (METARs) for one or more airports. Returns decoded wind, visibility, ceiling, temp/dewpoint, altimeter, cloud layers, flight category (VFR/MVFR/IFR/LIFR), and the raw METAR string. |
|
|
32
|
+
| `aviation_get_taf` | Get Terminal Aerodrome Forecasts for one or more airports. Returns each forecast period with valid times, wind, visibility, weather codes, and cloud layers, plus the raw TAF string. |
|
|
33
|
+
| `aviation_get_pireps` | Get recent Pilot Reports near an airport or within a bounding box. Returns decoded turbulence, icing, and cloud reports with altitude, aircraft type, intensity, and the raw PIREP string. |
|
|
34
|
+
| `aviation_get_advisories` | Get active SIGMETs and AIRMETs for a region. Returns hazard type (CONVECTIVE, TURBULENCE, ICING, IFR, MTN OBSCN), severity, altitude range, valid period, polygon coordinates, and raw text. |
|
|
35
|
+
|
|
36
|
+
### `aviation_find_stations`
|
|
37
|
+
|
|
38
|
+
Resolve and discover weather stations by multiple search modes.
|
|
39
|
+
|
|
40
|
+
- Look up one or more stations by ICAO, IATA, or FAA ID (up to 20 IDs per call)
|
|
41
|
+
- Discover all stations within a geographic bounding box
|
|
42
|
+
- List stations for a US state via two-letter abbreviation (uses bbox + client-side state filter)
|
|
43
|
+
- Returns `data_types` (METAR, TAF, etc.) so agents can confirm what's available before querying
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
### `aviation_get_metar`
|
|
48
|
+
|
|
49
|
+
Fetch current or recent METAR observations (1–10 stations per call).
|
|
50
|
+
|
|
51
|
+
- `hours` parameter (1–12) returns observation history per station; default 1 returns only the most recent
|
|
52
|
+
- Flight category (VFR/MVFR/IFR/LIFR) is returned directly from the AWC API — no client-side computation needed
|
|
53
|
+
- Decodes cloud layers, wind with gusts, and visibility in addition to the raw METAR string
|
|
54
|
+
- METAR type field distinguishes `METAR` (routine) from `SPECI` (special observation triggered by significant weather change)
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
### `aviation_get_taf`
|
|
59
|
+
|
|
60
|
+
Fetch Terminal Aerodrome Forecasts for 1–4 airports.
|
|
61
|
+
|
|
62
|
+
- Returns structured forecast periods with change types (`FM`, `TEMPO`, `BECMG`) and probabilities
|
|
63
|
+
- Common weather codes (e.g., `-SHRA`, `TSRA`) decoded to plain English alongside the raw string
|
|
64
|
+
- `valid_from` / `valid_to` in ISO 8601 for straightforward time comparisons
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
68
|
+
### `aviation_get_pireps`
|
|
69
|
+
|
|
70
|
+
Search for recent Pilot Reports by station+radius or bounding box.
|
|
71
|
+
|
|
72
|
+
- `station_id` + `distance_nm` (10–500 nm, default 100) for radial search around an airport
|
|
73
|
+
- `bbox` for geographic area search — useful for en-route corridor checks
|
|
74
|
+
- `altitude_min_ft` / `altitude_max_ft` filters to isolate reports at cruise altitude
|
|
75
|
+
- Turbulence and icing arrays include up to two layers per report (as reported by the API)
|
|
76
|
+
- Note: absence of PIREPs does not mean smooth conditions — they are sparse by nature
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
### `aviation_get_advisories`
|
|
81
|
+
|
|
82
|
+
List currently active SIGMETs and AIRMETs.
|
|
83
|
+
|
|
84
|
+
- `advisory_type` filter: `sigmet`, `airmet`, or `all` (default)
|
|
85
|
+
- `hazard` filter: `CONVECTIVE`, `TURBULENCE`, `ICING`, `IFR`, `MTN OBSCN`, `SURFACE WIND`, `LLWS`
|
|
86
|
+
- `bbox` filter applied client-side (AWC API returns all active advisories; the tool filters by polygon overlap)
|
|
87
|
+
- During fair-weather periods, no AIRMETs may be active — an empty result is a valid state, not an error
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## Prompts
|
|
92
|
+
|
|
93
|
+
| Type | Name | Description |
|
|
94
|
+
|:-----|:-----|:------------|
|
|
95
|
+
| Prompt | `aviation_preflight_brief` | Structure a preflight weather briefing for one or more airports. Guides the LLM to call `aviation_get_metar`, `aviation_get_taf`, and `aviation_get_advisories` in sequence and synthesize a go/no-go picture with flight categories and active hazards. |
|
|
96
|
+
|
|
97
|
+
All resource data is reachable via tools. This server has no resources — all aviation weather data is time-sensitive (METARs valid ~1 hour, advisories minutes to hours) and unsuitable for stable-URI resources.
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## Features
|
|
102
|
+
|
|
103
|
+
Built on [`@cyanheads/mcp-ts-core`](https://www.npmjs.com/package/@cyanheads/mcp-ts-core):
|
|
104
|
+
|
|
105
|
+
- Declarative tool and prompt definitions — single file per primitive, framework handles registration and validation
|
|
106
|
+
- Unified error handling — handlers throw, framework catches, classifies, and formats
|
|
107
|
+
- Pluggable auth: `none`, `jwt`, `oauth`
|
|
108
|
+
- Structured logging with optional OpenTelemetry tracing
|
|
109
|
+
- STDIO and Streamable HTTP transports
|
|
110
|
+
|
|
111
|
+
Aviation-weather-specific:
|
|
112
|
+
|
|
113
|
+
- Keyless — no API key or authentication required; all data is from the public AWC Data API
|
|
114
|
+
- Single service (`aviation-weather-service`) with retry + exponential backoff for the keyless public endpoint
|
|
115
|
+
- Raw coded strings (`rawOb`, `rawTAF`, `rawAirSigmet`) surfaced alongside decoded fields so agents have both layers
|
|
116
|
+
- State→bbox table enables US-state station queries that the AWC API doesn't natively support
|
|
117
|
+
- Server-level `instructions` field surfaces the "not an official briefing" safety disclaimer to all clients on `initialize`
|
|
118
|
+
|
|
119
|
+
Agent-friendly output:
|
|
120
|
+
|
|
121
|
+
- Flight category (`VFR`/`MVFR`/`IFR`/`LIFR`) as a discriminated string field — agents can branch on it without parsing ceiling + visibility
|
|
122
|
+
- Structured error contracts with typed `reason` fields and `recovery` hints (e.g., "Verify ICAO IDs with `aviation_find_stations`")
|
|
123
|
+
- `aviation_preflight_brief` prompt encodes the correct METAR → TAF → PIREPs → advisories briefing sequence that agents frequently get wrong by omitting steps
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## Getting started
|
|
128
|
+
|
|
129
|
+
Add the following to your MCP client configuration file.
|
|
130
|
+
|
|
131
|
+
```json
|
|
132
|
+
{
|
|
133
|
+
"mcpServers": {
|
|
134
|
+
"aviation-weather": {
|
|
135
|
+
"type": "stdio",
|
|
136
|
+
"command": "bunx",
|
|
137
|
+
"args": ["@cyanheads/aviation-weather-mcp-server@latest"],
|
|
138
|
+
"env": {
|
|
139
|
+
"MCP_TRANSPORT_TYPE": "stdio",
|
|
140
|
+
"MCP_LOG_LEVEL": "info"
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
Or with npx (no Bun required):
|
|
148
|
+
|
|
149
|
+
```json
|
|
150
|
+
{
|
|
151
|
+
"mcpServers": {
|
|
152
|
+
"aviation-weather": {
|
|
153
|
+
"type": "stdio",
|
|
154
|
+
"command": "npx",
|
|
155
|
+
"args": ["-y", "@cyanheads/aviation-weather-mcp-server@latest"],
|
|
156
|
+
"env": {
|
|
157
|
+
"MCP_TRANSPORT_TYPE": "stdio",
|
|
158
|
+
"MCP_LOG_LEVEL": "info"
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
Or with Docker:
|
|
166
|
+
|
|
167
|
+
```json
|
|
168
|
+
{
|
|
169
|
+
"mcpServers": {
|
|
170
|
+
"aviation-weather": {
|
|
171
|
+
"type": "stdio",
|
|
172
|
+
"command": "docker",
|
|
173
|
+
"args": [
|
|
174
|
+
"run", "-i", "--rm",
|
|
175
|
+
"-e", "MCP_TRANSPORT_TYPE=stdio",
|
|
176
|
+
"ghcr.io/cyanheads/aviation-weather-mcp-server:latest"
|
|
177
|
+
]
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
For Streamable HTTP, set the transport and start the server:
|
|
184
|
+
|
|
185
|
+
```sh
|
|
186
|
+
MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 bun run start:http
|
|
187
|
+
# Server listens at http://localhost:3010/mcp
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
### Prerequisites
|
|
191
|
+
|
|
192
|
+
- [Bun v1.3.0](https://bun.sh/) or higher (or Node.js v24+).
|
|
193
|
+
- No API key required — the AWC Data API is fully public and keyless.
|
|
194
|
+
|
|
195
|
+
### Installation
|
|
196
|
+
|
|
197
|
+
1. **Clone the repository:**
|
|
198
|
+
|
|
199
|
+
```sh
|
|
200
|
+
git clone https://github.com/cyanheads/aviation-weather-mcp-server.git
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
2. **Navigate into the directory:**
|
|
204
|
+
|
|
205
|
+
```sh
|
|
206
|
+
cd aviation-weather-mcp-server
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
3. **Install dependencies:**
|
|
210
|
+
|
|
211
|
+
```sh
|
|
212
|
+
bun install
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
4. **Configure environment:**
|
|
216
|
+
|
|
217
|
+
```sh
|
|
218
|
+
cp .env.example .env
|
|
219
|
+
# edit .env if you need to override AWC_BASE_URL or AWC_TIMEOUT_MS
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
---
|
|
223
|
+
|
|
224
|
+
## Configuration
|
|
225
|
+
|
|
226
|
+
| Variable | Description | Default |
|
|
227
|
+
|:---------|:------------|:--------|
|
|
228
|
+
| `AWC_BASE_URL` | Base URL for the NWS AWC Data API. | `https://aviationweather.gov/api/data` |
|
|
229
|
+
| `AWC_TIMEOUT_MS` | Per-request timeout in milliseconds (1000–60000). | `10000` |
|
|
230
|
+
| `MCP_TRANSPORT_TYPE` | Transport: `stdio` or `http`. | `stdio` |
|
|
231
|
+
| `MCP_HTTP_PORT` | Port for HTTP server. | `3010` |
|
|
232
|
+
| `MCP_AUTH_MODE` | Auth mode: `none`, `jwt`, or `oauth`. | `none` |
|
|
233
|
+
| `MCP_LOG_LEVEL` | Log level (RFC 5424). | `info` |
|
|
234
|
+
| `OTEL_ENABLED` | Enable [OpenTelemetry instrumentation](https://github.com/cyanheads/mcp-ts-core/tree/main/docs/telemetry). | `false` |
|
|
235
|
+
|
|
236
|
+
See [`.env.example`](./.env.example) for the full list of optional overrides.
|
|
237
|
+
|
|
238
|
+
---
|
|
239
|
+
|
|
240
|
+
## Running the server
|
|
241
|
+
|
|
242
|
+
### Local development
|
|
243
|
+
|
|
244
|
+
- **Build and run:**
|
|
245
|
+
|
|
246
|
+
```sh
|
|
247
|
+
bun run rebuild
|
|
248
|
+
bun run start:stdio
|
|
249
|
+
# or
|
|
250
|
+
bun run start:http
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
- **Run checks and tests:**
|
|
254
|
+
|
|
255
|
+
```sh
|
|
256
|
+
bun run devcheck # Lint, format, typecheck, security
|
|
257
|
+
bun run test # Vitest test suite
|
|
258
|
+
bun run lint:mcp # Validate MCP definitions against spec
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
### Docker
|
|
262
|
+
|
|
263
|
+
```sh
|
|
264
|
+
docker build -t aviation-weather-mcp-server .
|
|
265
|
+
docker run --rm -p 3010:3010 aviation-weather-mcp-server
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
The Dockerfile defaults to HTTP transport, stateless session mode, and logs to `/var/log/aviation-weather-mcp-server`. OpenTelemetry peer dependencies are installed by default — build with `--build-arg OTEL_ENABLED=false` to omit them.
|
|
269
|
+
|
|
270
|
+
---
|
|
271
|
+
|
|
272
|
+
## Project structure
|
|
273
|
+
|
|
274
|
+
| Directory | Purpose |
|
|
275
|
+
|:----------|:--------|
|
|
276
|
+
| `src/index.ts` | `createApp()` entry point — registers tools/prompts and inits services. |
|
|
277
|
+
| `src/config` | Server-specific env var parsing (`AWC_BASE_URL`, `AWC_TIMEOUT_MS`). |
|
|
278
|
+
| `src/services/aviation-weather` | AWC Data API client — HTTP fetch, retry with exponential backoff, response normalization. |
|
|
279
|
+
| `src/mcp-server/tools` | Tool definitions (`*.tool.ts`). |
|
|
280
|
+
| `src/mcp-server/prompts` | Prompt definitions (`*.prompt.ts`). |
|
|
281
|
+
| `tests/` | Unit and integration tests mirroring `src/`. |
|
|
282
|
+
|
|
283
|
+
---
|
|
284
|
+
|
|
285
|
+
## Development guide
|
|
286
|
+
|
|
287
|
+
See [`CLAUDE.md`](./CLAUDE.md) for development guidelines and architectural rules. The short version:
|
|
288
|
+
|
|
289
|
+
- Handlers throw, framework catches — no `try/catch` in tool logic
|
|
290
|
+
- Use `ctx.log` for request-scoped logging, `ctx.state` for tenant-scoped storage
|
|
291
|
+
- Register new tools and prompts via the barrels in `src/mcp-server/*/definitions/index.ts`
|
|
292
|
+
- Wrap external API calls: validate raw → normalize to domain type → return output schema; never fabricate missing fields
|
|
293
|
+
|
|
294
|
+
> **Not an official preflight briefing.** Data from the AWC is informational only. Real flight planning requires an authorized source (e.g., Leidos/1800wxbrief.com). The server surfaces this disclaimer via its `instructions` field sent on every `initialize`.
|
|
295
|
+
|
|
296
|
+
---
|
|
297
|
+
|
|
298
|
+
## Contributing
|
|
299
|
+
|
|
300
|
+
Issues and pull requests are welcome. Run checks and tests before submitting:
|
|
301
|
+
|
|
302
|
+
```sh
|
|
303
|
+
bun run devcheck
|
|
304
|
+
bun run test
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
---
|
|
308
|
+
|
|
309
|
+
## License
|
|
310
|
+
|
|
311
|
+
Apache-2.0 — see [LICENSE](LICENSE) for details.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
---
|
|
2
|
+
summary: "Initial public release — 5 tools + 1 prompt over the NWS Aviation Weather Center API (METAR, TAF, PIREP, SIGMET/AIRMET), with security hardening of error responses"
|
|
3
|
+
breaking: false
|
|
4
|
+
security: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# 0.1.1 — 2026-06-05
|
|
8
|
+
|
|
9
|
+
Initial public release of `@cyanheads/aviation-weather-mcp-server`. Wraps the [NWS Aviation Weather Center (AWC) Data API](https://aviationweather.gov/api/data) — keyless, no auth required.
|
|
10
|
+
|
|
11
|
+
## Added
|
|
12
|
+
|
|
13
|
+
- **`aviation_get_metar`** — current METAR observations for 1–10 ICAO stations; returns raw METAR, flight category (VFR/MVFR/IFR/LIFR), decoded fields (wind, visibility, ceiling, altimeter, temp/dewpoint), and observation time; supports 1–12 hours of history
|
|
14
|
+
- **`aviation_get_taf`** — Terminal Aerodrome Forecasts for 1–10 ICAO stations; returns raw TAF and structured forecast periods (time range, wind, visibility, sky conditions, weather, change indicators)
|
|
15
|
+
- **`aviation_get_pireps`** — Pilot Reports by station ID (with radius) or bounding box; returns icing, turbulence, sky condition, wind, temperature, and altitude; supports 1–12 hours of history
|
|
16
|
+
- **`aviation_get_advisories`** — active SIGMETs and G-AIRMETs by type filter and optional bounding box; returns hazard category, severity, altitude range, and affected geometry
|
|
17
|
+
- **`aviation_find_stations`** — discover weather reporting stations by ICAO prefix, state, country, or bounding box; returns station metadata (elevation, coordinates, country, METAR/TAF capability)
|
|
18
|
+
- **`aviation_preflight_brief`** prompt — chains `aviation_get_metar`, `aviation_get_taf`, and `aviation_get_advisories` into a structured preflight weather briefing for a departure → destination route with optional alternates
|
|
19
|
+
|
|
20
|
+
## Security
|
|
21
|
+
|
|
22
|
+
- **Error response hardening** — raw AWC API response bodies are no longer surfaced to callers on upstream errors; invalid JSON body is logged at debug level and replaced with a sanitized `serviceUnavailable` message
|
|
23
|
+
- **PIREP fetch log sanitization** — replaced URL-level debug logging with structured parameter fields (`stationId`, `hasBbox`, `distanceNm`, `hours`) to avoid leaking full request URLs
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
---
|
|
2
|
+
# FORMAT REFERENCE — do not edit. Copy this file to
|
|
3
|
+
# `changelog/<major.minor>.x/<version>.md` (e.g. `changelog/0.8.x/0.8.6.md`)
|
|
4
|
+
# to author a new release. Set that file's H1 to `# <version> — YYYY-MM-DD`
|
|
5
|
+
# with a concrete date.
|
|
6
|
+
|
|
7
|
+
# Required. One-line GitHub Release-style headline. 350 character cap.
|
|
8
|
+
# Default short and scannable. Don't pad, don't stitch unrelated changes with
|
|
9
|
+
# semicolons — pick the headline. Quotes required: unquoted YAML treats `: `
|
|
10
|
+
# inside the value as a key separator and fails GitHub's strict parser.
|
|
11
|
+
summary: ""
|
|
12
|
+
|
|
13
|
+
# Set `true` when consumers must change code to upgrade: API removals,
|
|
14
|
+
# signature changes, config renames, behavior changes that break existing
|
|
15
|
+
# usage. Flagged as `Breaking` in the rollup.
|
|
16
|
+
breaking: false
|
|
17
|
+
|
|
18
|
+
# Set `true` if this release contains any security fix. Pairs with the
|
|
19
|
+
# `## Security` section below. Flagged as `Security` in the rollup so
|
|
20
|
+
# users can triage upgrade urgency at a glance.
|
|
21
|
+
security: false
|
|
22
|
+
|
|
23
|
+
# Optional free-form notes for maintenance agents processing this release.
|
|
24
|
+
# Not rendered in CHANGELOG — consumed by agents running `maintenance` on
|
|
25
|
+
# downstream servers. Use for adoption instructions that don't fit the
|
|
26
|
+
# human-facing sections: new files to create, fields to populate, one-time
|
|
27
|
+
# migration steps. Omit the field entirely when there's nothing to say.
|
|
28
|
+
# agent-notes: |
|
|
29
|
+
# <instructions for downstream maintenance agents>
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
# <version> — YYYY-MM-DD
|
|
33
|
+
|
|
34
|
+
<!--
|
|
35
|
+
AUTHORING GUIDE — applies to the new per-version file you create from this
|
|
36
|
+
template.
|
|
37
|
+
|
|
38
|
+
Audience: someone scanning release notes to decide what affects them. Lead
|
|
39
|
+
each bullet with the symbol or concept name in **bold** so they can skip
|
|
40
|
+
what's irrelevant and zoom in on what's not.
|
|
41
|
+
|
|
42
|
+
Tone: terse, fact-dense, not verbose. Default to one sentence per bullet —
|
|
43
|
+
name the symbol, state what changed, stop. Use a second sentence only when
|
|
44
|
+
it carries weight. If a bullet feels long, it is.
|
|
45
|
+
|
|
46
|
+
Cut: mechanism walkthroughs (those belong in JSDoc, CLAUDE.md/AGENTS.md, or the
|
|
47
|
+
relevant skill), ceremonial framings ("This release introduces…",
|
|
48
|
+
backwards-compat paragraphs), file-by-file test enumerations, internal
|
|
49
|
+
implementation notes. Prefer code/symbol names over English re-explanations.
|
|
50
|
+
|
|
51
|
+
Narrative intro: skip by default. Add one short sentence only when the
|
|
52
|
+
release theme genuinely needs framing the bullets can't carry.
|
|
53
|
+
|
|
54
|
+
Sections: Keep a Changelog order — Added, Changed, Deprecated, Removed,
|
|
55
|
+
Fixed, Security. Include only sections with entries; delete the rest
|
|
56
|
+
(including the commented-out scaffolding below). Don't ship empty headers.
|
|
57
|
+
|
|
58
|
+
Include: every distinct fact a reader needs to adopt or audit the release —
|
|
59
|
+
new exports, signatures, lint rule IDs, env vars, breaking changes, version
|
|
60
|
+
bumps on shipped skills. Nothing more.
|
|
61
|
+
|
|
62
|
+
Links: link issues, PRs, docs, or skills where they help a reader jump to
|
|
63
|
+
context. Once per item per entry — don't re-link the same issue in summary,
|
|
64
|
+
narrative, and bullet. Skip links for inline symbol names; code spans speak
|
|
65
|
+
for themselves.
|
|
66
|
+
|
|
67
|
+
Issue/PR URLs: use full URLs. GitHub's bare `#NN` auto-link only resolves
|
|
68
|
+
inside its own UI, not in npm reads or local editors.
|
|
69
|
+
|
|
70
|
+
[#38](https://github.com/cyanheads/mcp-ts-core/issues/38) ← issue
|
|
71
|
+
[#42](https://github.com/cyanheads/mcp-ts-core/pull/42) ← PR
|
|
72
|
+
|
|
73
|
+
Verify numbers exist before linking (`gh issue view NN`, `gh pr view NN`).
|
|
74
|
+
Never speculate on a future number — `#42` for an upcoming PR silently
|
|
75
|
+
resolves to whatever real item already owns 42, and timeline previews pull
|
|
76
|
+
in that unrelated item's metadata.
|
|
77
|
+
|
|
78
|
+
TAG ANNOTATIONS — the annotated tag body renders as the GitHub Release body
|
|
79
|
+
via `gh release create --notes-from-tag`. The tag is a derivative of this
|
|
80
|
+
changelog entry — a condensed, scannable version, not a copy. Format:
|
|
81
|
+
|
|
82
|
+
<theme — omit version number, GitHub prepends it>
|
|
83
|
+
← blank line
|
|
84
|
+
<1-2 sentence context: what this release does>
|
|
85
|
+
← blank line
|
|
86
|
+
Dependency bumps: ← section header
|
|
87
|
+
← blank line
|
|
88
|
+
- `@cyanheads/mcp-ts-core` ^0.9.1 → ^0.9.6 ← bullet
|
|
89
|
+
← blank line
|
|
90
|
+
Changed: ← only sections with entries
|
|
91
|
+
← blank line
|
|
92
|
+
- `format()` output includes `query` in text mode
|
|
93
|
+
← blank line
|
|
94
|
+
Added:
|
|
95
|
+
← blank line
|
|
96
|
+
- `manifest.json` scaffolded for MCPB bundle support
|
|
97
|
+
- Install badges (Claude Desktop, Cursor, VS Code)
|
|
98
|
+
← blank line
|
|
99
|
+
<N> tests pass; `bun run devcheck` clean. ← footer
|
|
100
|
+
|
|
101
|
+
Never a flat comma-separated string. Always structured markdown with
|
|
102
|
+
sections. The tag must scan well as a rendered GitHub Release page.
|
|
103
|
+
-->
|
|
104
|
+
|
|
105
|
+
## Added
|
|
106
|
+
|
|
107
|
+
-
|
|
108
|
+
|
|
109
|
+
## Changed
|
|
110
|
+
|
|
111
|
+
-
|
|
112
|
+
|
|
113
|
+
<!-- ## Deprecated
|
|
114
|
+
|
|
115
|
+
- -->
|
|
116
|
+
|
|
117
|
+
<!-- ## Removed
|
|
118
|
+
|
|
119
|
+
- -->
|
|
120
|
+
|
|
121
|
+
## Fixed
|
|
122
|
+
|
|
123
|
+
-
|
|
124
|
+
|
|
125
|
+
<!-- ## Security
|
|
126
|
+
|
|
127
|
+
- -->
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Server-specific configuration for aviation-weather-mcp-server.
|
|
3
|
+
* Reads AWC_BASE_URL and AWC_TIMEOUT_MS from the environment.
|
|
4
|
+
* @module config/server-config
|
|
5
|
+
*/
|
|
6
|
+
import { z } from '@cyanheads/mcp-ts-core';
|
|
7
|
+
declare const ServerConfigSchema: z.ZodObject<{
|
|
8
|
+
awcBaseUrl: z.ZodDefault<z.ZodString>;
|
|
9
|
+
awcTimeoutMs: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
/** Returns validated server config, parsing from env on first call. */
|
|
12
|
+
export declare function getServerConfig(): z.infer<typeof ServerConfigSchema>;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=server-config.d.ts.map
|