# Terranode Geospatial API [Health: Active]

**Category:** 🗺️ Location Services  
**Repository:** https://github.com/terranode-co/mcp-server-terranode  
**GitHub Stars:** 0  
**npm Downloads (last month):** 253  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/terranode-geospatial-api

## Description
Point-in-polygon, nearest feature, spatial join, and distance tools for US geospatial datasets

## Tools
Capabilities this server exposes over MCP:

- **list_datasets** — List all geospatial datasets available for querying. Returns pre-loaded public datasets (US states, counties, ZIP codes, etc.) and your custom uploaded datasets. Each dataset has an id (UUID) — always use the id when calling other tools.
- **check_location** — Check which feature in a polygon dataset contains a given coordinate (point-in-polygon query). Returns the properties of all matching features, or indicates no match. Requires latitude, longitude, and a dataset id (UUID) from list_datasets. Call list_datasets first to get the id. This is NOT a geocoder — it requires numeric coordinates, not addresses or place names.
- **find_nearest** — Find the nearest counties, districts, ZIP codes, or other features to a coordinate. Use this for proximity queries, finding what's nearby, or ranking features by distance. Returns features sorted by distance (meters and miles), measured to feature boundary. Also works as a reverse lookup — returns the containing feature (distance=0) plus neighbors. Requires latitude, longitude, and a dataset id (UUID) from list_datasets.
- **calculate_distance** — Calculate the exact geodesic distance between two points on Earth's surface. Uses the WGS84 ellipsoid model for high accuracy. No dataset needed. Returns distance in both meters and miles.
- **spatial_join** — Enrich a set of coordinates with attributes from a polygon dataset. For each point, returns the properties of the polygon it falls within. Like running check_location on multiple points at once, but more efficient. Requires an array of coordinate objects and a dataset id (UUID) from list_datasets. Call list_datasets first to get the id. Points need numeric coordinates, not addresses.
- **enrich_location** — Get location attributes (county, flood zone, school district, etc.) for a coordinate. Queries all available datasets in one call and returns what matched. No dataset id needed — this is the simplest way to find out what's at a location. Optional radius expands the search area (meters). This is NOT a geocoder — it requires numeric coordinates, not addresses or place names.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "terranode-geospatial-api": {
    "command": "npx",
    "args": ["@terranode-co/mcp-server"],
    "env": {
      "TERRANODE_API_KEY": ""
    }
  }
}
```

**Requires environment variables:** `TERRANODE_API_KEY` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What Terranode Geospatial API MCP server does

The Terranode Geospatial API MCP server gives MCP-compatible AI clients access to Terranode’s Geospatial API and its geospatial datasets. It is designed for coordinate-based queries rather than general-purpose mapping or visualization. The available data can include system datasets and custom datasets exposed through the Terranode account.

Typical questions include which county, state, or ZIP code contains a coordinate; which features are closest to a location; how far apart two points are; and which polygon attributes apply to several locations. The Terranode Geospatial API MCP server returns results through MCP tools so an AI client can use them while answering a prompt.

## How it works

The server runs as an npm package through `npx` and uses the `TERRANODE_API_KEY` environment variable to authenticate with Terranode. An MCP client starts the server as a local process, after which the client can call the exposed tools. The repository provides configuration examples for Claude Desktop, Cursor, and Claude Code.

A practical workflow is to call `list_datasets` first when the relevant dataset is unknown. A location query can then use `check_location` to identify the containing feature, or `find_nearest` to return nearby features and their distances. `calculate_distance` measures the geodesic distance between two coordinates. For multiple locations, `spatial_join` applies polygon attributes to a batch of coordinates.

## Setup and configuration

Node.js 18 or newer and a Terranode API key are required. The key can be obtained by signing up at Terranode’s application site. Add an MCP server entry with the package name `@terranode-co/mcp-server`, use `npx` as the command, and provide the key as `TERRANODE_API_KEY` in the entry’s environment.

For Claude Desktop, configuration belongs in `claude_desktop_config.json`. Cursor uses `.cursor/mcp.json`, and Claude Code uses its MCP settings. The same package command and environment variable are shown for each client. Keep the API key in the client configuration rather than placing it in prompts.

## Tools and capabilities

The Terranode Geospatial API MCP server exposes five tools:

- `list_datasets` lists system and custom geospatial datasets available through the API.
- `check_location` performs a point-in-polygon lookup for a coordinate and reports the feature containing it.
- `find_nearest` finds the requested number of nearby features and includes distances.
- `calculate_distance` calculates geodesic distance between two points in meters and miles.
- `spatial_join` processes multiple coordinates and adds polygon attributes for each location.

These tools support single-coordinate lookups, proximity searches, pairwise measurements, and batch enrichment. The examples in the repository include county, state, ZIP code, school, and warehouse-location questions.

## Limitations and notes

The server requires network access to Terranode’s Geospatial API and a valid API key. Its available results depend on the datasets exposed to the account, including any custom datasets.

The full API specification is published as an OpenAPI 3.1 document at `docs.terranode.co/openapi.yaml`. Use that reference when an application needs details beyond the MCP tool descriptions. Issues and feature requests can be sent to Terranode at the feedback address listed in the repository.

_Full upstream README: https://allmcps.com/mcp/terranode-geospatial-api/readme_

