myosm-mcp-server
The myosm-mcp-server provides OpenStreetMap-based location services and geospatial data capabilities:
Geocoding: Convert addresses to coordinates and reverse geocode coordinates to addresses.
Place Discovery: Find nearby points of interest by category, search categories within an area, locate schools, EV charging stations, and parking facilities; explore area profiles; analyze neighborhood livability; suggest optimal meeting points.
Routing & Commute: Calculate route directions for car, bike, and foot; analyze home-to-work commutes; generate travel time/distance matrices; find POIs along a route.
Map Visualization: Fetch styled map tiles and render annotated map images with custom markers and routes.
Public Transport: Query stops, stations, and transit lines; retrieve full transit network topology.
Energy Infrastructure: Discover power lines, underground cables, substations, transformers, and power plants (with voltage, source, and output filtering); trace full power lines; obtain grid statistics.
Provides geocoding, reverse geocoding, place search, nearby POIs, routing, map tiles, public transport, and energy infrastructure data using OpenStreetMap services.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@myosm-mcp-server Suggest a central meeting point for 3 people in Berlin."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
myosm-mcp-server — OpenStreetMap MCP Server (Node.js)
An OpenStreetMap MCP server that enhances LLM capabilities with location-based services and geospatial data.
This is a Node.js/TypeScript reimplementation of jagan-shanmugam/open-streetmap-mcp (Python), extended with map-layer, public-transport and energy-infrastructure tools.
Features
The server gives LLMs tools to interact with OpenStreetMap data:
Geocode addresses and place names to coordinates (and the reverse)
Find nearby points of interest
Get route directions and commute analysis between locations (OSRM)
Search for places by category within a bounding box
Suggest optimal meeting points for multiple people
Explore areas and run neighborhood livability analysis
Find schools, EV charging stations and parking facilities
Map layers: fetch rendered map tiles (standard, transport, cycle, …) as images, and render composed, annotated map images (markers + routes/lines drawn on top)
Public transport layer: stops, stations and transit route lines (bus, tram, train, subway, light rail, ferry), plus full network topology — lines with ordered stations, interchanges and connections
Energy layer: power lines, underground cables, substations and transformers (with voltage filtering), electricity production facilities (power plants and generators, filterable by source and output), full power-line tracing and territorial grid summaries
Trip tooling: travel time/distance matrices (N×M) and POI search along a route corridor
Agent ergonomics
Locations as text everywhere: every point-based tool accepts either coordinates or a
locationstring (place name/address), geocoded automatically — no need to chaingeocode_addressfirst. Route-style tools takefrom_location/to_location(orhome_location/work_location), andsearch_categoryaccepts a namedarea.Compact responses by default: Overpass-based tools omit raw OSM tags unless
verbose: trueis passed, keeping token usage low in agent loops.
Related MCP server: OpenStreetMap MCP Server
Installation
Requires Node.js ≥ 18.17.
git clone https://github.com/visuelconcept/myosm-mcp-server.git
cd myosm-mcp-server
npm install
npm run buildRunning the server
The server supports both MCP transports; stdio is the default.
stdio (local MCP hosts: Claude Desktop, Claude Code, Cursor, Windsurf, …)
{
"mcpServers": {
"myosm-mcp-server": {
"command": "node",
"args": ["/path/to/myosm-mcp-server/dist/index.js"]
}
}
}With Claude Code:
claude mcp add myosm -- node /path/to/myosm-mcp-server/dist/index.jsClaude Desktop config file locations:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%/Claude/claude_desktop_config.json
Streamable HTTP (remote deployments, shared server, multiple clients)
Start the server in HTTP mode:
node dist/index.js --http --port 3000 # or: npm run start:http
# equivalent: MCP_TRANSPORT=http PORT=3000 node dist/index.jsThe MCP endpoint is http://127.0.0.1:3000/mcp (sessions are managed per client
via the Mcp-Session-Id header) and GET /health reports liveness for
deployment probes.
Declare it in an MCP host by URL:
{
"mcpServers": {
"myosm-mcp-server": {
"type": "http",
"url": "http://127.0.0.1:3000/mcp"
}
}
}With Claude Code:
claude mcp add --transport http myosm http://127.0.0.1:3000/mcpCLI options: --http, --stdio, --host <address>, --port <number>, --help.
Security: the HTTP server binds to
127.0.0.1by default and has no built-in authentication. To expose it (--host 0.0.0.0), put it behind a reverse proxy that handles TLS and auth, and setMCP_ALLOWED_HOSTS(comma-separatedHostheader values, e.g.MCP_ALLOWED_HOSTS=mcp.example.com) to enable DNS-rebinding protection.
Tools
Geocoding
Tool | Description |
| Convert an address or place name to coordinates with rich metadata |
| Convert coordinates to a detailed address |
Places & analysis
Tool | Description |
| Discover POIs near a location, grouped by category/subcategory |
| Find places of given categories/subcategories in a bounding box |
| Compute a central meeting point and suggest venues around it |
| Comprehensive profile of all features in an area |
| Livability analysis with category scores and walkability |
| Educational institutions around a point, sorted by distance |
| EV charging stations with connector/power filtering |
| Parking facilities with type, capacity and fee info |
Routing
Tool | Description |
| Route between two points (car/bike/foot) with turn-by-turn directions |
| Compare home→work commute across several transport modes |
| N×M duration/distance matrix between origins and destinations (OSRM |
| POIs within a corridor around a route (fuel, charging, restaurants, …), ordered by position along the route with detour distance |
Map layers & transport
Tool | Description |
| Composed, annotated map image (PNG): stitched tiles + numbered markers + colored paths — pass a route geometry or a power-line trace directly |
| Single rendered map tile (PNG image) covering a location — styles: |
| Public transport layer: stops/stations/terminals plus transit route lines ( |
| Network topology of an area: lines with ordered station sequences (route relations + route_master grouping), stations with the lines serving them, interchanges, and per-line adjacent-station segments (graph edges) |
Energy
Tool | Description |
| Electricity grid: power lines, underground cables, substations, transformers (and on request towers, poles, switches, …) with voltage parsing, |
| Production facilities: |
| Reconstruct a full power line from one of its way IDs (route=power relation or tag-compatible connectivity): segments, total length, terminals with nearby substations, GeoJSON MultiLineString |
| Territorial grid statistics: km of lines by voltage class and type, substation/transformer/tower counts, production capacity by source |
Resources
location://place/{query}— information about a place by name (JSON)location://map/{style}/{z}/{x}/{y}— styled map tile at tile coordinates (PNG)
Configuration
All configuration is optional and done through environment variables:
Variable | Default | Purpose |
|
|
|
|
| HTTP bind address |
|
| HTTP port |
| — | Comma-separated |
|
| Geocoding endpoint (self-hosted Nominatim) |
|
| Overpass API endpoint |
|
| Routing endpoint (self-hosted OSRM) |
|
| Tile server for the |
| — | Required for the |
|
| User-Agent sent to the OSM services |
|
| Minimum spacing between two geocoding requests ( |
|
| Retries on 429/502/503/504, with back-off honoring |
|
| Lifetime of a cached geocoding answer ( |
Behind a corporate proxy, run Node with NODE_USE_ENV_PROXY=1 (Node ≥ 22.15) so fetch honors HTTPS_PROXY.
Staying inside the Nominatim rate limit
An LLM asked to locate a dozen places emits a dozen geocode_address calls in one turn, and
MCP clients run them back to back — which is exactly what the public Nominatim answers with
429 Too Many Requests. The client therefore serializes geocoding requests with at least
NOMINATIM_MIN_INTERVAL_MS between two of them, retries a 429 with back-off, and caches
answers (concurrent lookups of the same place share a single request). Geocoding many places is
correspondingly slower — roughly one second each — which is the price of the free service; point
NOMINATIM_URL at a self-hosted instance and the spacing defaults to zero.
Fair use: by default the server talks to free, community-run services. Respect the Nominatim usage policy (max 1 req/s), the Overpass fair-use policy and the OSRM demo server policy. For production workloads, point the environment variables at your own instances. Note: the public OSRM demo server routes every profile with car data; self-host OSRM to get real bike/foot routing (the server already maps modes to the canonical
driving/cycling/walkingprofiles).
Development
npm run build # compile TypeScript to dist/
npm run watch # recompile on change
npm test # smoke + integration + HTTP transport tests (all offline)
SMOKE_LIVE=1 npm run smoke # additionally exercise the real public OSM APIs
npm run inspector # debug with the MCP InspectorThe integration and HTTP tests (test/integration.mjs, test/http.mjs) run the
server against local mock implementations of Nominatim, OSRM, Overpass and the
tile server, so they work without network access.
Differences from the Python original
Same 12 tools and 2 resources, plus:
10 new tools:
get_map_tile,render_map,find_public_transport,get_transit_network,find_power_infrastructure,find_power_plants,trace_power_line,get_grid_summary,get_travel_time_matrix,search_along_routeLocations accepted as free text everywhere (automatic geocoding) and compact responses by default (
verbose: truefor raw OSM tags)Streamable HTTP transport (
--http) in addition to stdio, with per-client sessions and a/healthendpointOverpass queries use
out center, so ways/relations (building-mapped schools, parking lots, …) return usable coordinates instead of being droppedsearch_categorysubcategory filtering uses a valid Overpass regex filter (the original generated invalid QL)Transport modes are mapped to canonical OSRM profiles (
driving/cycling/walking)Endpoints are configurable via environment variables
Turn-by-turn instructions are synthesized from OSRM maneuvers (
"turn left onto …")
License
MIT — see LICENSE. Original Python implementation © open-streetmap-mcp contributors.
Available Tools
16 toolsanalyze_commuteAnalyze commuteA
Perform a detailed commute analysis between home and work locations, comparing multiple transportation modes with distances, durations and turn-by-turn directions.
Inputs: home_latitude (required), work_latitude (required), home_longitude (required), work_longitude (required), +2 more.
analyze_neighborhoodAnalyze neighborhoodA
Generate a comprehensive neighborhood livability analysis: amenities, transportation, green spaces and services, with per-category scores, a walkability score and an overall neighborhood score. Useful for real estate decisions and relocation planning.
Inputs: latitude (required), longitude (required), radius.
explore_areaExplore areaB
Generate a comprehensive profile of an area: all amenities and features around a point, organized by category and subcategory, plus the address of the center point.
Inputs: latitude (required), longitude (required), radius.
find_ev_charging_stationsFind EV charging stationsA
Locate electric vehicle charging stations near a location, optionally filtered by connector type and minimum charging power, sorted by distance.
Inputs: latitude (required), longitude (required), radius, min_power, +1 more.
find_nearby_placesFind nearby placesA
Discover points of interest and amenities near a specific location. Results are grouped by OSM category and subcategory — useful for location-based recommendations and proximity-based decision making.
Inputs: latitude (required), longitude (required), limit, radius, +1 more.
find_parking_facilitiesFind parking facilitiesA
Locate parking facilities (lots, garages, street parking) near a location with capacity, fee and access information, sorted by distance.
Inputs: latitude (required), longitude (required), radius, parking_type.
find_power_infrastructureFind power infrastructureA
Query the electricity grid layer around a location: power lines (high/low voltage), underground cables, substations and transformers — with voltage, circuits, operator and optional line geometry. Pass power_types to also include towers, poles, switches, converters, etc. Results are sorted by distance.
Inputs: latitude (required), longitude (required), limit, radius, +3 more.
find_power_plantsFind power plantsA
Locate electricity production facilities around a location: power plants (power=plant) and standalone generators such as wind turbines or solar arrays (power=generator). Reports the energy source (solar, wind, hydro, nuclear, gas, ...), method, electrical output and operator, sorted by distance and filterable by source and minimum output.
Inputs: latitude (required), longitude (required), limit, radius, +3 more.
find_public_transportFind public transportA
Query the public transport layer around a location: stops, stations, platforms and terminals (sorted by distance) plus the transit route lines serving the area (bus, trolleybus, tram, train, subway, light rail, ferry), with ref, operator, network, origin and destination.
Inputs: latitude (required), longitude (required), limit, radius, +2 more.
find_schools_nearbyFind schools nearbyA
Locate educational institutions (schools, kindergartens, colleges, universities) near a location, optionally filtered by education level, sorted by distance.
Inputs: latitude (required), longitude (required), radius, education_levels.
geocode_addressGeocode addressA
Convert an address or place name to geographic coordinates with detailed location information. Returns a list of matching locations with coordinates, formatted address, administrative boundaries, OSM type/ID, bounding box and importance ranking.
Inputs: address (required).
get_map_tileGet map tileA
Fetch the rendered map tile covering a location so the map layer can be viewed as an image. Styles: "standard" (openstreetmap.org default, no key needed), "transport" (public transport layer), "cycle", "landscape", "outdoor" (Thunderforest styles — require the THUNDERFOREST_API_KEY environment variable). Returns the PNG tile plus tile metadata and attribution.
Inputs: latitude (required), longitude (required), zoom, style.
get_route_directionsGet route directionsA
Calculate route directions between two geographic points using OSRM. Returns a summary (distance in meters, duration in seconds), optional turn-by-turn directions, the route geometry (GeoJSON) and waypoints. Use steps/overview/annotations to control the response size.
Inputs: to_latitude (required), to_longitude (required), from_latitude (required), from_longitude (required), +4 more.
reverse_geocodeReverse geocodeA
Convert geographic coordinates to a detailed address and location description, including the administrative hierarchy, postal code and OSM metadata.
Inputs: latitude (required), longitude (required).
search_categorySearch places by categoryA
Search for specific types of places within a rectangular geographic area. Filters places by OSM category (e.g., "amenity", "shop") and optional subcategories (e.g., ["restaurant", "cafe"]) and returns their coordinates, names and metadata.
Inputs: category (required), max_latitude (required), min_latitude (required), max_longitude (required), +2 more.
suggest_meeting_pointSuggest meeting pointA
Find the optimal meeting place for multiple people coming from different locations: computes the central point and recommends nearby venues of the requested type.
Inputs: locations (required), venue_type.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 16 tools
Several tools overlap in purpose, particularly find_nearby_places, explore_area, and analyze_neighborhood, all of which provide comprehensive amenity profiles around a location. While descriptions hint at differences (e.g., scores for livability), an agent could easily select the wrong one. Other specific searches (parking, schools, EV stations) are clearly distinct.
Tool names consistently use lowercase snake_case with a verb_noun structure (find_*, get_*, analyze_*, etc.). The only minor deviation is 'reverse_geocode' which is a standard term, and no camelCase or mixed conventions appear. Overall, the pattern is predictable and readable.
With 16 tools, the server is slightly above the typical 3-15 range but still reasonable for a broad OSM-based location service. Each tool covers a distinct aspect of geographic data (search, routing, utilities, transport), so the count feels appropriate rather than bloated.
The tool surface covers geocoding, reverse geocoding, POI search, routing, neighborhood analysis, map tiles, and specialized infrastructure queries (power, EV, public transport). Minor gaps exist, such as a direct tool for fetching OSM object details by ID, but core workflows are well-supported and no critical dead ends are apparent.
Maintenance
Related MCP Connectors
Geocoding, routing, isochrones, traffic, weather, and place search for AI agents. 19 MCP tools.
Geospatial AI MCP server — satellite imagery, embeddings, weather, GNS governance
MCP server for Japan geodata: cadastral lot numbers (chiban) and reverse geocoding, for AI agents.
Maps, geocoding and time zones for AI coding agents, on OpenStreetMap, with hard prepaid spend caps.
Related MCP Servers
- AlicenseAqualityDmaintenanceAn MCP server that gives LLMs access to geographic data conversion tools, enabling transformations between different formats like WKT, GeoJSON, CSV, TopoJSON, and KML, as well as performing reverse geocoding.918 npm18MIT
- AlicenseBqualityDmaintenanceA comprehensive MCP server providing 30 tools for geocoding, routing, and OpenStreetMap data analysis. It enables AI assistants to search for locations, calculate travel routes, and perform quality assurance checks on map data.30642 npm6MIT
- AlicenseNot gradedqualityBmaintenanceFree geospatial MCP server for AI agents, providing geocoding, reverse geocoding, POI search, and route planning using OpenStreetMap data via Nominatim, Overpass, and OSRM.GPL 3.0
- FlicenseAqualityDmaintenanceOSM-backed multimodal navigation MCP server enabling geocoding, route planning, POI discovery, and urban layout analysis. It provides a structured city graph to LLM apps without proprietary map APIs.8-