trip
Pack: osrm · Endpoint: https://gateway.pipeworx.io/osrm/mcp
Solve a TSP-like trip between multiple waypoints.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
coordinates | string | yes | |
profile | string | no | |
roundtrip | boolean | no | Return to start (default true) |
source | string | no | first | any (default any) |
destination | string | no | last | any |
Example call
Arguments
{
"coordinates": "-122.42,37.77;-122.39,37.78;-122.41,37.80"
}
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":"trip","arguments":{"coordinates":"-122.42,37.77;-122.39,37.78;-122.41,37.80"}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('trip', {
"coordinates": "-122.42,37.77;-122.39,37.78;-122.41,37.80"
});
More examples
{
"coordinates": "-122.42,37.77;-122.39,37.78;-122.41,37.80",
"profile": "car",
"roundtrip": false,
"source": "first",
"destination": "last"
}
Response shape
| Field | Type | Description |
|---|---|---|
code | string | Status code (Ok or error) |
trips | array | Array of optimized trip routes |
waypoints | array | Reordered waypoints array |
Full JSON Schema
{
"type": "object",
"description": "TSP trip optimization response from OSRM",
"properties": {
"code": {
"type": "string",
"description": "Status code (Ok or error)"
},
"trips": {
"type": "array",
"description": "Array of optimized trip routes",
"items": {
"type": "object",
"properties": {
"geometry": {
"type": "object",
"description": "GeoJSON LineString geometry"
},
"legs": {
"type": "array",
"description": "Array of route legs"
},
"distance": {
"type": "number",
"description": "Total distance in meters"
},
"duration": {
"type": "number",
"description": "Total duration in seconds"
},
"weight_name": {
"type": "string"
},
"weight": {
"type": "number"
}
}
}
},
"waypoints": {
"type": "array",
"description": "Reordered waypoints array",
"items": {
"type": "object",
"properties": {
"hint": {
"type": "string"
},
"distance": {
"type": "number"
},
"name": {
"type": "string"
},
"location": {
"type": "array"
}
}
}
}
}
}
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.