AI Agents (MCP)
The @terranode-co/mcp-server package gives AI agents tools to run spatial queries — point-in-polygon lookups, nearest feature search, distance calculations, and spatial joins. No code required.
Prerequisites
Section titled “Prerequisites”- Node.js 18+
- A Terranode API key — sign up at app.terranode.co
Setup — Claude Desktop
Section titled “Setup — Claude Desktop”Add to your claude_desktop_config.json:
{ "mcpServers": { "terranode": { "command": "npx", "args": ["@terranode-co/mcp-server"], "env": { "TERRANODE_API_KEY": "your-api-key-here" } } }}For setup with Cursor, Claude Code, and other MCP clients, see the full README on npm.
Available tools
Section titled “Available tools”| Tool | Description |
|---|---|
list_datasets | List all available geospatial datasets (system + custom) |
check_location | Point-in-polygon: which feature contains a coordinate? |
find_nearest | Find the N nearest features to a coordinate, with distances |
calculate_distance | Geodesic distance between two points (meters + miles) |
spatial_join | Enrich multiple coordinates with polygon attributes at once |
Example prompts
Section titled “Example prompts”Try these in your AI assistant:
- “What county is latitude 40.71, longitude -74.00 in?”
- “What datasets are available?”
- “Find the 3 nearest counties to Central Park”
- “Which states do these 5 warehouse locations fall in?” (paste coordinates)
- “What ZIP code is 37.7749, -122.4194 in?”