AV

aatakansalar/valhalla-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

5 stars 3 forks 质量 55 趋势 13

An MCP server that provides integration between Claude Desktop (or any other client) and the Valhalla Open-Street-Map routing engine.

概览

A Model Context Protocol (MCP) server that provides seamless integration between Claude Desktop and the Valhalla Open-Street-Map routing engine. Access professional routing and isochrone capabilities directly from your AI conversations without complex APIs. Claude Desktop showing a route calculation between two points with detailed GeoJSON response from Valhalla MCP Server - auto - Car routing - bicycle - Bicycle routing - pedestrian - Walking routes - taxi - Taxi routing - bus - Public transit routing - Node.js 18+ - Claude Desktop - NPM or Yarn package manager This script will: - Build the MCP server - Start local Valhalla with Monaco OSM data - Wait for services to be ready - Run integration tests - Provide Claude Desktop configuration If you already have a Valhalla server running elsewhere: 1. Open Claude Desktop settings 2. Add to your MCP configuration: 3. Update the cwd path to your actual project location

README

以下为原文 README 节选,完整内容请查看原文。

Valhalla MCP Server

A Model Context Protocol (MCP) server that provides seamless integration between Claude Desktop and the Valhalla Open-Street-Map routing engine. Access professional routing and isochrone capabilities directly from your AI conversations without complex APIs.

Example Usage

Claude Desktop showing a route calculation between two points with detailed GeoJSON response from Valhalla MCP Server

Features

Currently Supported Valhalla Services

MCP Tool/Resource Valhalla Service Description
route tool /route Single origin → destination routing with alternatives
isochrone tool /isochrone Travel time polygons showing reachable areas
health resource /status Server status and version information
tile resource /tile/{z}/{x}/{y} Vector tiles for client-side rendering

Valhalla Services - Coming Soon

Service Description Use Cases
Matrix Distance/time matrices for multiple origins/destinations Delivery optimization, logistics planning
Map-matching Match GPS coordinates to road network GPS trace cleaning, route correction
Elevation Elevation profiles along routes or at points Hiking routes, difficulty analysis
Expansion Graph traversal visualization Network analysis, reachability studies
Locate Detailed metadata about nodes and edges Address geocoding, road attributes
Centroid Optimal convergence point from multiple locations Meeting point optimization
Optimized Route Multi-stop delivery routing with constraints Logistics, delivery services

Transportation Modes

  • auto - Car routing
  • bicycle - Bicycle routing
  • pedestrian - Walking routes
  • taxi - Taxi routing
  • bus - Public transit routing

Quick Start

Prerequisites

  • Node.js 18+
  • Claude Desktop
  • NPM or Yarn package manager

Option 1: Local Valhalla Server

For production use or custom datasets:

# Prerequisites: Docker and Docker Compose
./start-mcp.sh

This script will:

  • Build the MCP server
  • Start local Valhalla with Monaco OSM data
  • Wait for services to be ready
  • Run integration tests
  • Provide Claude Desktop configuration

Option 2: Use Your Pre-existing Valhalla Server

If you already have a Valhalla server running elsewhere:

# Clone and setup
git clone 
cd valhalla-mcp
npm install
npm run build

# Configure environment variables
cp env.example .env
# Edit .env file and set VALHALLA_BASE_URL=http://your-valhalla-server:8002
在 GitHub 查看完整 README

安装

npx tsc --noEmit
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "valhalla-mcp": { "command": "node", "args": ["dist/index.js"], "cwd": "/YOUR/PATH/TO/valhalla-mcp", "env": { "VALHALLA_BASE_URL": "https://valhalla1.openstreetmap.de" } } } }