directions_matrix
Pack: mapbox · Connect: https://pipeworx.io/mcp (see Connect below for a single-pack URL)
No MCP client? Call it directly: GET https://gateway.pipeworx.io/v1/tools/directions_matrix for the schema, then POST the same URL with its arguments for the data.
“Distance matrix” / “drive times between multiple points” / “travel times grid” / “all-to-all distances” — N×M distance and duration matrix between many coordinates. Use for traveling-salesman, delivery routing, nearest-warehouse, or “which of these N stores is closest to each of these M customers” questions.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
coordinates | array | yes | |
items | array | no | |
items | number | no | |
profile | string | no | |
sources | string | no | |
destinations | string | no | |
annotations | string | no |
Example call
Arguments
{
"coordinates": [
[
-122.4194,
37.7749
],
[
-118.2437,
34.0522
],
[
-87.6298,
41.8781
]
]
}
curl
curl -X POST https://gateway.pipeworx.io/mapbox/mcp \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"directions_matrix","arguments":{"coordinates":[[-122.4194,37.7749],[-118.2437,34.0522],[-87.6298,41.8781]]}}}'
TypeScript (@pipeworx/sdk)
import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();
const result = await pipeworx.call('directions_matrix', {
"coordinates": [
[
-122.4194,
37.7749
],
[
-118.2437,
34.0522
],
[
-87.6298,
41.8781
]
]
});
More examples
{
"coordinates": [
[
-74.006,
40.7128
],
[
-73.9352,
40.7306
],
[
-74.006,
40.758
]
],
"profile": "driving",
"sources": "0",
"destinations": "1;2"
}
Response shape
Full JSON Schema
{
"type": "object",
"description": "Mapbox Directions Matrix API response with distance/time data"
}
Connect
Add this to your MCP client config — every tool in the catalog, including this one — or use one-click install buttons:
{
"mcpServers": {
"pipeworx": {
"url": "https://pipeworx.io/mcp"
}
}
}
Connect to just the mapbox pack
{
"mcpServers": {
"mapbox": {
"url": "https://gateway.pipeworx.io/mapbox/mcp"
}
}
}
See Getting Started for client-specific install steps.