route
Pack: osrm · Endpoint: https://gateway.pipeworx.io/osrm/mcp
Compute the fastest route between two or more waypoints.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
coordinates | string | yes | Semicolon-separated lon,lat pairs (e.g. “-122.42,37.77;-122.39,37.78”) |
profile | string | no | car (default) | bike | foot |
overview | string | no | simplified (default) | full | false |
alternatives | boolean | no | Return alternative routes (default false) |
steps | boolean | no | Include turn-by-turn steps (default false) |
annotations | string | no | duration | nodes | distance | weight | datasources | speed | true | false |
Example call
Arguments
{
"coordinates": "-122.42,37.77;-122.39,37.78"
}
curl
curl -X POST https://gateway.pipeworx.io/osrm/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"route","arguments":{"coordinates":"-122.42,37.77;-122.39,37.78"}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('route', {
"coordinates": "-122.42,37.77;-122.39,37.78"
});
More examples
{
"coordinates": "-122.42,37.77;-122.39,37.78;-122.41,37.80",
"profile": "bike",
"steps": true,
"alternatives": true
}
Response shape
| Field | Type | Description |
|---|---|---|
code | string | Status code (Ok or error) |
routes | array | Array of routes |
waypoints | array | Array of waypoint objects |
Full JSON Schema
{
"type": "object",
"description": "Route response from OSRM",
"properties": {
"code": {
"type": "string",
"description": "Status code (Ok or error)"
},
"routes": {
"type": "array",
"description": "Array of routes",
"items": {
"type": "object",
"properties": {
"geometry": {
"type": "object",
"description": "GeoJSON LineString geometry"
},
"legs": {
"type": "array",
"description": "Array of route legs",
"items": {
"type": "object",
"properties": {
"steps": {
"type": "array",
"description": "Turn-by-turn instructions"
},
"distance": {
"type": "number",
"description": "Distance in meters"
},
"duration": {
"type": "number",
"description": "Duration in seconds"
},
"annotations": {
"type": "object",
"description": "Per-leg annotations if requested"
}
}
}
},
"distance": {
"type": "number",
"description": "Total distance in meters"
},
"duration": {
"type": "number",
"description": "Total duration in seconds"
},
"weight_name": {
"type": "string",
"description": "Name of the weight function used"
},
"weight": {
"type": "number",
"description": "Total route weight"
}
}
}
},
"waypoints": {
"type": "array",
"description": "Array of waypoint objects",
"items": {
"type": "object",
"properties": {
"hint": {
"type": "string",
"description": "Hint for snapping"
},
"distance": {
"type": "number",
"description": "Distance to nearest road"
},
"name": {
"type": "string",
"description": "Name of the nearest street"
},
"location": {
"type": "array",
"description": "Snapped [lon, lat] coordinates"
}
}
}
}
}
}
Connect
Add this to your MCP client config, or use one-click install buttons:
{
"mcpServers": {
"osrm": {
"url": "https://gateway.pipeworx.io/osrm/mcp"
}
}
}
See Getting Started for client-specific install steps.