Terrainprofile

io.github.CloudCorpRecordsPublished by GitHub account CloudCorpRecordsv0.1.0Updated Nov 7, 2026

Elevation, slope, terrain maps and 3D surfaces for any site, from global and regional DEM data.

Overview

AI-generated overview

Local bridge that forwards elevation, slope, terrain map and 3D surface queries to a hosted Geospatial System server for any latitude/longitude.

What you can do
  • List available elevation datasets and get a dataset id
  • Get elevation in metres at one coordinate, or for up to 100 points in one batch
  • Get elevation and slope statistics (min, average, max) over 3x3, 5x5 and 7x7 pixel windows
  • Generate range-box charts of elevation or slope as PNG, SVG or PDF image URLs
  • Generate a composite terrain map with satellite imagery, contours, flow arrows and a pin
  • Generate a 3D perspective terrain surface as PNG or HTML
When to use it
Useful when you need site-level terrain facts: elevation at a point or set of points, local slope, or a visual terrain map and 3D surface for a location, without leaving the assistant.
Requirements
Runs locally via npx (Node.js) or the Docker image, and needs network access to the hosted upstream endpoint. Optional GEOSPATIAL_MCP_URL overrides the endpoint; optional GEOSPATIAL_API_KEY is sent as a Bearer Authorization header. Several tools require a Pro or Enterprise key.
Before you install
The bridge forwards coordinates to a third-party hosted service, so query locations leave your machine. Statistics, chart, map and 3D tools need a paid Pro or Enterprise key; without one those calls fail. The API key is passed as an Authorization header to the upstream. The README notes the endpoint override and key forwarding are reconstructions, not verified against the original server.

Installation

In SourceWeft

  1. Open Terrainprofile in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

terrainprofile

terrainprofile is a small local bridge to the hosted Geospatial System location-profile MCP server, which reads elevation data from global and regional DEM (digital elevation model) datasets. Give it a latitude and longitude plus a dataset id, and it answers with the elevation at that point, elevation and slope statistics over small neighbourhood windows, range-box charts, a composite terrain map, or a 3-D perspective surface of the site.

The bridge keeps no terrain data of its own. It serves the upstream server's tool list locally, exactly as captured from the live endpoint, and forwards each tool call upstream, returning the result untouched. The captured surface is read-only terrain data: there is no write, purchase, or account tool in it.

Tools

  • list_datasets — list all available elevation datasets on the server. Takes no arguments; call it first to get a dataset_id.
  • LP_Get_Elevation — elevation in metres at one coordinate. Required: lat, lon, dataset_id. Available on all tiers including Free.
  • LP_Get_Elevation_Batch — elevation for up to 100 points in one call. Required: queries, a list of objects with lat, lon, and dataset_id. Available on all tiers including Free.
  • LP_Get_Elevation_Stats — elevation statistics (min, average, max) for 3×3, 5×5 and 7×7 pixel windows centred on the coordinates. Required: lat, lon, dataset_id. Requires Pro or Enterprise key.
  • LP_Get_Slope_Stats — terrain slope statistics (min, average, max) in degrees for the same window sizes, WGS-84 corrected. Required: lat, lon, dataset_id. Requires Pro key.
  • LP_Get_Elevation_Chart — a range-box chart of elevation min/avg/max across the three window sizes, returned as a URL to the chart image. Required: lat, lon, dataset_id. Optional: fmt ("png" by default, also "svg" or "pdf"). Requires Pro key.
  • LP_Get_Slope_Chart — the same range-box chart for terrain slope. Required: lat, lon, dataset_id. Optional: fmt (default "png"). Requires Pro key.
  • LP_Get_Terrain_Map — a composite terrain map: satellite imagery plus smoothed contours with labels, flow-direction arrows, and a location pin, all in EPSG:3857. Required: lat, lon, dataset_id. Optional: offset (half-window pixels, default 20), n_arrows (flow arrow grid density, default 11), and fmt (default "png"). Requires Pro key.
  • LP_Get_Terrain_3D — a 3-D perspective terrain surface coloured by elevation, with a red spike pin marking the query location. Required: lat, lon, dataset_id. Optional: offset (default 20), elev_angle (camera elevation, default 45), azim_angle (camera azimuth, default 135), and fmt ("png" by default, or "html"). Requires Pro key.

Coordinates are decimal degrees in WGS-84.

Configuration

  • GEOSPATIAL_MCP_URL (optional) — override the upstream endpoint. Defaults to https://api.geospatialsystem.com/mcp. (The override hook is this rebuild's own labelled reconstruction.)
  • GEOSPATIAL_API_KEY (optional) — when set, every upstream request carries an Authorization: Bearer <key> header, for the caller's own Geospatial System key. The registry record for the original server declares a required secret Authorization header; the Bearer scheme and the forwarding from this env var are labelled reconstructions, because the original surface was captured keyless. When it is not set, no key header is sent.

Forwarding mechanics

On the first tool call the client opens a streamable HTTP session with the upstream: a JSON-RPC initialize request (protocolVersion 2025-03-26, clientInfo name terrainprofile), then a notifications/initialized notification, then the tools/call request carrying the caller's arguments unchanged. When the upstream answers initialize with an Mcp-Session-Id header, that value rides on every later request of the session, which is reused for the life of the process. Replies may arrive as plain JSON or as server-sent events; both are read.

Successful upstream results pass through verbatim, including any isError flag the upstream sets. Failures — a JSON-RPC error, a non-2xx status, an unreadable response, or a request that cannot be completed — come back as an isError result whose text starts with terrainprofile error: (this rendering is this rebuild's own labelled reconstruction).

CLI

Each tool is also a subcommand taking one JSON argument string:

bash
npx @reneturcios/terrainprofile list_datasetsnpx @reneturcios/terrainprofile LP_Get_Elevation '{"lat":37.7749,"lon":-122.4194,"dataset_id":"<id from list_datasets>"}'npx @reneturcios/terrainprofile LP_Get_Elevation_Batch '{"queries":[{"lat":37.7749,"lon":-122.4194,"dataset_id":"<id>"}]}'npx @reneturcios/terrainprofile LP_Get_Terrain_3D '{"lat":37.7749,"lon":-122.4194,"dataset_id":"<id>","fmt":"html"}'npx @reneturcios/terrainprofile --version

Exit codes: 0 on success, 1 on an isError result, 2 on a usage error.

MCP server

bash
npx -y @reneturcios/terrainprofile mcp

MCP client config:

json
{  "mcpServers": {    "terrainprofile": {      "command": "npx",      "args": ["-y", "@reneturcios/terrainprofile", "mcp"]    }  }}

Docker

bash
docker run -i ghcr.io/cloudcorprecords/terrainprofiledocker run --rm ghcr.io/cloudcorprecords/terrainprofile --version

The container's default command is mcp, so the first form is a stdio MCP server; any other arguments reach the CLI normally.

Development

bash
npm installnpm run buildnpm testnpm run dev

The test suite runs entirely against a stubbed JSON-RPC upstream — no live network calls.

License

MIT — see LICENSE.

Source: README.md at commit 0d49af4

Tools

9

list_datasets

List all available elevation datasets on the Geospatial System server.

Takes no parameters.

LP_Get_Elevation

Get the elevation in metres at a specific lat/lon coordinate. Available on all tiers including Free.

Parameterslatrequiredlonrequireddataset_idrequired

LP_Get_Elevation_Batch

Get elevation for up to 100 points in one call. Pass a list of objects: [{"lat":…,"lon":…,"dataset_id":…}, …] Available on all tiers including Free.

Parametersqueriesrequired

LP_Get_Elevation_Stats

Get elevation statistics (Min, Average, Max) for 3×3, 5×5 and 7×7 pixel windows centred on the coordinates. Requires Pro or Enterprise key.

Parameterslatrequiredlonrequireddataset_idrequired

LP_Get_Slope_Stats

Get terrain slope statistics (Min, Average, Max) in degrees for 3×3, 5×5 and 7×7 pixel windows. WGS-84 corrected. Requires Pro key.

Parameterslatrequiredlonrequireddataset_idrequired

LP_Get_Elevation_Chart

Generate a range-box chart showing elevation Min/Avg/Max across three neighbourhood window sizes. Returns a URL to the chart image. Requires Pro key. Supports PNG / SVG / PDF.

Parametersfmtlatrequiredlonrequireddataset_idrequired

LP_Get_Slope_Chart

Generate a range-box chart showing terrain slope Min/Avg/Max across three neighbourhood window sizes. Returns a URL to the chart image. Requires Pro key. Supports PNG / SVG / PDF.

Parametersfmtlatrequiredlonrequireddataset_idrequired

LP_Get_Terrain_Map

Generate a composite terrain map: Google Hybrid satellite (EPSG:3857) + smoothed contours with labels + flow-direction arrows + location pin. All layers are reprojected to EPSG:3857 — no overlay mismatch. Requires Pro key. Supports PNG.

Parametersfmtlatrequiredlonrequiredoffsetn_arrowsdataset_idrequired

LP_Get_Terrain_3D

Generate a 3-D perspective terrain surface map (Plotly go.Surface) coloured by elevation with a red spike pin marking the query location. Requires Pro key. Supports PNG / HTML.

Parametersfmtlatrequiredlonrequiredoffsetazim_angledataset_idrequiredelev_angle

Version history

1
  1. v0.1.0LatestNov 4, 2026

Score

90% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts
  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listedRequired15 pts
  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts