# Logistics Route Clustering Calculator AI Agent Connect

> Logistics Route Clustering Calculator MCP lets your AI client handle the heavy lifting of route planning. It groups delivery stops into logical clusters by looking at geographic proximity, vehicle capacity, and specific time windows. You can verify if a route is actually possible or find out which stops didn't make the cut.

## Overview
- **Category:** supply-chain
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_ONMAYCBaxF7tMxZpADYLP20GFILalJSVFv3CnKpf/ai-agent-connect
- **Tags:** routing, clustering, logistics, delivery, optimization

## Description

Stop manually grouping delivery locations. This MCP gives your agent the analytical tools needed to organize complex delivery schedules. You can feed a list of coordinates and demand requirements into the MCP, and it will partition those stops into efficient vehicle routes. It doesn't just look at distance; it respects the physical limits of your fleet and the strict time windows your customers expect. 

If you have an existing route plan, you can check it for errors to ensure no vehicle is overloaded or running behind schedule. It also helps you spot gaps in your planning by identifying stops that couldn't be assigned to any route. Instead of guessing if a driver can hit ten stops in a single afternoon, you can get a mathematical confirmation of whether that plan works.

## Tools

### evaluate_route_feasibility
Use this to check if an existing cluster of stops is valid under your current capacity and time limits.

### get_stop_metrics
This tool pulls detailed data regarding the specific requirements of a single delivery stop.

### summarize_unassigned_stops
This tool identifies and categorizes any stops that were not included in the generated clusters.

### calculate_clusters
This tool performs the primary grouping of stops into optimized routes based on your specific constraints.

## Prompt Examples

**Prompt:** 
```
Cluster these stops: [{'id': 'S1', 'latitude': 40.71, 'longitude': -74.00, 'demand': 10, 'serviceTimeStart': 0, 'serviceTimeEnd': 100, 'serviceDuration': 10}, {'id': 'S2', 'latitude': 40.72, 'longitude': -74.01, 'demand': 15, 'serviceTimeStart': 0, 'serviceTimeEnd': 100, 'serviceDuration': 10}] with a capacity of 20 and 2 clusters.
```

**Response:** 
```
Route 1: assignedStopIds: ['S1'], totalLoad: 10, totalDistance: 1.5, timeWindowViolations: 0. Route 2: assignedStopIds: ['S2'], totalLoad: 15, totalDistance: 1.2, timeWindowViolations: 0.
```

**Prompt:** 
```
Is the cluster containing stop S1 and S2 feasible with a capacity of 20?
```

**Response:** 
```
No, the cluster is not feasible because the total load of 25 exceeds the vehicle capacity of 20.
```

**Prompt:** 
```
What are the requirements for stop S1?
```

**Response:** 
```
Stop S1 has a demand of 10, is located at latitude 40.71 and longitude -74.00, and requires a service duration of 10 minutes within the time window of 0 to 100.
```

## Capabilities

### Route Grouping
The agent uses this to partition a large list of stops into manageable vehicle assignments.

### Constraint Validation
Your agent checks if a proposed route violates vehicle capacity or time window limits.

### Stop Analysis
The agent retrieves specific demand and timing data for individual delivery locations.

### Gap Identification
The agent finds stops that were left out of the routing process to ensure full coverage.

## Use Cases

### Daily Route Planning
An agent takes a list of today's deliveries and groups them into routes for a fleet of vans.

### Capacity Auditing
A user checks if a planned route will exceed the weight or volume limit of a specific truck.

### Service Window Compliance
The agent confirms that a driver can reach all stops within their required time slots.

### Delivery Gap Analysis
A manager identifies which orders couldn't be fit into the current vehicle schedule.

## Benefits

- Calculates route assignments based on geographic proximity and vehicle limits.
- Verifies if specific clusters respect time windows and capacity constraints.
- Identifies unassigned stops to prevent missed deliveries.
- Provides granular data on individual stop requirements.

## How It Works

Connect your client to Vinkius and start sending logistics data to the MCP.

1. Connect your MCP-compatible client like Claude or Cursor to Vinkius.
2. Provide your stop data, vehicle capacities, and time windows to your agent.
3. The agent calls the MCP tools to process the clustering and feasibility math.
4. The agent returns organized routes or error reports directly in your chat interface.

## Frequently Asked Questions

**What can this MCP do for my delivery business?**
It automates the grouping of delivery stops into vehicle routes while respecting your specific capacity and time constraints.

**Can I use this with Claude or Cursor?**
Yes, you can use this MCP with any MCP-compatible client including Claude, Cursor, and Windsurf.

**How does it handle vehicle capacity?**
The calculate_clusters tool uses the capacity you provide to ensure no route is assigned more demand than a vehicle can carry.

**What happens if a stop can't be assigned to a route?**
The summarize_unassigned_stops tool will identify those specific stops so you can address them separately.

**Does it check for time window violations?**
Yes, the evaluate_route_feasibility tool checks if a cluster of stops respects the required time windows.

**How does the clustering logic work?**
The engine uses a deterministic rule to assign stops to clusters, ensuring that the resulting routes do not exceed the maximum capacity of the vehicles and respect time windows.

**Can I use my own travel time matrix?**
Yes, the `calculate_clusters` tool accepts an optional travel matrix to provide more accurate distance and time calculations between stops.

**What happens if a stop cannot be assigned to a route?**
Stops that cannot be placed into any cluster without violating hard constraints are flagged as unassigned. You can use `summarize_unassigned_stops` to identify these specific stops.
