Geocoding, walking/driving/cycling distances, route optimization, isochrones and POI search on OSM
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
A Model Context Protocol (MCP) server for OpenStreetMap, built for travel planning.
Lets MCP clients like Claude Code, Claude Desktop or Codex answer questions about places: geocoding, walking, driving and cycling distances and durations, multi-stop route optimization, isochrones and POI search β 11 tools, all read-only.
Eleven tools is the ceiling, not the floor: OSM_ALLOW_TOOLS=essential
registers a curated six instead, and a model picks the right tool far more
reliably from six than from eleven β see
choosing which tools load.
All backends are free public OpenStreetMap services, so no API key is required. An OpenRouteService key can be supplied optionally to switch the routing engine.
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.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 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) |
OSM_ALLOW_TOOLS | no | Comma-separated tool names, list_* prefixes, or essential for a curated preset |
OSM_DENY_TOOLS | no | Same syntax; removed from whatever OSM_ALLOW_TOOLS left |
OSM_ALLOW_TOOLS and OSM_DENY_TOOLS take comma-separated tool names;
a trailing * matches a whole family. essential is a curated preset of
six: geocode, reverse_geocode, find_nearby_pois, poi_details, route, map_link.
An entry that matches no tool aborts startup and names it, so a typo cannot
silently hide a tool β an absent tool is not something anyone traces back to an
environment variable. A filtered tool is never registered, so it is absent from
tools/list and unknown to tools/call alike.
If you run several of these servers at once, mcp-hub
is the other answer β its /hub endpoint replaces every server's tools with six
meta-tools.
claude_desktop_config.json:
~/.codex/config.toml:
Multi-arch, with SBOM and build provenance:
-i is required β the protocol runs over stdin and stdout. There is no port to
publish. More client recipes are in the
client guide.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/openstreetmap)<a href="https://allmcps.com/mcp/openstreetmap"><img src="https://allmcps.com/api/badge/openstreetmap?style=directory" alt="OpenStreetMap on AllMCPs" /></a>