OSRM Routing

live MapsRouting

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

5 tools
0ms auth
free tier 50 calls/day

Tools

route required: coordinates

Fastest route between waypoints.

Parameters
Name Type Description
coordinates req string Semicolon-separated lon,lat pairs
profile opt string car | bike | foot
overview opt string simplified | full | false
alternatives opt boolean
steps opt boolean
annotations opt string
Try it
table required: coordinates

Distance/duration matrix.

Parameters
Name Type Description
coordinates req string
profile opt string
sources opt string
destinations opt string
annotations opt string
Try it
nearest required: longitude, latitude

Snap to road network.

Parameters
Name Type Description
longitude req number
latitude req number
profile opt string
number opt number
Try it
match required: coordinates

Map-match a noisy GPS trace.

Parameters
Name Type Description
coordinates req string
profile opt string
radiuses opt string
Try it
trip required: coordinates

TSP-like trip solver.

Parameters
Name Type Description
coordinates req string
profile opt string
roundtrip opt boolean
source opt string
destination opt string
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");