# GraphHopper MCP

> GraphHopper MCP gives your AI client full control over complex geospatial data. Calculate precise driving routes, figure out the service area reachable in specific times (isochrones), and solve massive fleet routing problems—all through natural conversation. It handles everything from translating addresses to coordinates to auditing GPS tracks against actual streets.

## Overview
- **Category:** developer-tools
- **Price:** Free
- **Tags:** routing, pathfinding, openstreetmap, fleet-optimization, geospatial-data, navigation

## Description

Stop wrestling with spreadsheets or juggling multiple API calls just to plan a delivery route. This MCP connects your AI client directly to advanced geospatial engine capabilities, letting you treat location data like any other piece of information. You can ask it to calculate the best multi-stop path for a vehicle, generate polygons showing all addresses reachable within 10 minutes, or even validate if a GPS track was slightly off by snapping it perfectly onto known road vectors. Need to know what coordinates mean? Use your agent to perform reverse geocoding and get the exact street name attached. It's about taking control of complex logistics and mapping without touching code. When you connect this MCP via Vinkius, you gain access to a powerful set of tools that lets you talk through difficult routing problems—whether it’s solving for vehicle capacity or calculating massive travel matrices between dozens of points.


## Tools

### search_geocode
Pinpoints the correct geographic area for specific routes within the GraphHopper engine.

### calculate_distance_isochrone
Creates a boundary map (polygon) showing all points accessible from one location in a given time frame.

### calculate_reachability_polygon
Generates structured rules that define the active reachability area for site planning or delivery zone mapping.

### snap_gpx_to_road
Corrects imprecise GPS data by snapping raw tracking files perfectly onto known street paths.

### calculate_routing_matrix
Generates deep arrays of travel times and distances to analyze complex logistics tables between multiple points.

### reverse_geocode
Matches GPS coordinates back to specific, named street properties for accurate location verification.

### calculate_url_route
Retrieves lightweight and explicit step-by-step directions between two points.

### calculate_heavy_route
Identifies detailed arrays that span native paths for complex, multi-stop geometry calculations.

### submit_vrp_optimizer
Runs an automated check to solve complex vehicle routing problems using predefined constraints like time limits.

### poll_vrp_solution
Retrieves the final structured results confirming the best alternative routes for delivery planning.

## Prompt Examples

**Prompt:** 
```
Calculate a car route between '40.71, -74.00' and '40.75, -73.98'
```

**Response:** 
```
Route calculated! I've found the optimal driving path. Total distance: 3.5 miles. Estimated time: 12 minutes. I can provide the step-by-step turn directions for you now.
```

**Prompt:** 
```
Show me the 10-minute reachability zone from central Berlin
```

**Response:** 
```
Isochrone generated! I've mapped the area reachable within 10 minutes from your location in Berlin. I can provide the polygon coordinates or verify if specific addresses fall within this boundary.
```

**Prompt:** 
```
Reverse geocode these coordinates: '48.85, 2.35'
```

**Response:** 
```
Coordinates matched! The location for 48.85, 2.35 corresponds to 'Rue de Rivoli, Paris, France'. It is located in the 4th arrondissement. Would you like more venue details for this spot?
```

## Capabilities

### Calculate complex routes and paths
Determines the optimal driving directions, distances, and times between any set of GPS coordinates.

### Define service areas (Isochrones)
Maps out a precise boundary or polygon showing all points you can reach from one spot within a specified time limit.

### Solve fleet logistics problems
Optimizes routes for multiple vehicles, checking constraints like total travel time and vehicle capacity to find the most efficient plan.

### Translate addresses to coordinates (Geocoding)
Converts human-readable street names or addresses into precise latitude and longitude pairs needed for mapping software.

### Verify location boundaries
Takes raw GPS pin locations and matches them back to specific named streets, ensuring accurate place identification.

## Use Cases

### Determining a new depot location
A city planner needs to find the best spot for a new warehouse. They ask the agent to generate a 'reachability polygon' around three potential sites, using `calculate_reachability_polygon`. This immediately shows them which site covers the highest density of target customers within a 20-minute drive.

### Optimizing daily deliveries
A logistics manager has 15 packages and 3 trucks with different capacities. They tell their agent to 'solve the vehicle routing problem.' The MCP uses `submit_vrp_optimizer` and returns a perfect, constrained schedule that minimizes total mileage.

### Verifying field data
A developer receives a large GPX file from a drone flight path. They ask the agent to 'audit the GPS track.' The MCP runs `snap_gpx_to_road`, which instantly corrects any minor positional jumps, making the raw data reliable for billing.

### Comparing distribution networks
A supply chain planner needs to compare the travel time between 5 warehouses and 10 client sites. They ask the agent to calculate a 'routing matrix,' receiving a synchronous table of all distances and times immediately.

## Benefits

- Stop manual calculation. Instead of building massive spreadsheets to compare distances, simply ask the agent for a 'routing matrix' using `calculate_routing_matrix` and get instant comparisons across all your points.
- Pinpoint service areas instantly. You don’t have time to draw polygons by hand; use `calculate_distance_isochrone` to map exactly what customers can reach in 15 minutes from a new depot location.
- Handle multi-stop routes easily. Instead of calling separate APIs for every leg, the agent uses tools like `calculate_heavy_route` to calculate optimal paths for dozens of stops in one go.
- Clean up dirty data. If your field team sends back messy GPS tracks, use `snap_gpx_to_road` to snap those raw points perfectly onto actual street vectors—no manual cleaning required.
- Verify addresses with confidence. When you get coordinates, don't guess what they mean; run `reverse_geocode` and get the precise street name attached, every time.

## How It Works

The bottom line is you tell your AI agent what you need, and it figures out the complicated math of geography for you.

1. Subscribe to this MCP on Vinkius and enter your GraphHopper API Key into your AI client.
2. Ask your agent a question about location or routing in plain English (e.g., 'What's the best route for three stops?').
3. The MCP processes the request, uses its underlying tools to calculate the solution, and delivers the structured map data or optimized path back to your chat interface.

## Frequently Asked Questions

**How do I use GraphHopper MCP for single-stop routing?**
You can calculate simple routes using `calculate_url_route`. Just ask your agent to find the best path between two coordinates, and it will handle the basic distance and time calculations.

**What is the main difference between GraphHopper MCP and a standard mapping API?**
A standard API gives you a route; this MCP lets you solve complex problems. It can calculate reachability polygons or optimize for vehicle capacity, which simple APIs can't do.

**Can I use GraphHopper MCP to check if an area is reachable?**
Yes. Use `calculate_distance_isochrone` to map out the exact boundary (polygon) of all points you can reach from a starting location within your specified time limit.

**Do I need multiple tools in GraphHopper MCP for fleet optimization?**
No, the agent handles it. You just tell it to solve the vehicle routing problem; it automatically uses tools like `submit_vrp_optimizer` and then reads the final answer back using `poll_vrp_solution`.

**Does GraphHopper MCP work with my custom coordinates?**
Absolutely. The agent accepts raw GPS data and can process it, whether you need to find a street name (`reverse_geocode`) or clean up the path itself (`snap_gpx_to_road`).