directions_matrix

Pack: mapbox · Endpoint: https://gateway.pipeworx.io/mapbox/mcp

“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

NameTypeRequiredDescription
coordinatesarrayyes
itemsarrayno
itemsnumberno
profilestringno
sourcesstringno
destinationsstringno
annotationsstringno

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, or use one-click install buttons:

{
  "mcpServers": {
    "mapbox": {
      "url": "https://gateway.pipeworx.io/mapbox/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build July 7, 2026