directions

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

“Directions from A to B” / “how long does it take to drive from X to Y” / “how far is [A] from [B]” / “walking / cycling / driving directions” / “navigation between points” / “shortest route” — turn-by-turn routing between two or more coordinates. Returns geometry, distance (meters), duration (seconds), voice + banner instructions, and alternatives. Profile: driving, driving-traffic, walking, or cycling. Backed by Mapbox’s commercial-grade traffic data and global road network.

Parameters

NameTypeRequiredDescription
coordinatesarrayyes
itemsarrayno
itemsnumberno
profilestringno
alternativesbooleanno
geometriesstringno
overviewstringno
stepsbooleanno
annotationsstringno
voice_instructionsbooleanno
banner_instructionsbooleanno
languagestringno

Example call

Arguments

{
  "coordinates": [
    [
      -122.4194,
      37.7749
    ],
    [
      -118.2437,
      34.0522
    ]
  ]
}

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","arguments":{"coordinates":[[-122.4194,37.7749],[-118.2437,34.0522]]}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('directions', {
  "coordinates": [
    [
      -122.4194,
      37.7749
    ],
    [
      -118.2437,
      34.0522
    ]
  ]
});

More examples

{
  "coordinates": [
    [
      -74.006,
      40.7128
    ],
    [
      -73.9352,
      40.7306
    ]
  ],
  "profile": "walking",
  "steps": true,
  "language": "en"
}

Response shape

Full JSON Schema
{
  "type": "object",
  "description": "Mapbox Directions API response with routing information"
}

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 6, 2026