routing

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

Routing / directions: compute the distance and travel time between two points for a given travel mode (drive, walk, bicycle, transit). Returns distance in meters and time in seconds. Example: routing({ from_lat: 48.8584, from_lon: 2.2945, to_lat: 48.8606, to_lon: 2.3376, mode: “drive” })

Parameters

NameTypeRequiredDescription
from_latnumberyesLatitude of the origin point
from_lonnumberyesLongitude of the origin point
to_latnumberyesLatitude of the destination point
to_lonnumberyesLongitude of the destination point
modestringnoTravel mode: ‘drive’, ‘walk’, ‘bicycle’, or ‘transit’ (default ‘drive’)
_apiKeystringnoOptional — your own Geoapify API key for higher limits; omit to use the shared Pipeworx key.

Example call

Arguments

{
  "from_lat": 48.8584,
  "from_lon": 2.2945,
  "to_lat": 48.8606,
  "to_lon": 2.3376,
  "mode": "drive"
}

curl

curl -X POST https://gateway.pipeworx.io/geoapify/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"routing","arguments":{"from_lat":48.8584,"from_lon":2.2945,"to_lat":48.8606,"to_lon":2.3376,"mode":"drive"}}}'

TypeScript (@pipeworx/sdk)

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

const result = await pipeworx.call('routing', {
  "from_lat": 48.8584,
  "from_lon": 2.2945,
  "to_lat": 48.8606,
  "to_lon": 2.3376,
  "mode": "drive"
});

More examples

{
  "from_lat": 40.7128,
  "from_lon": -74.006,
  "to_lat": 40.758,
  "to_lon": -73.9855,
  "mode": "walk"
}

Connect

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

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

See Getting Started for client-specific install steps.

Regenerated from source · build September 2, 2026