MCP server for OpenStreetMap: geocoding, walking/driving/cycling distances, route optimization, isochrones and POI search
- ✓Open-source license (MIT)
- ✓Actively maintained (<30d)
- ✓Clear description
- ✓Topics declared
- ✓Documented (README)
claude mcp add osm-mcp -- npx -y osm-mcp{
"mcpServers": {
"osm-mcp": {
"command": "npx",
"args": ["-y", "osm-mcp"]
}
}
}Resumen de MCP Servers
# osm-mcp
[](https://github.com/ni-c/osm-mcp/actions/workflows/ci.yml)
[](https://www.npmjs.com/package/osm-mcp)
[](https://www.npmjs.com/package/osm-mcp)
[](https://nodejs.org)
[](https://github.com/ni-c/osm-mcp/pkgs/container/osm-mcp)
[](LICENSE)
[](https://osm-mcp.ni-c.de)
An [MCP](https://modelcontextprotocol.io) server for
[OpenStreetMap](https://www.openstreetmap.org): geocoding, walking/driving/cycling
distances and durations, multi-stop route optimization, isochrones and POI
search — built for travel planning with AI assistants.
11 tools, all read-only. All backends are free public OpenStreetMap services;
**no API key is required**. An OpenRouteService key can be supplied optionally to
switch the routing engine.
📖 **Full documentation: <https://osm-mcp.ni-c.de>**
<!-- <picture> is resolved against the colour scheme of the page showing it, so GitHub
picks the variant that matches its own theme toggle. npm strips <picture> and
<source> when it sanitises the README and keeps the <img>, which is why that
fallback brings its own dark card instead of relying on a media query. -->
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://osm-mcp.ni-c.de/architecture-dark.svg">
<source media="(prefers-color-scheme: light)" srcset="https://osm-mcp.ni-c.de/architecture-light.svg">
<img src="https://osm-mcp.ni-c.de/architecture.svg" alt="An MCP client talks to osm-mcp over stdio; the server exposes eleven read-only tools with rate limiting and caching, and calls Nominatim, Photon, OSRM, Valhalla and Overpass over HTTPS — plus OpenRouteService optionally with an API key" width="800">
</picture>
<img src="https://osm-mcp.ni-c.de/demo.gif" alt="Terminal recording: the server reports eleven tools, geocodes the Porta Nigra in Trier, and returns a walking route with distance and duration" width="800">
## Why another OSM MCP server?
- **Correct walking/cycling routes.** The public OSRM demo servers ignore the
profile segment inside the OSRM URL path and always return **car** routes
unless the FOSSGIS `routed-foot` / `routed-bike` / `routed-car` path prefixes
are used. Most existing OSM MCP servers get this wrong and silently return
driving times for walking queries. This server uses the prefixes and its live
smoke test asserts that foot routes are much slower than car routes.
- **Policy-compliant by construction.** Per-service rate limiting (Nominatim and
OSRM: 1 request/second), an identifying User-Agent on every request (required
by the Nominatim usage policy), response caching, capped Overpass concurrency
(2 slots) and automatic failover to an Overpass mirror on 429/5xx.
- **Photon support.** Optional typo-tolerant geocoding via komoot's Photon,
which is designed for interactive use — a better fit for LLM-driven lookups
than hammering Nominatim.
## Requirements
- Node.js ≥ 22
- Internet access to the public OpenStreetMap services (see table below)
## Configuration
Every variable is optional — the server works out of the box.
| Variable | Default | Description |
| -------------------- | ----------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `OSM_USER_AGENT` | `osm-mcp/<version> (+https://github.com/ni-c/osm-mcp)` | User-Agent sent to every service. Nominatim requires a real, identifying one. |
| `NOMINATIM_BASE_URL` | `https://nominatim.openstreetmap.org` | Geocoding / reverse geocoding |
| `PHOTON_BASE_URL` | `https://photon.komoot.io` | Typo-tolerant geocoding |
| `OSRM_BASE_URL` | `https://routing.openstreetmap.de` | Routing, matrices, trip optimization. Must serve the `routed-{car,bike,foot}` path prefixes (the FOSSGIS layout). |
| `OVERPASS_BASE_URL` | `https://overpass-api.de/api/interpreter,https://overpass.private.coffee/api/interpreter` | Comma-separated Overpass endpoints, tried in order on 429/5xx |
| `VALHALLA_BASE_URL` | `https://valhalla1.openstreetmap.de` | Isochrones |
| `ORS_API_KEY` | – | Optional [OpenRouteService](https://openrouteservice.org) key (secret). When set, routes, matrices and isochrones use ORS instead of OSRM/Valhalla. Free tier: 2000 directions/day, 40/minute. |
| `ORS_BASE_URL` | `https://api.openrouteservice.org` | OpenRouteService endpoint |
| `OSM_CACHE_TTL` | `3600` | Seconds identical upstream responses are served from the in-memory cache (`0` disables caching) |
## Install
```sh
claude mcp add osm -- npx -y osm-mcp
```
Claude Desktop (`claude_desktop_config.json`):
```json
{
"mcpServers": {
"osm": {
"command": "npx",
"args": ["-y", "osm-mcp"]
}
}
}
```
Codex (`~/.codex/config.toml`):
```toml
[mcp_servers.osm]
command = "npx"
args = ["-y", "osm-mcp"]
```
Container (multi-arch, with SBOM and build provenance):
```sh
docker run -i --rm ghcr.io/ni-c/osm-mcp
```
`-i` is required — the protocol runs over stdin and stdout. There is no port to
publish. More client recipes are in the
[client guide](https://osm-mcp.ni-c.de/guide/clients).
## Tools
| Tool | Description |
| ------------------------ | ---------------------------------------------------------------------------------------------- |
| `geocode` | Place name/address → coordinates (Nominatim or Photon) |
| `reverse_geocode` | Coordinates → nearest address |
| `route` | Distance and duration between 2+ waypoints, `foot`/`car`/`bike`; optional turn-by-turn summary |
| `route_matrix` | Travel time/distance from every origin to every destination in one call |
| `optimize_route` | Best visiting order for a set of stops (traveling-salesman, OSRM trip) |
| `isochrone` | Reachable area within a time or distance budget (Valhalla, or ORS with key) |
| `find_nearby_pois` | POIs around a location by category or raw OSM tag, sorted by distance (Overpass) |
| `poi_details` | Full OSM record of one element: opening hours, website, phone, … |
| `suggest_meeting_point` | Fair meeting venue for 2–8 people (balanced travel times) |
| `straight_line_distance` | Great-circle distance, computed offline |
| `map_link` | openstreetmap.org marker / directions links, computed offline |
Every place input accepts either a name/address (geocoded automatically) or
literal coordinates as `"lat,lon"`.
## Usage policies & attribution
This server talks to shared community infrastructure. It enforces the
published limits client-side, but the operator asks users to keep overall
usage light and non-commercial:
- **Data:** © [OpenStreetMap](https://www.openstreetmap.org/copyright)
contributors, licensed under [ODbL 1.0](https://opendatacommons.org/licenses/odbl/).
- **Nominatim:** max 1 request/second, identifying User-Agent mandatory,
results cached ([policy](https://operations.osmfoundation.org/policies/nominatim/)).
- **OSRM / Valhalla (FOSSGIS):** reasonable, non-commercial use; max 1
request/second ([about](https://routing.openstreetmap.de/about.html)).
- **Overpass:** ~2 concurrent sloLo que la gente pregunta sobre osm-mcp
¿Qué es ni-c/osm-mcp?
+
ni-c/osm-mcp es mcp servers para el ecosistema de Claude AI. MCP server for OpenStreetMap: geocoding, walking/driving/cycling distances, route optimization, isochrones and POI search Tiene 0 estrellas en GitHub y su última actualización registrada es del 2026-08-18.
¿Cómo se instala osm-mcp?
+
Puedes instalar osm-mcp clonando el repositorio (https://github.com/ni-c/osm-mcp) o siguiendo las instrucciones del README en GitHub. ClaudeWave también te ofrece bloques de instalación rápida en esta misma página.
¿Es seguro usar ni-c/osm-mcp?
+
Nuestro agente de seguridad ha analizado ni-c/osm-mcp y le ha asignado un Trust Score de 95/100 (tier: Verified). Revisa el desglose completo de comprobaciones superadas y flags en esta página.
¿Quién mantiene ni-c/osm-mcp?
+
ni-c/osm-mcp es mantenido por ni-c. La última actividad registrada en GitHub es del 2026-08-18, con 0 issues abiertos.
¿Hay alternativas a osm-mcp?
+
Sí. En ClaudeWave puedes explorar mcp servers similares en /categories/mcp, ordenados por popularidad o actividad reciente.
Despliega osm-mcp en tu cloud
Lleva este repo a producción en minutos. Cada plataforma genera su propio entorno con variables de entorno editables.
¿Mantienes este repo? Añade un badge a tu README
Pega el badge en tu README de GitHub para mostrar que está auditado por ClaudeWave. Cada badge enlaza de vuelta a esta página y muestra el Trust Score actual.
Más MCP Servers
Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.
User-friendly AI Interface (Supports Ollama, OpenAI API, ...)
An open-source AI agent that brings the power of Gemini directly into your terminal.
Real-time global intelligence dashboard. AI-powered news aggregation, geopolitical monitoring, and infrastructure tracking in a unified situational awareness interface
The fastest path to AI-powered full stack observability, even for lean teams.
🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl!