geotap-mcp-server 3.0.0 → 3.0.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.
Files changed (3) hide show
  1. package/LICENSE +21 -0
  2. package/package.json +1 -1
  3. package/src/index.js +70 -16
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 GeoTap
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "geotap-mcp-server",
3
- "version": "3.0.0",
3
+ "version": "3.0.1",
4
4
  "description": "MCP server for GeoTap — collect comprehensive environmental data from 80+ US federal sources for any site. One tool, all the data.",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
package/src/index.js CHANGED
@@ -27,18 +27,43 @@ DATA INCLUDES:
27
27
  - Contamination: Superfund, brownfields, USTs, EPA-regulated facilities (RCRA, GHG, FRS)
28
28
  - Water: streams, watershed, water quality impairments (ATTAINS), NPDES outfalls, groundwater
29
29
  - Hazards: seismic design (ASCE 7-22), earthquakes, wildfires, landslides, coastal vulnerability, NRI
30
- - Rainfall: NOAA Atlas 14 precipitation frequency data
30
+ - Rainfall: NOAA Atlas 14 precipitation frequency data (IDF curves, design storms)
31
+ - Land cover: NLCD 2021 classification (developed, forest, wetlands, etc.)
32
+ - Elevation: USGS 3DEP (min/max/mean elevation, relief)
31
33
  - Infrastructure: hospitals, fire stations, schools, EMS, dams, levees, power plants, airports, railroads, bridges
32
34
  - Ecology: species (GBIF), fish habitat, critical habitat, cropland, national forests, BLM lands, historic places
33
35
  - Energy: solar potential, utility rates, EV charging stations
34
- - Demographics: Census ACS (population, income, housing, poverty)
36
+ - Demographics: Census ACS (population, income, housing, poverty, vacancy rates)
35
37
  - Protected lands (PAD-US), wild & scenic rivers, sole source aquifers
36
38
 
39
+ HOW TO PRESENT RESULTS:
40
+ When you receive completed data, organize your response using these sections (skip sections with no data):
41
+
42
+ 1. **Site Overview** — Location, area, county, state, elevation range, land cover
43
+ 2. **Environmental Constraints** — Flood zones, wetlands, soils (drainage class, hydrologic group), impaired waters, critical habitat. Flag any development constraints.
44
+ 3. **Contamination & Regulated Sites** — Superfund, brownfields, USTs, NPDES, EPA-regulated facilities within the search radius. Include distances and directions.
45
+ 4. **Water Resources** — Streams, watershed (HUC), water quality stations, groundwater wells, Atlas 14 rainfall (cite 2yr/10yr/100yr 24-hour depths).
46
+ 5. **Natural Hazards** — Flood risk (FEMA zones), seismic design values, NRI risk index, earthquake history, landslide susceptibility, wildfire history.
47
+ 6. **Infrastructure & Services** — Nearby hospitals, fire stations, schools, EMS, dams, airports, bridges. Include counts and distances.
48
+ 7. **Demographics & Energy** — Population, median income, housing, solar potential, utility rates.
49
+ 8. **Key Findings & Considerations** — Summarize the most important findings. Highlight anything that would affect site development, permitting, or engineering design.
50
+
51
+ FORMATTING RULES:
52
+ - Use markdown tables for structured data (flood zones, soils, nearby facilities)
53
+ - Bold key values and findings that matter most
54
+ - Always cite the source agency for each data point (e.g., "FEMA NFHL", "NRCS SSURGO", "NOAA Atlas 14")
55
+ - Include distances and cardinal directions for nearby features (e.g., "0.8 miles NW")
56
+ - For Atlas 14 rainfall, present as a compact table: return period × duration
57
+ - For soils, include drainage class and hydrologic soil group — these drive stormwater design
58
+ - Note when a data source was queried but returned no data ("_noData: true") — this is informative (e.g., no Superfund sites nearby is good news)
59
+ - End with a disclaimer: "Data sourced from US federal agencies via GeoTap. Verify critical findings against authoritative sources before making engineering or regulatory decisions."
60
+
37
61
  IMPORTANT:
38
- - All data from authoritative US federal sources. Always cite the source agency.
62
+ - All data from authoritative US federal sources. Always cite the source agency, not just "GeoTap."
39
63
  - Data is for informational purposes. Remind users to verify for engineering/regulatory decisions.
40
64
  - Coordinates must be within the United States (including territories).
41
- - If a data source returns "_noData: true", it was queried but found nothing at that location.`
65
+ - If a data source returns "_noData: true", it was queried but found nothing at that location — mention this where relevant (no contamination nearby is positive).
66
+ - If a data source returns "_error", note that the source was unavailable and the user should check back.`
42
67
  });
43
68
 
44
69
  // ── Tool: collect_site_data ──────────────────────────────────────────
@@ -66,18 +91,21 @@ Data returned covers: flood zones, wetlands, soils, geology, contamination sites
66
91
  if (address && !siteGeometry) {
67
92
  // Geocode the address first
68
93
  const geocodeResult = await callApi('/geocode', 'GET', { address });
69
- if (!geocodeResult?.lat || !geocodeResult?.lng) {
94
+ // API returns { success, results: [{ lat, lon, displayName, source }] }
95
+ const match = geocodeResult?.results?.[0];
96
+ if (!match?.lat || !match?.lon) {
70
97
  return {
71
98
  content: [{ type: 'text', text: JSON.stringify({
72
99
  error: true,
73
- message: `Could not geocode address: "${address}". Try a more specific address or use lat/lng coordinates.`,
100
+ message: `Could not geocode address: "${address}". Try a more specific address with city/state, or use lat/lng coordinates directly.`,
101
+ suggestion: 'Example: { lat: 34.8779, lng: -82.3313 }',
74
102
  }, null, 2) }],
75
103
  isError: true
76
104
  };
77
105
  }
78
106
  siteGeometry = {
79
107
  type: 'Point',
80
- coordinates: [geocodeResult.lng, geocodeResult.lat]
108
+ coordinates: [match.lon, match.lat]
81
109
  };
82
110
  } else if (lat != null && lng != null && !siteGeometry) {
83
111
  siteGeometry = {
@@ -133,7 +161,7 @@ Data returned covers: flood zones, wetlands, soils, geology, contamination sites
133
161
 
134
162
  server.tool(
135
163
  'get_results',
136
- `Check the status of a data collection job and retrieve results. Poll every 10 seconds until status is "completed". When complete, returns the full data summary from all 80+ federal sources.`,
164
+ `Check the status of a data collection job and retrieve results. Poll every 10 seconds until status is "completed". When complete, returns the full data summary from all 80+ federal sources. Present the results to the user following the formatting instructions in the server description.`,
137
165
  {
138
166
  jobId: z.string().describe('Job ID returned from collect_site_data'),
139
167
  },
@@ -141,15 +169,41 @@ server.tool(
141
169
  try {
142
170
  const result = await callApi(`/site-analysis/data-collect/${encodeURIComponent(params.jobId)}`, 'GET', {});
143
171
 
172
+ const response = { ...result };
173
+
174
+ // Add presentation guidance when results are complete
175
+ if (result.status === 'completed') {
176
+ response._meta = {
177
+ sources: '80+ US federal agencies (FEMA, USGS, NOAA, EPA, NRCS, USFWS, USACE, DOE, DOT, CDC, Census, and more)',
178
+ retrievedAt: new Date().toISOString(),
179
+ disclaimer: 'Data sourced from US federal agencies via GeoTap. Always verify critical data against authoritative sources before making engineering or regulatory decisions.',
180
+ };
181
+ response._presentationGuide = {
182
+ instructions: 'Present these results to the user in a well-organized report. Follow the formatting instructions in the server description (HOW TO PRESENT RESULTS section).',
183
+ sections: [
184
+ 'Site Overview (location, area, elevation, land cover)',
185
+ 'Environmental Constraints (flood zones, wetlands, soils, impaired waters)',
186
+ 'Contamination & Regulated Sites (Superfund, brownfields, USTs, NPDES — with distances)',
187
+ 'Water Resources (streams, watershed, water quality, rainfall IDF data)',
188
+ 'Natural Hazards (flood risk, seismic, NRI, earthquakes, wildfires)',
189
+ 'Infrastructure & Services (hospitals, fire stations, schools, dams, bridges)',
190
+ 'Demographics & Energy (Census ACS, solar potential, utility rates)',
191
+ 'Key Findings & Considerations (summarize what matters most for this site)',
192
+ ],
193
+ tips: [
194
+ 'Use markdown tables for structured comparisons',
195
+ 'Bold the most critical findings (e.g., site is in a FEMA AE flood zone)',
196
+ 'Cite source agencies, not just GeoTap',
197
+ 'Mention when sources returned no data — "no Superfund sites" is useful info',
198
+ 'End with the disclaimer from _meta',
199
+ ]
200
+ };
201
+ } else {
202
+ response._instructions = `Job status: ${result.status}. Poll again in 10 seconds until status is "completed".`;
203
+ }
204
+
144
205
  return {
145
- content: [{ type: 'text', text: JSON.stringify({
146
- ...result,
147
- _meta: {
148
- sources: '80+ US federal agencies (FEMA, USGS, NOAA, EPA, NRCS, USFWS, USACE, DOE, DOT, CDC, Census, and more)',
149
- retrievedAt: new Date().toISOString(),
150
- disclaimer: 'Data sourced from US federal agencies via GeoTap. Always verify critical data against authoritative sources before making engineering or regulatory decisions.',
151
- }
152
- }, null, 2) }]
206
+ content: [{ type: 'text', text: JSON.stringify(response, null, 2) }]
153
207
  };
154
208
  } catch (error) {
155
209
  if (error instanceof StructuredApiError) {