> ## Documentation Index
> Fetch the complete documentation index at: https://docs.justrouting.tech/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> Give AI assistants access to JustRouting's routing, geocoding, distance matrix, and vehicle routing capabilities.

## JustRouting MCP

JustRouting MCP lets AI assistants such as Claude and Cursor use [JustRouting](https://justrouting.tech/) for road routing, geocoding, distance and travel-time comparison, and multi-vehicle route optimization.

Designed for Southeast Asia.

## What you can do

| Tool | What it does |
| - | - |
| [`geocode`](/mcp/geocode) | Place or address → coordinates |
| [`route`](/mcp/route) | Calculate one route |
| [`table`](/mcp/table) | Compare travel times or distances between multiple locations |
| [`optimize`](/mcp/optimize) | Assign jobs to vehicles and order their stops |

The tools are designed around three simple tasks:

* **route** — calculate
* **table** — compare
* **optimize** — decide

## Installation

### One-line installer

On macOS or Linux:

```bash theme={null}
curl -fsSL https://raw.githubusercontent.com/justrouting/mcp/main/install.sh | sh
```

The installer downloads the latest prebuilt binary for your OS and architecture, verifies its checksum, and installs `justrouting-mcp`.

To install a specific version:

```bash theme={null}
curl -fsSL https://raw.githubusercontent.com/justrouting/mcp/main/install.sh | JUSTROUTING_MCP_VERSION=v0.1.1 sh
```

No Go installation is required.

### From source

If you have Go installed:

```bash theme={null}
go install github.com/justrouting/mcp/cmd/justrouting-mcp@latest
```

Requires Go 1.25+.

Make sure `justrouting-mcp` is available in your `PATH`.

Prebuilt binaries for supported platforms are also available from [GitHub Releases](https://github.com/justrouting/mcp/releases).

## Configuration

The server reads the JustRouting API key from the `JUSTROUTING_API_KEY` environment variable:

```bash theme={null}
export JUSTROUTING_API_KEY="YOUR-API-KEY"
```

You can get an API key from [JustRouting](https://justrouting.tech/).

## Which tool should I use?

Use the simplest tool that matches the user's task:

| User needs | Tool |
| - | - |
| Get coordinates for a place or address | `geocode` |
| Calculate one route | `route` |
| Compare multiple routes | `table` |
| Find the nearest driver, store, or facility | `table` |
| Assign jobs to vehicles | `optimize` |
| Determine the order of multiple stops | `optimize` |

A simple rule:

* **One route → `route`**
* **Many routes to compare → `table`**
* **Many jobs to assign and order → `optimize`**
* **Place name or address → `geocode` first**

## Tools

<CardGroup cols={4}>
  <Card title="Geocode" icon="search" href="/mcp/geocode">
    Convert a place name or address into coordinates.
  </Card>

  <Card title="Route" icon="route" href="/mcp/route">
    Calculate one route between two locations.
  </Card>

  <Card title="Table" icon="table" href="/mcp/table">
    Compare travel times or distances between multiple locations.
  </Card>

  <Card title="Optimize" icon="truck" href="/mcp/optimize">
    Assign jobs to vehicles and order their stops.
  </Card>
</CardGroup>

***

## Agent workflows

JustRouting MCP is designed so that AI assistants can combine the tools into larger workflows.

### Route between two places

For:

> How long does it take to drive from Marina Bay Sands to Changi Airport?

Use:

```text theme={null}
geocode → geocode → route
```

1. Geocode the origin.
2. Geocode the destination.
3. Verify the selected results match the intended places.
4. Pass their `coordinates` values to `route`.

If the user already provides coordinates, skip geocoding.

### Find the nearest driver

For:

> Which driver is closest to this customer?

Use:

```text theme={null}
geocode × N → table
```

1. Geocode the customer.
2. Geocode each driver.
3. Keep the locations in a fixed order.
4. Put the customer in `sources`.
5. Put the drivers in `destinations`.
6. Compare the corresponding distance or duration values.
7. Ignore unreachable `null` values.

### Plan multiple vehicles

For:

> I have two vans and six customers. Assign the customers to the vans and determine the stop order.

Use:

```text theme={null}
geocode × N → optimize
```

1. Geocode each vehicle's start/end location.
2. Geocode every job location.
3. Create one vehicle entry per vehicle.
4. Create one job entry per customer.
5. Call `optimize`.
6. Read `routes[].steps` to determine each vehicle's itinerary.
7. Check `unassigned` for jobs that could not be served.

***

## Coordinate format

All routing tools use:

```text theme={null}
longitude,latitude
```

For example:

```text theme={null}
103.8198,1.3521
```

This means:

```text theme={null}
longitude = 103.8198
latitude  = 1.3521
```

Do not reverse the order.

***

## Claude

### Claude Code

Add JustRouting MCP with:

```bash theme={null}
claude mcp add justrouting \
  --env JUSTROUTING_API_KEY=YOUR-API-KEY \
  -- justrouting-mcp
```

### Claude Desktop

Add the server to `claude_desktop_config.json`:

```json theme={null}
{
  "mcpServers": {
    "justrouting": {
      "command": "justrouting-mcp",
      "env": {
        "JUSTROUTING_API_KEY": "your-api-key"
      }
    }
  }
}
```

Restart Claude Desktop after changing the configuration.

***

## Cursor

Add JustRouting MCP from **Settings → MCP → Add new MCP server**.

Use:

```json theme={null}
{
  "mcpServers": {
    "justrouting": {
      "command": "justrouting-mcp",
      "env": {
        "JUSTROUTING_API_KEY": "your-api-key"
      }
    }
  }
}
```

Once connected, Cursor can use the JustRouting tools directly.

***

## Related

* [Quickstart](https://docs.justrouting.tech/quickstart)
* [Authentication](https://docs.justrouting.tech/guides/authentication)
* [Geocode API](https://docs.justrouting.tech/api/geocode)
* [Directions API](https://docs.justrouting.tech/api/directions)
* [Distance Matrix API](https://docs.justrouting.tech/api/matrix)
* [Fleet Optimization API](https://docs.justrouting.tech/api/optimization)
* [SDKs](https://docs.justrouting.tech/sdks)
* [JustRouting MCP on GitHub](https://github.com/justrouting/mcp)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.