OSRM Routing

liveTransportGeography

Open Source Routing Machine — routing, distance matrix, snap-to-road, map-matching, TSP. Keyless via demo server.

5tools
0msauth
free tier50 calls/day

Tools

routerequired: coordinates

Fastest route between waypoints.

Parameters
NameTypeDescription
coordinatesreqstringSemicolon-separated lon,lat pairs
profileoptstringcar | bike | foot
overviewoptstringsimplified | full | false
alternativesoptboolean
stepsoptboolean
annotationsoptstring
Try it
tablerequired: coordinates

Distance/duration matrix.

Parameters
NameTypeDescription
coordinatesreqstring
profileoptstring
sourcesoptstring
destinationsoptstring
annotationsoptstring
Try it
nearestrequired: longitude, latitude

Snap to road network.

Parameters
NameTypeDescription
longitudereqnumber
latitudereqnumber
profileoptstring
numberoptnumber
Try it
matchrequired: coordinates

Map-match a noisy GPS trace.

Parameters
NameTypeDescription
coordinatesreqstring
profileoptstring
radiusesoptstring
Try it
triprequired: coordinates

TSP-like trip solver.

Parameters
NameTypeDescription
coordinatesreqstring
profileoptstring
roundtripoptboolean
sourceoptstring
destinationoptstring
Try it

Test with curl

The gateway speaks JSON-RPC 2.0 over HTTP POST. You can test any pack directly from the terminal.

List available tools
bash
curl -X POST https://gateway.pipeworx.io/osrm/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
Call a tool
bash
curl -X POST https://gateway.pipeworx.io/osrm/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"route","arguments":{"coordinates": "example"}}}'

Use with the SDK

Install @pipeworx/sdk to call tools from any TypeScript/Node project.

TypeScript
import { Pipeworx } from '@pipeworx/sdk';
const px = new Pipeworx();
const result = await px.call("route", {"coordinates":"example"});
ask_pipeworx
// Or ask in plain English:
const answer = await px.ask("open source routing machine — routing, distance matrix, snap-to-road, map-matching, tsp");