distance

Pack: geodistance · Endpoint: https://gateway.pipeworx.io/geodistance/mcp

Great-circle (haversine) distance between two lat/lon points. Returns the distance in km, miles, nautical miles, meters & feet, plus the initial compass bearing from point 1 to point 2.

Parameters

NameTypeRequiredDescription
lat1numberyesLatitude of point 1 (decimal degrees).
lon1numberyesLongitude of point 1.
lat2numberyesLatitude of point 2.
lon2numberyesLongitude of point 2.

Example call

Arguments

{
  "lat1": 40.7128,
  "lon1": -74.006,
  "lat2": 51.5074,
  "lon2": -0.1278
}

curl

curl -X POST https://gateway.pipeworx.io/geodistance/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"distance","arguments":{"lat1":40.7128,"lon1":-74.006,"lat2":51.5074,"lon2":-0.1278}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('distance', {
  "lat1": 40.7128,
  "lon1": -74.006,
  "lat2": 51.5074,
  "lon2": -0.1278
});

More examples

{
  "lat1": 34.0522,
  "lon1": -118.2437,
  "lat2": 37.7749,
  "lon2": -122.4194
}

Connect

Add this to your MCP client config, or use one-click install buttons:

{
  "mcpServers": {
    "geodistance": {
      "url": "https://gateway.pipeworx.io/geodistance/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build August 15, 2026