@ryancardin/noaa-tides-currents-mcp-server 2.0.0 → 2.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/LICENSE +1 -1
- package/README.md +18 -5
- package/dist/client/deadline.d.ts +6 -0
- package/dist/client/deadline.js +23 -0
- package/dist/client/http.d.ts +2 -0
- package/dist/client/http.js +75 -4
- package/dist/constants.d.ts +11 -0
- package/dist/constants.js +11 -0
- package/dist/format/respond.d.ts +37 -1
- package/dist/format/respond.js +45 -10
- package/dist/index.js +0 -0
- package/dist/reference/content.d.ts +1 -1
- package/dist/reference/content.js +24 -0
- package/dist/resources/index.js +8 -0
- package/dist/services/nws-api.d.ts +115 -0
- package/dist/services/nws-api.js +267 -0
- package/dist/tools/astronomy.js +6 -1
- package/dist/tools/currents.js +3 -1
- package/dist/tools/derived.js +6 -1
- package/dist/tools/index.js +12 -0
- package/dist/tools/marine-forecast.d.ts +7 -0
- package/dist/tools/marine-forecast.js +177 -0
- package/dist/tools/met.js +2 -1
- package/dist/tools/reference.js +4 -0
- package/dist/tools/station-metadata.js +4 -1
- package/dist/tools/stations.js +4 -1
- package/dist/tools/water.js +4 -1
- package/package.json +6 -6
- package/dist/interfaces/config.d.ts +0 -6
- package/dist/interfaces/config.js +0 -1
- package/dist/interfaces/noaa.d.ts +0 -334
- package/dist/interfaces/noaa.js +0 -98
- package/dist/interfaces/parameters.d.ts +0 -18
- package/dist/interfaces/parameters.js +0 -5
- package/dist/mcp-server.d.ts +0 -12
- package/dist/mcp-server.js +0 -103
- package/dist/moon-phase-service.d.ts +0 -122
- package/dist/moon-phase-service.js +0 -187
- package/dist/noaa-service.d.ts +0 -60
- package/dist/noaa-service.js +0 -159
- package/dist/schemas/dpapi.d.ts +0 -198
- package/dist/schemas/dpapi.js +0 -89
- package/dist/server/config.d.ts +0 -9
- package/dist/server/config.js +0 -40
- package/dist/server/mcp-server.d.ts +0 -12
- package/dist/server/mcp-server.js +0 -103
- package/dist/services/dpapi-service.d.ts +0 -72
- package/dist/services/dpapi-service.js +0 -164
- package/dist/services/noaa-parameters-service.d.ts +0 -76
- package/dist/services/noaa-parameters-service.js +0 -128
- package/dist/services/noaa-service.d.ts +0 -52
- package/dist/services/noaa-service.js +0 -151
- package/dist/sun-service.d.ts +0 -184
- package/dist/sun-service.js +0 -218
- package/dist/tools/derived-product-tools.d.ts +0 -6
- package/dist/tools/derived-product-tools.js +0 -168
- package/dist/tools/moon-tools.d.ts +0 -6
- package/dist/tools/moon-tools.js +0 -69
- package/dist/tools/parameter-tools.d.ts +0 -6
- package/dist/tools/parameter-tools.js +0 -77
- package/dist/tools/station-tools.d.ts +0 -6
- package/dist/tools/station-tools.js +0 -51
- package/dist/tools/sun-tools.d.ts +0 -6
- package/dist/tools/sun-tools.js +0 -109
- package/dist/tools/water-tools.d.ts +0 -6
- package/dist/tools/water-tools.js +0 -150
- package/dist/types.d.ts +0 -337
- package/dist/types.js +0 -98
package/dist/schemas/dpapi.d.ts
DELETED
|
@@ -1,198 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
export declare const AffiliationSchema: z.ZodOptional<z.ZodEnum<["Global", "US"]>>;
|
|
3
|
-
export declare const ScenarioSchema: z.ZodOptional<z.ZodEnum<["all", "low", "intermediate-low", "intermediate", "intermediate-high", "high", "extreme"]>>;
|
|
4
|
-
export declare const SeasonSchema: z.ZodOptional<z.ZodEnum<["DJF", "MAM", "JJA", "SON"]>>;
|
|
5
|
-
export declare const DpapiDatumSchema: z.ZodOptional<z.ZodEnum<["STND", "MLLW", "MHHW", "GT", "MSL", "MLW", "MHW"]>>;
|
|
6
|
-
export declare const ThresholdSchema: z.ZodOptional<z.ZodEnum<["minor", "moderate", "major"]>>;
|
|
7
|
-
export declare const DecadeSchema: z.ZodOptional<z.ZodString>;
|
|
8
|
-
export declare const YearSchema: z.ZodOptional<z.ZodString>;
|
|
9
|
-
export declare const YearRangeSchema: z.ZodOptional<z.ZodString>;
|
|
10
|
-
export declare const SeaLevelTrendsSchema: z.ZodObject<{
|
|
11
|
-
station: z.ZodString;
|
|
12
|
-
affil: z.ZodOptional<z.ZodEnum<["Global", "US"]>>;
|
|
13
|
-
format: z.ZodOptional<z.ZodEnum<["json", "xml", "csv"]>>;
|
|
14
|
-
}, "strip", z.ZodTypeAny, {
|
|
15
|
-
station: string;
|
|
16
|
-
format?: "json" | "xml" | "csv" | undefined;
|
|
17
|
-
affil?: "Global" | "US" | undefined;
|
|
18
|
-
}, {
|
|
19
|
-
station: string;
|
|
20
|
-
format?: "json" | "xml" | "csv" | undefined;
|
|
21
|
-
affil?: "Global" | "US" | undefined;
|
|
22
|
-
}>;
|
|
23
|
-
export declare const ExtremeWaterLevelsSchema: z.ZodObject<{
|
|
24
|
-
station: z.ZodString;
|
|
25
|
-
units: z.ZodOptional<z.ZodEnum<["english", "metric"]>>;
|
|
26
|
-
format: z.ZodOptional<z.ZodEnum<["json", "xml", "csv"]>>;
|
|
27
|
-
}, "strip", z.ZodTypeAny, {
|
|
28
|
-
station: string;
|
|
29
|
-
format?: "json" | "xml" | "csv" | undefined;
|
|
30
|
-
units?: "english" | "metric" | undefined;
|
|
31
|
-
}, {
|
|
32
|
-
station: string;
|
|
33
|
-
format?: "json" | "xml" | "csv" | undefined;
|
|
34
|
-
units?: "english" | "metric" | undefined;
|
|
35
|
-
}>;
|
|
36
|
-
export declare const HighTideFloodingDailySchema: z.ZodObject<{
|
|
37
|
-
station: z.ZodString;
|
|
38
|
-
format: z.ZodOptional<z.ZodEnum<["json", "xml", "csv"]>>;
|
|
39
|
-
datum: z.ZodOptional<z.ZodEnum<["STND", "MLLW", "MHHW", "GT", "MSL", "MLW", "MHW"]>>;
|
|
40
|
-
threshold: z.ZodOptional<z.ZodEnum<["minor", "moderate", "major"]>>;
|
|
41
|
-
begin_date: z.ZodOptional<z.ZodString>;
|
|
42
|
-
end_date: z.ZodOptional<z.ZodString>;
|
|
43
|
-
year: z.ZodOptional<z.ZodString>;
|
|
44
|
-
}, "strip", z.ZodTypeAny, {
|
|
45
|
-
station: string;
|
|
46
|
-
threshold?: "minor" | "moderate" | "major" | undefined;
|
|
47
|
-
year?: string | undefined;
|
|
48
|
-
format?: "json" | "xml" | "csv" | undefined;
|
|
49
|
-
end_date?: string | undefined;
|
|
50
|
-
begin_date?: string | undefined;
|
|
51
|
-
datum?: "MHHW" | "MHW" | "MSL" | "MLW" | "MLLW" | "STND" | "GT" | undefined;
|
|
52
|
-
}, {
|
|
53
|
-
station: string;
|
|
54
|
-
threshold?: "minor" | "moderate" | "major" | undefined;
|
|
55
|
-
year?: string | undefined;
|
|
56
|
-
format?: "json" | "xml" | "csv" | undefined;
|
|
57
|
-
end_date?: string | undefined;
|
|
58
|
-
begin_date?: string | undefined;
|
|
59
|
-
datum?: "MHHW" | "MHW" | "MSL" | "MLW" | "MLLW" | "STND" | "GT" | undefined;
|
|
60
|
-
}>;
|
|
61
|
-
export declare const HighTideFloodingMonthlySchema: z.ZodObject<{
|
|
62
|
-
station: z.ZodString;
|
|
63
|
-
format: z.ZodOptional<z.ZodEnum<["json", "xml", "csv"]>>;
|
|
64
|
-
datum: z.ZodOptional<z.ZodEnum<["STND", "MLLW", "MHHW", "GT", "MSL", "MLW", "MHW"]>>;
|
|
65
|
-
threshold: z.ZodOptional<z.ZodEnum<["minor", "moderate", "major"]>>;
|
|
66
|
-
begin_date: z.ZodOptional<z.ZodString>;
|
|
67
|
-
end_date: z.ZodOptional<z.ZodString>;
|
|
68
|
-
year: z.ZodOptional<z.ZodString>;
|
|
69
|
-
}, "strip", z.ZodTypeAny, {
|
|
70
|
-
station: string;
|
|
71
|
-
threshold?: "minor" | "moderate" | "major" | undefined;
|
|
72
|
-
year?: string | undefined;
|
|
73
|
-
format?: "json" | "xml" | "csv" | undefined;
|
|
74
|
-
end_date?: string | undefined;
|
|
75
|
-
begin_date?: string | undefined;
|
|
76
|
-
datum?: "MHHW" | "MHW" | "MSL" | "MLW" | "MLLW" | "STND" | "GT" | undefined;
|
|
77
|
-
}, {
|
|
78
|
-
station: string;
|
|
79
|
-
threshold?: "minor" | "moderate" | "major" | undefined;
|
|
80
|
-
year?: string | undefined;
|
|
81
|
-
format?: "json" | "xml" | "csv" | undefined;
|
|
82
|
-
end_date?: string | undefined;
|
|
83
|
-
begin_date?: string | undefined;
|
|
84
|
-
datum?: "MHHW" | "MHW" | "MSL" | "MLW" | "MLLW" | "STND" | "GT" | undefined;
|
|
85
|
-
}>;
|
|
86
|
-
export declare const HighTideFloodingSeasonalSchema: z.ZodObject<{
|
|
87
|
-
station: z.ZodString;
|
|
88
|
-
format: z.ZodOptional<z.ZodEnum<["json", "xml", "csv"]>>;
|
|
89
|
-
datum: z.ZodOptional<z.ZodEnum<["STND", "MLLW", "MHHW", "GT", "MSL", "MLW", "MHW"]>>;
|
|
90
|
-
threshold: z.ZodOptional<z.ZodEnum<["minor", "moderate", "major"]>>;
|
|
91
|
-
season_months: z.ZodOptional<z.ZodEnum<["DJF", "MAM", "JJA", "SON"]>>;
|
|
92
|
-
begin_date: z.ZodOptional<z.ZodString>;
|
|
93
|
-
end_date: z.ZodOptional<z.ZodString>;
|
|
94
|
-
year: z.ZodOptional<z.ZodString>;
|
|
95
|
-
}, "strip", z.ZodTypeAny, {
|
|
96
|
-
station: string;
|
|
97
|
-
threshold?: "minor" | "moderate" | "major" | undefined;
|
|
98
|
-
year?: string | undefined;
|
|
99
|
-
format?: "json" | "xml" | "csv" | undefined;
|
|
100
|
-
end_date?: string | undefined;
|
|
101
|
-
begin_date?: string | undefined;
|
|
102
|
-
datum?: "MHHW" | "MHW" | "MSL" | "MLW" | "MLLW" | "STND" | "GT" | undefined;
|
|
103
|
-
season_months?: "DJF" | "MAM" | "JJA" | "SON" | undefined;
|
|
104
|
-
}, {
|
|
105
|
-
station: string;
|
|
106
|
-
threshold?: "minor" | "moderate" | "major" | undefined;
|
|
107
|
-
year?: string | undefined;
|
|
108
|
-
format?: "json" | "xml" | "csv" | undefined;
|
|
109
|
-
end_date?: string | undefined;
|
|
110
|
-
begin_date?: string | undefined;
|
|
111
|
-
datum?: "MHHW" | "MHW" | "MSL" | "MLW" | "MLLW" | "STND" | "GT" | undefined;
|
|
112
|
-
season_months?: "DJF" | "MAM" | "JJA" | "SON" | undefined;
|
|
113
|
-
}>;
|
|
114
|
-
export declare const HighTideFloodingAnnualSchema: z.ZodObject<{
|
|
115
|
-
station: z.ZodString;
|
|
116
|
-
format: z.ZodOptional<z.ZodEnum<["json", "xml", "csv"]>>;
|
|
117
|
-
datum: z.ZodOptional<z.ZodEnum<["STND", "MLLW", "MHHW", "GT", "MSL", "MLW", "MHW"]>>;
|
|
118
|
-
threshold: z.ZodOptional<z.ZodEnum<["minor", "moderate", "major"]>>;
|
|
119
|
-
begin_date: z.ZodOptional<z.ZodString>;
|
|
120
|
-
end_date: z.ZodOptional<z.ZodString>;
|
|
121
|
-
year_range: z.ZodOptional<z.ZodString>;
|
|
122
|
-
}, "strip", z.ZodTypeAny, {
|
|
123
|
-
station: string;
|
|
124
|
-
threshold?: "minor" | "moderate" | "major" | undefined;
|
|
125
|
-
format?: "json" | "xml" | "csv" | undefined;
|
|
126
|
-
end_date?: string | undefined;
|
|
127
|
-
begin_date?: string | undefined;
|
|
128
|
-
datum?: "MHHW" | "MHW" | "MSL" | "MLW" | "MLLW" | "STND" | "GT" | undefined;
|
|
129
|
-
year_range?: string | undefined;
|
|
130
|
-
}, {
|
|
131
|
-
station: string;
|
|
132
|
-
threshold?: "minor" | "moderate" | "major" | undefined;
|
|
133
|
-
format?: "json" | "xml" | "csv" | undefined;
|
|
134
|
-
end_date?: string | undefined;
|
|
135
|
-
begin_date?: string | undefined;
|
|
136
|
-
datum?: "MHHW" | "MHW" | "MSL" | "MLW" | "MLLW" | "STND" | "GT" | undefined;
|
|
137
|
-
year_range?: string | undefined;
|
|
138
|
-
}>;
|
|
139
|
-
export declare const HighTideFloodingProjectionsSchema: z.ZodObject<{
|
|
140
|
-
station: z.ZodString;
|
|
141
|
-
format: z.ZodOptional<z.ZodEnum<["json", "xml", "csv"]>>;
|
|
142
|
-
scenario: z.ZodOptional<z.ZodEnum<["all", "low", "intermediate-low", "intermediate", "intermediate-high", "high", "extreme"]>>;
|
|
143
|
-
datum: z.ZodOptional<z.ZodEnum<["STND", "MLLW", "MHHW", "GT", "MSL", "MLW", "MHW"]>>;
|
|
144
|
-
threshold: z.ZodOptional<z.ZodEnum<["minor", "moderate", "major"]>>;
|
|
145
|
-
decade: z.ZodOptional<z.ZodString>;
|
|
146
|
-
}, "strip", z.ZodTypeAny, {
|
|
147
|
-
station: string;
|
|
148
|
-
threshold?: "minor" | "moderate" | "major" | undefined;
|
|
149
|
-
format?: "json" | "xml" | "csv" | undefined;
|
|
150
|
-
scenario?: "all" | "high" | "low" | "intermediate-low" | "intermediate" | "intermediate-high" | "extreme" | undefined;
|
|
151
|
-
datum?: "MHHW" | "MHW" | "MSL" | "MLW" | "MLLW" | "STND" | "GT" | undefined;
|
|
152
|
-
decade?: string | undefined;
|
|
153
|
-
}, {
|
|
154
|
-
station: string;
|
|
155
|
-
threshold?: "minor" | "moderate" | "major" | undefined;
|
|
156
|
-
format?: "json" | "xml" | "csv" | undefined;
|
|
157
|
-
scenario?: "all" | "high" | "low" | "intermediate-low" | "intermediate" | "intermediate-high" | "extreme" | undefined;
|
|
158
|
-
datum?: "MHHW" | "MHW" | "MSL" | "MLW" | "MLLW" | "STND" | "GT" | undefined;
|
|
159
|
-
decade?: string | undefined;
|
|
160
|
-
}>;
|
|
161
|
-
export declare const HighTideFloodingLikelihoodsSchema: z.ZodObject<{
|
|
162
|
-
station: z.ZodString;
|
|
163
|
-
format: z.ZodOptional<z.ZodEnum<["json", "xml", "csv"]>>;
|
|
164
|
-
datum: z.ZodOptional<z.ZodEnum<["STND", "MLLW", "MHHW", "GT", "MSL", "MLW", "MHW"]>>;
|
|
165
|
-
threshold: z.ZodOptional<z.ZodEnum<["minor", "moderate", "major"]>>;
|
|
166
|
-
date: z.ZodOptional<z.ZodString>;
|
|
167
|
-
}, "strip", z.ZodTypeAny, {
|
|
168
|
-
station: string;
|
|
169
|
-
threshold?: "minor" | "moderate" | "major" | undefined;
|
|
170
|
-
date?: string | undefined;
|
|
171
|
-
format?: "json" | "xml" | "csv" | undefined;
|
|
172
|
-
datum?: "MHHW" | "MHW" | "MSL" | "MLW" | "MLLW" | "STND" | "GT" | undefined;
|
|
173
|
-
}, {
|
|
174
|
-
station: string;
|
|
175
|
-
threshold?: "minor" | "moderate" | "major" | undefined;
|
|
176
|
-
date?: string | undefined;
|
|
177
|
-
format?: "json" | "xml" | "csv" | undefined;
|
|
178
|
-
datum?: "MHHW" | "MHW" | "MSL" | "MLW" | "MLLW" | "STND" | "GT" | undefined;
|
|
179
|
-
}>;
|
|
180
|
-
export declare const TopTenWaterLevelsSchema: z.ZodObject<{
|
|
181
|
-
station: z.ZodString;
|
|
182
|
-
format: z.ZodOptional<z.ZodEnum<["json", "xml", "csv"]>>;
|
|
183
|
-
datum: z.ZodOptional<z.ZodEnum<["STND", "MLLW", "MHHW", "GT", "MSL", "MLW", "MHW"]>>;
|
|
184
|
-
units: z.ZodOptional<z.ZodEnum<["english", "metric"]>>;
|
|
185
|
-
analysis_type: z.ZodOptional<z.ZodEnum<["highest", "lowest"]>>;
|
|
186
|
-
}, "strip", z.ZodTypeAny, {
|
|
187
|
-
station: string;
|
|
188
|
-
format?: "json" | "xml" | "csv" | undefined;
|
|
189
|
-
units?: "english" | "metric" | undefined;
|
|
190
|
-
datum?: "MHHW" | "MHW" | "MSL" | "MLW" | "MLLW" | "STND" | "GT" | undefined;
|
|
191
|
-
analysis_type?: "highest" | "lowest" | undefined;
|
|
192
|
-
}, {
|
|
193
|
-
station: string;
|
|
194
|
-
format?: "json" | "xml" | "csv" | undefined;
|
|
195
|
-
units?: "english" | "metric" | undefined;
|
|
196
|
-
datum?: "MHHW" | "MHW" | "MSL" | "MLW" | "MLLW" | "STND" | "GT" | undefined;
|
|
197
|
-
analysis_type?: "highest" | "lowest" | undefined;
|
|
198
|
-
}>;
|
package/dist/schemas/dpapi.js
DELETED
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
2
|
-
import { StationSchema, UnitsSchema, FormatSchema } from './common.js';
|
|
3
|
-
// DPAPI-specific parameter schemas
|
|
4
|
-
export const AffiliationSchema = z.enum(['Global', 'US']).optional().describe('Station affiliation (Global or US)');
|
|
5
|
-
export const ScenarioSchema = z.enum(['all', 'low', 'intermediate-low', 'intermediate', 'intermediate-high', 'high', 'extreme']).optional().describe('Sea level rise scenario');
|
|
6
|
-
export const SeasonSchema = z.enum(['DJF', 'MAM', 'JJA', 'SON']).optional().describe('Season months (DJF-Winter, MAM-Spring, JJA-Summer, SON-Fall)');
|
|
7
|
-
export const DpapiDatumSchema = z.enum(['STND', 'MLLW', 'MHHW', 'GT', 'MSL', 'MLW', 'MHW']).optional().describe('Datum reference for DPAPI');
|
|
8
|
-
export const ThresholdSchema = z.enum(['minor', 'moderate', 'major']).optional().describe('Flood threshold level');
|
|
9
|
-
export const DecadeSchema = z.string().optional().describe('Decade for projections (e.g., "2050")');
|
|
10
|
-
export const YearSchema = z.string().optional().describe('Year for analysis (YYYY format)');
|
|
11
|
-
export const YearRangeSchema = z.string().optional().describe('Year range (YYYY-YYYY format)');
|
|
12
|
-
// Sea Level Trends schema
|
|
13
|
-
export const SeaLevelTrendsSchema = z.object({
|
|
14
|
-
station: StationSchema,
|
|
15
|
-
affil: AffiliationSchema,
|
|
16
|
-
format: FormatSchema
|
|
17
|
-
}).describe('Get sea level trends for a station');
|
|
18
|
-
// Extreme Water Levels schema
|
|
19
|
-
export const ExtremeWaterLevelsSchema = z.object({
|
|
20
|
-
station: StationSchema,
|
|
21
|
-
units: UnitsSchema,
|
|
22
|
-
format: FormatSchema
|
|
23
|
-
}).describe('Get extreme water levels for a station');
|
|
24
|
-
// High Tide Flooding Daily schema
|
|
25
|
-
export const HighTideFloodingDailySchema = z.object({
|
|
26
|
-
station: StationSchema,
|
|
27
|
-
format: FormatSchema,
|
|
28
|
-
datum: DpapiDatumSchema,
|
|
29
|
-
threshold: ThresholdSchema,
|
|
30
|
-
begin_date: z.string().optional().describe('Start date (YYYYMMDD format)'),
|
|
31
|
-
end_date: z.string().optional().describe('End date (YYYYMMDD format)'),
|
|
32
|
-
year: YearSchema
|
|
33
|
-
}).describe('Get high tide flooding daily count data');
|
|
34
|
-
// High Tide Flooding Monthly schema
|
|
35
|
-
export const HighTideFloodingMonthlySchema = z.object({
|
|
36
|
-
station: StationSchema,
|
|
37
|
-
format: FormatSchema,
|
|
38
|
-
datum: DpapiDatumSchema,
|
|
39
|
-
threshold: ThresholdSchema,
|
|
40
|
-
begin_date: z.string().optional().describe('Start date (YYYYMMDD format)'),
|
|
41
|
-
end_date: z.string().optional().describe('End date (YYYYMMDD format)'),
|
|
42
|
-
year: YearSchema
|
|
43
|
-
}).describe('Get high tide flooding monthly count data');
|
|
44
|
-
// High Tide Flooding Seasonal schema
|
|
45
|
-
export const HighTideFloodingSeasonalSchema = z.object({
|
|
46
|
-
station: StationSchema,
|
|
47
|
-
format: FormatSchema,
|
|
48
|
-
datum: DpapiDatumSchema,
|
|
49
|
-
threshold: ThresholdSchema,
|
|
50
|
-
season_months: SeasonSchema,
|
|
51
|
-
begin_date: z.string().optional().describe('Start date (YYYYMMDD format)'),
|
|
52
|
-
end_date: z.string().optional().describe('End date (YYYYMMDD format)'),
|
|
53
|
-
year: YearSchema
|
|
54
|
-
}).describe('Get high tide flooding seasonal count data');
|
|
55
|
-
// High Tide Flooding Annual schema
|
|
56
|
-
export const HighTideFloodingAnnualSchema = z.object({
|
|
57
|
-
station: StationSchema,
|
|
58
|
-
format: FormatSchema,
|
|
59
|
-
datum: DpapiDatumSchema,
|
|
60
|
-
threshold: ThresholdSchema,
|
|
61
|
-
begin_date: z.string().optional().describe('Start date (YYYYMMDD format)'),
|
|
62
|
-
end_date: z.string().optional().describe('End date (YYYYMMDD format)'),
|
|
63
|
-
year_range: YearRangeSchema
|
|
64
|
-
}).describe('Get high tide flooding annual count data');
|
|
65
|
-
// High Tide Flooding Projections schema
|
|
66
|
-
export const HighTideFloodingProjectionsSchema = z.object({
|
|
67
|
-
station: StationSchema,
|
|
68
|
-
format: FormatSchema,
|
|
69
|
-
scenario: ScenarioSchema,
|
|
70
|
-
datum: DpapiDatumSchema,
|
|
71
|
-
threshold: ThresholdSchema,
|
|
72
|
-
decade: DecadeSchema
|
|
73
|
-
}).describe('Get high tide flooding decadal projections');
|
|
74
|
-
// High Tide Flooding Likelihoods schema
|
|
75
|
-
export const HighTideFloodingLikelihoodsSchema = z.object({
|
|
76
|
-
station: StationSchema,
|
|
77
|
-
format: FormatSchema,
|
|
78
|
-
datum: DpapiDatumSchema,
|
|
79
|
-
threshold: ThresholdSchema,
|
|
80
|
-
date: z.string().optional().describe('Specific date (YYYYMMDD format)')
|
|
81
|
-
}).describe('Get high tide flooding daily likelihoods');
|
|
82
|
-
// Top Ten Water Levels schema
|
|
83
|
-
export const TopTenWaterLevelsSchema = z.object({
|
|
84
|
-
station: StationSchema,
|
|
85
|
-
format: FormatSchema,
|
|
86
|
-
datum: DpapiDatumSchema,
|
|
87
|
-
units: UnitsSchema,
|
|
88
|
-
analysis_type: z.enum(['highest', 'lowest']).optional().describe('Analysis type (highest or lowest)')
|
|
89
|
-
}).describe('Get top ten water levels for a station');
|
package/dist/server/config.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { FastMCP } from 'fastmcp';
|
|
2
|
-
/**
|
|
3
|
-
* Create and configure the FastMCP server
|
|
4
|
-
*/
|
|
5
|
-
export declare function createServer(): FastMCP<undefined>;
|
|
6
|
-
/**
|
|
7
|
-
* Start the FastMCP server with configurable transport
|
|
8
|
-
*/
|
|
9
|
-
export declare function startServer(server: FastMCP): void;
|
package/dist/server/config.js
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { FastMCP } from 'fastmcp';
|
|
2
|
-
/**
|
|
3
|
-
* Create and configure the FastMCP server
|
|
4
|
-
*/
|
|
5
|
-
export function createServer() {
|
|
6
|
-
// Create the MCP server with fixed configuration
|
|
7
|
-
const server = new FastMCP({
|
|
8
|
-
name: 'LocalTides',
|
|
9
|
-
version: '1.0.0'
|
|
10
|
-
});
|
|
11
|
-
return server;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Start the FastMCP server with configurable transport
|
|
15
|
-
*/
|
|
16
|
-
export function startServer(server) {
|
|
17
|
-
// Check command line arguments for transport type
|
|
18
|
-
const args = process.argv.slice(2);
|
|
19
|
-
const httpIndex = args.indexOf('--http');
|
|
20
|
-
const portIndex = args.indexOf('--port');
|
|
21
|
-
if (httpIndex !== -1) {
|
|
22
|
-
// HTTP transport mode
|
|
23
|
-
const port = portIndex !== -1 && args[portIndex + 1] ? parseInt(args[portIndex + 1]) : 3000;
|
|
24
|
-
console.log(`Starting NOAA MCP server on HTTP port ${port}`);
|
|
25
|
-
server.start({
|
|
26
|
-
transportType: 'httpStream',
|
|
27
|
-
httpStream: {
|
|
28
|
-
endpoint: '/sse',
|
|
29
|
-
port: port
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
else {
|
|
34
|
-
// Default stdio transport
|
|
35
|
-
console.log('Starting NOAA MCP server with stdio transport');
|
|
36
|
-
server.start({
|
|
37
|
-
transportType: 'stdio'
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { NoaaService } from '../services/noaa-service.js';
|
|
2
|
-
export declare class McpServer {
|
|
3
|
-
private tools;
|
|
4
|
-
private noaaService;
|
|
5
|
-
constructor(noaaService: NoaaService);
|
|
6
|
-
private initializeTools;
|
|
7
|
-
getTools(): {
|
|
8
|
-
name: string;
|
|
9
|
-
description: string;
|
|
10
|
-
}[];
|
|
11
|
-
executeTool(toolName: string, params: any): Promise<any>;
|
|
12
|
-
}
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { GetWaterLevelsSchema, GetTidePredictionsSchema, GetCurrentsSchema, GetCurrentPredictionsSchema, GetMeteorologicalDataSchema, GetStationsSchema, GetStationDetailsSchema } from '../interfaces/noaa.js';
|
|
2
|
-
// Class for the MCP server
|
|
3
|
-
export class McpServer {
|
|
4
|
-
tools;
|
|
5
|
-
noaaService;
|
|
6
|
-
constructor(noaaService) {
|
|
7
|
-
this.noaaService = noaaService;
|
|
8
|
-
this.tools = this.initializeTools();
|
|
9
|
-
}
|
|
10
|
-
// Initialize the tools
|
|
11
|
-
initializeTools() {
|
|
12
|
-
// Water Levels tool
|
|
13
|
-
const getWaterLevels = {
|
|
14
|
-
name: "get_water_levels",
|
|
15
|
-
description: "Get water level data for a station",
|
|
16
|
-
inputSchema: GetWaterLevelsSchema,
|
|
17
|
-
handler: async (params) => {
|
|
18
|
-
return this.noaaService.getWaterLevels(params);
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
// Tide Predictions tool
|
|
22
|
-
const getTidePredictions = {
|
|
23
|
-
name: "get_tide_predictions",
|
|
24
|
-
description: "Get tide prediction data",
|
|
25
|
-
inputSchema: GetTidePredictionsSchema,
|
|
26
|
-
handler: async (params) => {
|
|
27
|
-
return this.noaaService.getTidePredictions(params);
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
// Currents tool
|
|
31
|
-
const getCurrents = {
|
|
32
|
-
name: "get_currents",
|
|
33
|
-
description: "Get currents data for a station",
|
|
34
|
-
inputSchema: GetCurrentsSchema,
|
|
35
|
-
handler: async (params) => {
|
|
36
|
-
return this.noaaService.getCurrents(params);
|
|
37
|
-
}
|
|
38
|
-
};
|
|
39
|
-
// Current Predictions tool
|
|
40
|
-
const getCurrentPredictions = {
|
|
41
|
-
name: "get_current_predictions",
|
|
42
|
-
description: "Get current predictions",
|
|
43
|
-
inputSchema: GetCurrentPredictionsSchema,
|
|
44
|
-
handler: async (params) => {
|
|
45
|
-
return this.noaaService.getCurrentPredictions(params);
|
|
46
|
-
}
|
|
47
|
-
};
|
|
48
|
-
// Meteorological Data tool
|
|
49
|
-
const getMeteorologicalData = {
|
|
50
|
-
name: "get_meteorological_data",
|
|
51
|
-
description: "Get meteorological data",
|
|
52
|
-
inputSchema: GetMeteorologicalDataSchema,
|
|
53
|
-
handler: async (params) => {
|
|
54
|
-
return this.noaaService.getMeteorologicalData(params);
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
// Stations tool
|
|
58
|
-
const getStations = {
|
|
59
|
-
name: "get_stations",
|
|
60
|
-
description: "Get list of stations",
|
|
61
|
-
inputSchema: GetStationsSchema,
|
|
62
|
-
handler: async (params) => {
|
|
63
|
-
return this.noaaService.getStations(params);
|
|
64
|
-
}
|
|
65
|
-
};
|
|
66
|
-
// Station Details tool
|
|
67
|
-
const getStationDetails = {
|
|
68
|
-
name: "get_station_details",
|
|
69
|
-
description: "Get detailed information about a station",
|
|
70
|
-
inputSchema: GetStationDetailsSchema,
|
|
71
|
-
handler: async (params) => {
|
|
72
|
-
return this.noaaService.getStationDetails(params);
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
return [
|
|
76
|
-
getWaterLevels,
|
|
77
|
-
getTidePredictions,
|
|
78
|
-
getCurrents,
|
|
79
|
-
getCurrentPredictions,
|
|
80
|
-
getMeteorologicalData,
|
|
81
|
-
getStations,
|
|
82
|
-
getStationDetails
|
|
83
|
-
];
|
|
84
|
-
}
|
|
85
|
-
// Method to get all tools
|
|
86
|
-
getTools() {
|
|
87
|
-
return this.tools.map(tool => ({
|
|
88
|
-
name: tool.name,
|
|
89
|
-
description: tool.description
|
|
90
|
-
}));
|
|
91
|
-
}
|
|
92
|
-
// Method to handle tool execution
|
|
93
|
-
async executeTool(toolName, params) {
|
|
94
|
-
const tool = this.tools.find(t => t.name === toolName);
|
|
95
|
-
if (!tool) {
|
|
96
|
-
throw new Error(`Tool '${toolName}' not found`);
|
|
97
|
-
}
|
|
98
|
-
// Validate the parameters against the schema
|
|
99
|
-
const validatedParams = tool.inputSchema.parse(params);
|
|
100
|
-
// Execute the tool handler
|
|
101
|
-
return tool.handler(validatedParams);
|
|
102
|
-
}
|
|
103
|
-
}
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Service for interacting with NOAA Derived Product API (DPAPI)
|
|
3
|
-
*/
|
|
4
|
-
export declare class DpapiService {
|
|
5
|
-
/**
|
|
6
|
-
* Build parameters for the API request
|
|
7
|
-
* @param params Parameters for the request
|
|
8
|
-
* @returns URL-encoded parameters string
|
|
9
|
-
*/
|
|
10
|
-
private buildParams;
|
|
11
|
-
/**
|
|
12
|
-
* Make a request to the DPAPI
|
|
13
|
-
* @param endpoint Endpoint path
|
|
14
|
-
* @param params Parameters for the request
|
|
15
|
-
* @returns Response data
|
|
16
|
-
*/
|
|
17
|
-
fetchDpapi(endpoint: string, params?: Record<string, any>): Promise<any>;
|
|
18
|
-
/**
|
|
19
|
-
* Get sea level trends for a station
|
|
20
|
-
* @param params Parameters including station ID and affiliation
|
|
21
|
-
* @returns Sea level trend data
|
|
22
|
-
*/
|
|
23
|
-
getSeaLevelTrends(params: Record<string, any>): Promise<any>;
|
|
24
|
-
/**
|
|
25
|
-
* Get extreme water levels for a station
|
|
26
|
-
* @param params Parameters including station ID and units
|
|
27
|
-
* @returns Extreme water level data
|
|
28
|
-
*/
|
|
29
|
-
getExtremeWaterLevels(params: Record<string, any>): Promise<any>;
|
|
30
|
-
/**
|
|
31
|
-
* Get high tide flooding daily count data
|
|
32
|
-
* @param params Parameters including station ID, date range, and thresholds
|
|
33
|
-
* @returns Daily flood count data
|
|
34
|
-
*/
|
|
35
|
-
getHighTideFloodingDaily(params: Record<string, any>): Promise<any>;
|
|
36
|
-
/**
|
|
37
|
-
* Get high tide flooding monthly count data
|
|
38
|
-
* @param params Parameters including station ID, date range, and thresholds
|
|
39
|
-
* @returns Monthly flood count data
|
|
40
|
-
*/
|
|
41
|
-
getHighTideFloodingMonthly(params: Record<string, any>): Promise<any>;
|
|
42
|
-
/**
|
|
43
|
-
* Get high tide flooding seasonal count data
|
|
44
|
-
* @param params Parameters including station ID, seasons, and thresholds
|
|
45
|
-
* @returns Seasonal flood count data
|
|
46
|
-
*/
|
|
47
|
-
getHighTideFloodingSeasonal(params: Record<string, any>): Promise<any>;
|
|
48
|
-
/**
|
|
49
|
-
* Get high tide flooding annual count data
|
|
50
|
-
* @param params Parameters including station ID, year range, and thresholds
|
|
51
|
-
* @returns Annual flood count data
|
|
52
|
-
*/
|
|
53
|
-
getHighTideFloodingAnnual(params: Record<string, any>): Promise<any>;
|
|
54
|
-
/**
|
|
55
|
-
* Get high tide flooding decadal projections
|
|
56
|
-
* @param params Parameters including station ID, scenario, and decade
|
|
57
|
-
* @returns Decadal projection data
|
|
58
|
-
*/
|
|
59
|
-
getHighTideFloodingProjections(params: Record<string, any>): Promise<any>;
|
|
60
|
-
/**
|
|
61
|
-
* Get high tide flooding daily likelihoods
|
|
62
|
-
* @param params Parameters including station ID and date
|
|
63
|
-
* @returns Daily likelihood data
|
|
64
|
-
*/
|
|
65
|
-
getHighTideFloodingLikelihoods(params: Record<string, any>): Promise<any>;
|
|
66
|
-
/**
|
|
67
|
-
* Get top ten water levels for a station
|
|
68
|
-
* @param params Parameters including station ID and analysis type
|
|
69
|
-
* @returns Top ten water level data
|
|
70
|
-
*/
|
|
71
|
-
getTopTenWaterLevels(params: Record<string, any>): Promise<any>;
|
|
72
|
-
}
|