@cyanheads/elevation-mcp-server
Public Hosted Server: https://elevation.caseyjhand.com/mcp
Overview
Elevation and terrain analysis anywhere on Earth, from USGS 3DEP (1–30 m across the US) and Open Topo Data worldwide. Look up spot heights, measure a route's climbs and grades, find an area's high and low points, and check whether terrain blocks a line of sight. No API key required.
Tools
Tool | Description |
| Ground elevation at 1–100 coordinates, in meters and feet, with the dataset and resolution behind each value |
| Sample a route at evenly spaced points and summarize distance, ascent, descent, elevation range, and steepest grades |
| Sample a node grid over a bounding box and report its highest and lowest points, mean elevation, and relief |
| Decide whether terrain blocks the sightline between two points, with earth curvature and refraction, and check first Fresnel zone clearance for radio links |
Agent skill
The elevation-guide covers route geometry, candidate high-point refinement, and visual or radio sightline assessment. Plugin installs discover it in root skills/; npm, Docker, and MCPB distributions include it. MCP clients can read skill://elevation-guide/SKILL.md as a resource or use the Skills extension.
Related MCP server: Geospatial Tools MCP Server
Capability reference
Every successful result includes vertical_reference on both response surfaces. Public SRTM uses EGM96; NAVD88 is typical for 3DEP in the conterminous US, but the returned raster reference is unverified and can vary elsewhere. Mapzen and self-hosted Open Topo Data references are unknown/variable. No-data-only results establish no height reference. Heights are returned without transformation; mixed datasets are not normalized to a common datum. water_surface_m needs a compatible terrain reference; zero or source: opentopodata alone does not establish compatibility.
elevation_get_points tool
points: 1–1,000{lat, lon}objects in decimal degrees (WGS84), or a single point. Only the first 100 are validated and sampled; the remainder stays unvalidatedrequested_points,processed_points, andremaining_pointscount submitted positions, including duplicates and misses.next_offsetis the index after this call's processed prefix, ornullwhen exhausted; continue withoriginalPoints.slice(next_offset), whereoriginalPointsis the array submitted in that call. Use each newly submitted array for the next sliceEach point comes back
okorno_data(a miss never fails the call), withelevation_m/elevation_ft,dataset, andresolution_m(omitted formapzen); 3DEP answers addraster_idandacquisition_date.points_with_datacounts the hits
elevation_get_profile tool
path: 2–1,000 vertices in travel order (consecutive duplicates dropped);samples: 2–250 evenly spaced points along it, endpoints included (default 100)summarycarriestotal_distance_m,ascent_m/descent_m(and feet), start, end, min, and max elevation,highest_point/lowest_point, andmax_grade_pct/min_grade_pctwith where each occurs; ascent depends on the reportedsample_interval_m. Fails asdegenerate_path(under 1 m of route),antipodal_path(add an intermediate waypoint between the identified zero-based input vertices), orno_coverage(no sample has data)include_samples(defaulttrue) returnssamples[](distance, position, elevation, grade, dataset, and resolution per sample);falseomits it and the sample table, and the rest of the result is unchanged
elevation_get_grid tool
south,west,north,eastedges in decimal degrees (a box can't cross longitude 180);rowsandcols2–25 each (default 10), withrows × colsat most 250elevations_mandcell_datasetsmatrices indexed[row][col](row 0 north, column 0 west,nullwithout data), plussummary.highest,summary.lowest,mean_elevation_m, andrelief_m. Fails asinvalid_bbox,too_many_cells, orno_coverageNodes are point samples with the edges included, not cell averages
elevation_check_line_of_sight tool
observerandtargetpoints, at most 1,000 km apart;observer_height_m(default 1.7) andtarget_height_m(default 0), each 0–10,000 m above ground;earth_modelflat,geometric,optical(default, κ 0.13), orradio(κ 0.25);samples3–250 (default 100); optionalwater_surface_m(-500 to 9,000) andfrequency_mhz(30–300,000)verdictisclear,blocked, orindeterminate(samples without data leave the line unconfirmed), withmin_clearance_m/min_clearance_ft, thelimiting_point, and thefirst_obstructionwhen blocked. Fails assame_endpoints(under 1 m apart),sightline_too_long(over 1,000 km apart), orendpoint_no_datafrequency_mhzaddsfresnel: asufficient,insufficient, orindeterminateverdict against the 60% free-space bar of the first Fresnel zone,min_clearance_ratio(clearance over zone radius), and the sample that limits it, which is often notlimiting_pointTerrain only: buildings and vegetation count only as far as the elevation source captures them. Where Mapzen reports sea-floor depth, clearance is measured to the sea surface; USGS 3DEP values below 0 m (bay floor in some bays, or dry land) count as received unless
water_surface_msets a water level, which then applies to every sample
Failures shared by every tool
Reason | Code | When |
|
| USGS 3DEP did not answer or rejected the request; |
|
| Open Topo Data did not answer, rejected the request, or sent an unusable response; |
|
| Open Topo Data kept answering HTTP 429, or asked for a wait over 8 s; |
|
| Public instance only: this server already sent 1,000 requests in the trailing 24 hours, so none was sent; |
|
| The instance at |
|
| The 45 s sampling budget ran out ( |
A coverage miss is never an error: that point has no data. Any provider failure fails the whole call with no partial result.
Features
Built on @cyanheads/mcp-ts-core: stdio and Streamable HTTP transports, pluggable auth (none / jwt / oauth), swappable storage (in-memory, filesystem, Supabase, Cloudflare KV/R2/D1), structured logging with optional OpenTelemetry tracing.
Elevation-specific:
sourceon every tool:auto(default) queries USGS 3DEP inside its coverage and sends 3DEP misses and everything outside it to Open Topo Data;usgs_3depandopentopodatapin one provider. Only a coverage miss falls back, never an outageOpen Topo Data answers from SRTM GL1 v3 (about 30 m, land between 60°N and 56°S), then Mapzen terrain tiles where SRTM has no tile: high latitudes, Antarctica, and ocean bathymetry
Per-call caps of 100 points or 250 samples or grid cells, inside a 45 s sampling budget; each 3DEP point is its own request (6 concurrent, 10 per second), while Open Topo Data takes 100 points per request
The public Open Topo Data instance is paced under its published limits: one request at a time, starts at least 1.1 s apart, at most 1,000 in any trailing 24 hours per server process
Profiles, grids, and sightlines are computed locally from point samples, with great-circle distances and resampling and earth curvature with standard refraction
Agent-friendly output:
Provenance on every value: each point, profile sample, grid cell, and sightline point names its
dataset(usgs_3dep,srtm30m,mapzen) and, except for Mapzen, itsresolution_m(resolution_m_rangeon profiles and grids); computed results adddatasets_usedcounts, and aSources:line credits every dataset that answeredAbsent stays absent: a point or sample without data omits its elevation and a grid cell is
null, never 0; summaries report how many values had dataNotices flag what changes interpretation: results mixing 3DEP and Open Topo Data, Mapzen values below 0 m (sea-floor depths), 3DEP values below 0 m on a sightline, sample spacing coarser or finer than the source, thin clearance margins, and a clear radio path short of 60% Fresnel clearance
Getting started
Connect to the public instance:
claude mcp add --transport http elevation-mcp-server https://elevation.caseyjhand.com/mcpEvery hosted caller shares one Open Topo Data allowance of 1,000 requests a day. Under auto, 3DEP answers inside its coverage and Open Topo Data handles the rest. For sustained global use, run your own instance:
claude mcp add elevation-mcp-server -- npx -y @cyanheads/elevation-mcp-serverOther MCP clients use this local configuration:
{
"mcpServers": {
"elevation-mcp-server": {
"command": "npx",
"args": ["-y", "@cyanheads/elevation-mcp-server"]
}
}
}See Running the server for source and Docker setup.
Configuration
Variable | Description | Default |
| Open Topo Data instance used outside USGS 3DEP coverage, as an |
|
| Transport: |
|
| HTTP server port. |
|
| HTTP session mode: |
|
| Authentication: |
|
| Log level ( |
|
| Directory for log files (Node.js only). |
|
| Enable OpenTelemetry. |
|
Any OPENTOPODATA_BASE_URL other than the public instance is treated as self-hosted (Open Topo Data is MIT-licensed and runs in Docker): 4 concurrent requests, no rate windows. It must serve datasets named srtm30m and mapzen and accept at least 100 locations per request, or calls fail with opentopodata_config_rejected.
See .env.example for every server setting and the common framework overrides.
Known limitations
Open Topo Data's public limits. The public instance allows 100 locations per request, 1 request per second, and 1,000 requests per day per IP address. Each server process paces itself under them, but its count is process-local and resets on restart. Several processes on one machine (a stdio server per client session), or other clients on the same address, also draw on the upstream's count, so the upstream can refuse first (
opentopodata_rate_limited).Shared deployments. A deployment serving many users sends all their requests from one address, so on the public instance they share one 1,000-a-day allowance: about 1,000 point lookups, or 333 full 250-sample calls, and as few as 111 when retries spend requests too. Once it is spent, every call that needs Open Topo Data fails with
opentopodata_daily_limitfor up to 24 hours, including anautocall with a single 3DEP miss, so global answers on such a deployment are best-effort; pointingOPENTOPODATA_BASE_URLat its own instance (loaded withsrtm30mandmapzen) removes the cap. The server has no caller identity to ration by, so one caller's heavy calls slow USGS 3DEP and can spend the public day for everyone.Global resolution. SRTM is a 30 m radar surface model. Mapzen's 1 arc-second grid is interpolated in places from coarser sources (GMTED2010 at 7.5 arc-seconds over parts of the high latitudes, ETOPO1 at about 1.8 km over the open ocean). Outside 3DEP coverage, profile ascent is underestimated and line of sight misses terrain narrower than the source's true resolution.
Whole-meter values. Open Topo Data's datasets are integer rasters, and the upstream rounds the interpolated result to the nearest meter, so ascent and descent over gentle terrain include 1 m quantization steps.
Water. SRTM reports water inside a land tile as 0 m. Beyond SRTM's tiles, Mapzen reports sea-floor depth, and points, profiles, and grids include it. 3DEP values over water depend on the raster: a hydro-flattened surface, sea level, or bathymetry. Line of sight measures clearance to 0 m over Mapzen values below 0, but uses 3DEP values below 0 m as received, since nothing in a USGS answer tells bay floor from dry land below sea level; its notice flags them, and
water_surface_mmeasures a line over water to the water instead.Mixed models. 3DEP is a bare-earth DEM, typically NAVD88 in the conterminous US; the exact returned raster reference is unverified and can vary elsewhere. Public SRTM is a radar surface model that partly includes canopy and buildings, using EGM96. Mapzen blends regional sources; self-hosted dataset names do not verify the reference. Heights are not transformed to a common datum, and datum alone does not explain differences between providers.
Sampling. Features narrower than the sample spacing are missed: a ridge between line-of-sight samples, a summit between grid nodes (re-grid a smaller box around
summary.highestto refine it), short climbs between profile samples. Spacing is always reported.USGS 3DEP throughput. The point query service has no published limit and no batch endpoint: about 10 points per second at this server's pacing, hence the 250-sample cap and 45 s budget. A call whose lookups would push the queue past a running call's budget is refused at once with
sampling_deadline_exceededanddata.retryAfter, so two 250-sample calls at once run in turn: the second can be retried after about 25 s.Acquisition dates from USGS are passed through raw in M/D/YYYY form, which sometimes carries a zero month or day; any other form is omitted.
Antimeridian. A grid box cannot cross longitude 180, so split it into two calls. Paths and sightlines crossing it work.
Line of sight is limited to 1,000 km, where the parabolic curvature approximation overstates the midpoint rise by up to about 10 m. Its Fresnel check covers the first zone against the 60% bar at the chosen earth model, at the sample positions only, with no diffraction loss or worst-case k factor.
Running the server
Requires Bun 1.4.0+ or Node.js 24+. Both elevation providers are keyless. For heavy global use, set OPENTOPODATA_BASE_URL to a self-hosted Open Topo Data instance with srtm30m, mapzen, and at least 100 locations per request.
git clone https://github.com/cyanheads/elevation-mcp-server.git
cd elevation-mcp-server
bun install
cp .env.example .envFor Docker over stdio:
docker run -i --rm -e MCP_TRANSPORT_TYPE=stdio ghcr.io/cyanheads/elevation-mcp-server:latestFor HTTP from source:
MCP_TRANSPORT_TYPE=http MCP_HTTP_PORT=3010 bun run start:http
# http://localhost:3010/mcpLocal development
Build and run the production version:
# One-time build bun run rebuild # Run the built server bun run start:http # or bun run start:stdioRun checks and tests:
bun run devcheck # Lints, formats, type-checks, and more bun run test # Runs the test suite
Project structure
Directory | Purpose |
|
|
|
|
| Tool definitions ( |
| Input schemas, output schemas, and |
|
|
| USGS Elevation Point Query Service client. |
| Open Topo Data client and its request pacers. |
| Timed fetch attempts and bounded body reads shared by both clients. |
| Design: tool contracts, computation, services, decisions, and limitations. |
| Published workflow and interpretation gates for agents calling the terrain tools. |
| Unit and tool tests against a mocked upstream. |
Development guide
See CLAUDE.md for development guidelines and architectural rules. The short version:
Handlers throw, framework catches — no
try/catchin tool logicUse
ctx.logfor logging,ctx.statefor storageRegister new tools in
allToolDefinitionsinsrc/mcp-server/tools/definitions/index.tsWrap external API calls: validate raw → normalize to domain type → return output schema; never fabricate missing fields
Data sources and attribution
Dataset |
| Served by | Terms |
USGS 3D Elevation Program (3DEP) |
| USGS Elevation Point Query Service | Public domain (U.S. federal government work). Credit the U.S. Geological Survey, 3D Elevation Program. |
SRTM GL1 v3 |
| Open Topo Data | Public domain (NASA/USGS). |
Mapzen terrain tiles v1.1 |
| Open Topo Data | Requires the multi-source attribution below. |
Every successful result's Sources: line credits each dataset that answered, and a response that used any Mapzen value carries the full Mapzen attribution there. The public Open Topo Data instance publishes no terms beyond its usage limits; its server software is MIT-licensed and self-hostable.
Mapzen terrain tiles attribution, verbatim from the tilezen/joerd attribution document:
ArcticDEM terrain data DEM(s) were created from DigitalGlobe, Inc., imagery and funded under National Science Foundation awards 1043681, 1559691, and 1542736;
Australia terrain data © Commonwealth of Australia (Geoscience Australia) 2017;
Austria terrain data © offene Daten Österreichs – Digitales Geländemodell (DGM) Österreich;
Canada terrain data contains information licensed under the Open Government Licence – Canada;
Europe terrain data produced using Copernicus data and information funded by the European Union - EU-DEM layers;
Global ETOPO1 terrain data U.S. National Oceanic and Atmospheric Administration
Mexico terrain data source: INEGI, Continental relief, 2016;
New Zealand terrain data Copyright 2011 Crown copyright (c) Land Information New Zealand and the New Zealand Government (All rights reserved);
Norway terrain data © Kartverket;
United Kingdom terrain data © Environment Agency copyright and/or database right 2015. All rights reserved;
United States 3DEP (formerly NED) and global GMTED2010 and SRTM terrain data courtesy of the U.S. Geological Survey.
This server is independent of the U.S. Geological Survey and of Open Topo Data, and is not endorsed by either.
Contributing
Issues are welcome at the issue tracker.
License
This project is licensed under the Apache 2.0 License. See the LICENSE file for details.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Geodata for any place, inside your agent: map data, terrain, routes, satellite images, GIS files.
Open-Elevation MCP — terrain elevation by lat/lon (no auth)
Elevation, slope, terrain maps & 3-D surfaces for any site — near-global 30 m, US 10 m, AU/NZ 5 m.
US weather & geo for AI agents: forecasts, alerts, earthquakes, elevation, geocoding. No keys.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables advanced geospatial analysis including elevation queries, line-of-sight calculations, terrain visualization, and autonomous drone mission planning with real-time safety analysis and 3D visualization capabilities.MIT
- AlicenseNot gradedqualityDmaintenanceProvides 15 geospatial utility tools for AI agents, covering coordinate transformation, spatial data validation, elevation/terrain, viewshed analysis, and drone flight planning.1MIT
- AlicenseAqualityBmaintenanceEnables AI agents to autonomously discover, stream, and compute satellite analytics from free government Earth observation archives. Provides tools for STAC search, spectral indices, elevation profiles, SAR water detection, and sandboxed geospatial scripting.29Apache 2.0
- AlicenseAqualityBmaintenanceEnables AI agents to query any Earth location as a token-budgeted topological map with indoor floors, weather, traffic, transit schedules, and live delays.9265 npmApache 2.0