routeLABSCO SUMMARY
Isochrones are the part you cannot get from a directions API.
A route between two points is available everywhere; 'everywhere within 15 minutes on a bicycle' is the question that usually means writing code. Here it is one call returning a polygon. Two practical notes: routing quality is entirely a property of the Valhalla instance and the OSM data behind it, and the demo URL is the one with the 1 in it — the obvious hostname returns a web interface.
What it is
A client for Valhalla, the OpenStreetMap routing engine. It asks Valhalla for a route between two points or for an isochrone — the area reachable within a given number of minutes — and returns GeoJSON with the geometry and summary statistics attached.
What you get
- The
routetool takes anoriginanddestinationas lat/lon, amode,alternativesandunits, and returns a GeoJSON LineString withdistance_km,duration_secondsandduration_minutes - The
isochronetool takes anorigin,minutesandmode, and returns the polygon of everywhere reachable in that time - Five transport modes —
auto,bicycle,pedestrian,taxi,bus - A
healthresource reporting the routing server's status and version - A
tileresource serving vector tiles for client-side rendering
Requirements
Node.js 18+ and a Valhalla server to talk to — this server does not do the routing itself. VALHALLA_BASE_URL points at it and defaults to http://localhost:8002; the public demo instance is https://valhalla1.openstreetmap.de (note the 1 — the plain hostname serves a web page, not the API). For a local engine, ./start-mcp.sh builds the server and brings up Valhalla with Monaco OSM data through Docker Compose. Published as valhalla-mcp-server version 0.1.0; register it as node against dist/index.js with cwd set to the checkout. DEBUG, LOG_LEVEL, MCP_SERVER_NAME and MCP_SERVER_VERSION are the other environment variables.
Setup effort
Build from source — clone the repository and build it, then point your client at the built dist/index.js
USE CASES
Working out what is within a 15-minute walk
Generate a travel-time polygon from a point and use it as a catchment area.
Comparing modes for the same trip
Route the same origin and destination by car and by bicycle and compare distance and duration.
Getting geometry a map can draw
Take the GeoJSON LineString straight into a map layer instead of parsing directions text.
Checking the routing engine is actually up
Read the health resource before blaming an empty route on the query.
2 tools
Listed in project docs. Your client may show a different list.
isochroneBEFORE YOU INSTALL
What to know first
Tools you get
2 tools named in the project's documentation.
Requires
- node on PATH
- Node.js 18+
Where it runs
All 3 documented setups run the server on your machine.
INSTALLATION
Connect your client
Clone the repository and build it, then point your client at the built dist/index.js. This one is built from source rather than installed with a single command.
Server setup
Build from source
git clone https://github.com/aatakansalar/valhalla-mcp.git
cd valhalla-mcp
npm install
npm run buildnode
node dist/index.jsMCP Clients
Claude Desktop — Demo API
{
"mcpServers": {
"valhalla-mcp": {
"command": "node",
"args": [
"dist/index.js"
],
"cwd": "<YOUR_PATH_TO_VALHALLA_MCP>",
"env": {
"VALHALLA_BASE_URL": "https://valhalla1.openstreetmap.de"
}
}
}
}Claude Desktop — Local server
{
"mcpServers": {
"valhalla-mcp": {
"command": "node",
"args": [
"dist/index.js"
],
"cwd": "<YOUR_PATH_TO_VALHALLA_MCP>",
"env": {
"VALHALLA_BASE_URL": "http://localhost:8002"
}
}
}
}Claude Desktop — Absolute path
{
"mcpServers": {
"valhalla": {
"command": "node",
"args": [
"<YOUR_PATH_TO_VALHALLA_MCP>/dist/index.js"
],
"env": {
"VALHALLA_BASE_URL": "https://valhalla1.openstreetmap.de"
}
}
}
}