OpenStreetMap MCP Server
Provides access to a suite of 30 tools for OpenStreetMap data, including global geocoding, turn-by-turn routing via OSRM, point-of-interest discovery, and advanced data analysis through Overpass QL and OSMOSE quality assurance 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., "@OpenStreetMap MCP Server Get driving directions from Changi Airport to Marina Bay Sands"
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.
OpenStreetMap MCP Server
A powerful Model Context Protocol (MCP) server for OpenStreetMap, providing 30 tools for geocoding, routing, quality assurance, and data analysis. Optimized for AI assistants like Cursor and Claude.
A community project by Grab β providing open-source mapping tools to help developers and researchers work with OpenStreetMap data more effectively.
π― Quick Start
1οΈβ£ Installation
git clone https://github.com/GRABOSM/osm-mcp.git
cd osm-mcp
npm install
npm run build2οΈβ£ Configure AI Integration
Cursor AI
Open Cursor Settings β Features β Model Context Protocol.
Add a new server with:
Type:
commandCommand:
node /absolute/path/to/osm-mcp/dist/index.js
Cursor Desktop
Add this to your mcp.json:
{
"mcpServers": {
"osm-mcp": {
"command": "node",
"args": ["/absolute/path/to/osm-mcp/dist/index.js"]
}
}
}Claude Desktop
Add this to your claude_desktop_config.json:
{
"mcpServers": {
"osm": {
"command": "node",
"args": ["/absolute/path/to/osm-mcp/dist/index.js"]
}
}
}3οΈβ£ Start Using
Try asking your AI:
"Find coffee shops in Makati, Manila"
"Calculate a 15-minute driving isochrone from Grab HQ Singapore"
"Get directions from Changi Airport to Marina Bay Sands"
Related MCP server: Geo MCP Worker
π Key Features
Geocoding: Search addresses and landmarks globally.
Routing (OSRM): Turn-by-turn directions, distance matrices, and route optimization.
Smart POI: Find restaurants, shops, and attractions with intelligent tag detection.
Quality Assurance (OSMOSE): Detect mapping errors and monitor data quality.
Changeset Analysis: Analyze recent edits and user contributions.
Tag Intelligence (Taginfo): Real-world tag usage statistics and validation.
Dual Interface: Use via MCP (AI tools) or HTTP REST API.
π οΈ Tool Reference (30 Tools)
πΊοΈ Geocoding (4)
search_location: Search for places and addresses.reverse_geocode: Get address from coordinates.search_structured: Search by street, city, country, etc.get_place_details: Get full details of an OSM element.
π Points of Interest (3)
search_pois: General POI search (amenities, shops, etc.).search_pois_smart: Intelligent POI search with category detection.find_amenities_nearby: Locate facilities within a specific radius.
π£οΈ Routing & Navigation (5)
get_osrm_route: Detailed turn-by-turn directions.get_distance_matrix: Travel times and distances between multiple points.optimize_route: Find the best route through multiple stops (TSP).map_match_gps: Snap GPS traces to the road network.calculate_isochrone: Area reachable within a time limit.
π OSM Data Analysis (6)
search_highways_smart: Smart search for roads and motorways.get_elements_in_bounds: Get all data within a bounding box.search_by_tags: Find elements by specific OSM tags.get_route_data: Extract road geometry for custom use.execute_overpass_query: Run advanced Overpass QL queries.snap_to_roads: Find the nearest road for any point.
π Changeset Analysis (3)
get_changeset: Details of a specific mapping edit.search_changesets: Find edits by user, time, or location.get_changeset_diff: View exact changes made in an edit.
π Quality Assurance (6)
osmose_search_issues: Find data errors with filters.osmose_get_issue_details: Details of a specific quality issue.osmose_get_issues_by_country: Quality issues by nation.osmose_get_issues_by_user: Issues related to a specific user.osmose_get_stats: Data quality metrics and charts.osmose_get_items: List of detectable issue categories.
π·οΈ Tag Intelligence (3)
get_tag_suggestions: Autocomplete for OSM tags.get_tag_stats: Usage statistics for any tag.validate_osm_tag: Check if a tag combination is proper.
π‘ Example Usage
Navigation
"Get directions from KL Sentral to Petronas Twin Towers"
Urban Planning
"Calculate 30-minute driving isochrone from Grab HQ Singapore"
Quality Monitoring
"Analyze recent mapping activity in Bengaluru"
π HTTP API Mode
Run as a standalone server:
npm run dev:httpAccess docs at: http://localhost:8888/api/info
π οΈ Troubleshooting
Absolute Paths: Always use full paths in AI tool configurations.
Build First: Ensure you run
npm run buildafter any changes.Node Version: Use Node.js v18 or higher.
π License
This project is licensed under the MIT License.
π Credits
OpenStreetMap Contributors
OSRM, Nominatim, Overpass, OSMOSE, Taginfo communities.
Available Tools
30 toolscalculate_isochroneA
Calculate travel time isochrone (areas reachable within time limit) using Valhalla
Inputs: center_longitude (required), center_latitude (required), max_duration_seconds (required), profile, +2 more.
execute_overpass_queryC
Execute a custom Overpass QL query
Inputs: query (required), timeout, maxsize.
find_amenities_nearbyC
Find amenities near a specific location
Inputs: lat (required), lon (required), radius, amenity_type.
get_changesetC
Get detailed information about a specific changeset
Inputs: changeset_id (required), include_discussion.
get_changeset_diffC
Get the diff/changes for a specific changeset
Inputs: changeset_id (required).
get_distance_matrixC
Calculate distance and duration matrix between multiple points
Inputs: coordinates (required), profile, sources, destinations, +1 more.
get_elements_in_boundsB
Get all OSM elements within a bounding box
Inputs: bbox (required), element_types.
get_osrm_routeB
Get detailed route with turn-by-turn directions using OSRM
Inputs: coordinates (required), profile, alternatives, steps, +3 more.
get_place_detailsC
Get detailed information about a specific OSM place
Inputs: osm_type (required), osm_id (required).
get_route_dataC
Get road/path data for routing between two points
Inputs: start_lat (required), start_lon (required), end_lat (required), end_lon (required), +1 more.
get_tag_statsB
Get usage statistics for OSM tags from Taginfo
Inputs: key (required), include_values, values_limit.
get_tag_suggestionsC
Get OSM tag suggestions and autocomplete based on Taginfo statistics
Inputs: input (required), limit.
map_match_gpsC
Map-match GPS traces to road network
Inputs: coordinates (required), profile, timestamps, radiuses, +1 more.
optimize_routeB
Solve Traveling Salesman Problem to find optimal route through all points
Inputs: coordinates (required), profile, roundtrip, source, +2 more.
osmose_get_issue_detailsC
Get detailed information about a specific OSMOSE issue
Inputs: issue_id (required).
osmose_get_issues_by_countryC
Get OSMOSE issues in a specific country
Inputs: country (required), level, item, limit.
osmose_get_issues_by_userC
Get OSMOSE issues last modified by a specific user
Inputs: username (required), level, bbox, limit.
osmose_get_itemsB
Get available OSMOSE issue categories/items
Inputs: no named parameters.
osmose_get_statsB
Get OSMOSE statistics (issue counts by level, type, etc.)
Inputs: bbox, country.
osmose_search_issuesC
Search for OSMOSE quality assurance issues with various filters
Inputs: bbox, item, level, country, +3 more.
reverse_geocodeB
Get address information from coordinates (reverse geocoding)
Inputs: lat (required), lon (required), zoom.
search_by_tagsC
Search for OSM elements by specific tags
Inputs: tags (required), bbox, around.
search_changesetsC
Search for changesets with various filters
Inputs: user, display_name, bbox, time, +4 more.
search_highways_smartC
Smart highway search using Taginfo-enhanced queries for major roads, motorways, etc.
Inputs: intent (required), bbox, around, limit.
search_locationC
Search for locations, addresses, or places using Nominatim geocoding service
Inputs: query (required), limit, countrycodes, bounded, +1 more.
search_poisC
Search for Points of Interest (POIs) using Overpass API
Inputs: amenity, shop, cuisine, tourism, +3 more.
search_pois_smartC
Smart POI search using Taginfo-enhanced queries for restaurants, shops, tourism, etc.
Inputs: category (required), subcategory, bbox, around, +1 more.
search_structuredC
Search using structured address components
Inputs: street, city, county, state, +3 more.
snap_to_roadsB
Snap coordinates to nearest road segments
Inputs: coordinate (required), profile, number.
validate_osm_tagC
Validate if an OSM tag combination is commonly used and get suggestions
Inputs: key (required), value (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 30 tools
Most tools have distinct purposes, but there is some overlap that could cause confusion. For example, 'search_pois' and 'search_pois_smart' both search for POIs, and 'get_osrm_route' and 'get_route_data' both handle routing, though their descriptions differentiate them slightly. Overall, the descriptions help clarify boundaries, but agents might need to carefully choose between similar tools.
Tool names follow a highly consistent snake_case pattern with clear verb_noun structures, such as 'calculate_isochrone', 'execute_overpass_query', and 'search_location'. This consistency makes the tool set predictable and easy to navigate, with no deviations in naming conventions.
With 30 tools, the count is on the high side for an MCP server, bordering on heavy. While OpenStreetMap is a broad domain, this many tools might overwhelm agents or indicate potential redundancy. It feels slightly excessive compared to well-scoped servers, but it's not extreme.
The tool set provides comprehensive coverage for OpenStreetMap operations, including geocoding, routing, data querying, quality assurance (OSMOSE), and tag management. It supports CRUD-like actions for OSM elements and changesets, with no obvious gaps that would hinder agent workflows in this domain.
Related MCP Connectors
Geocoding, routing, isochrones, traffic, weather, and place search for AI agents. 19 MCP tools.
MCP server for Japan geodata: cadastral lot numbers (chiban) and reverse geocoding, for AI agents.
Geospatial AI MCP server β satellite imagery, embeddings, weather, GNS governance
Routing, geocoding, places, matrix and map tools for location-aware AI workflows.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA geospatial MCP server that provides tools for geocoding, routing, elevation profiles, and spatial analysis. It enables AI agents to process GIS file formats like GeoJSON and Shapefiles while performing complex coordinate transformations and distance calculations.4MIT
- 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
- FlicenseNot gradedqualityBmaintenanceAn MCP server providing geocoding, routing, isochrones, and POI-by-proximity search through self-hosted OpenStreetMap backends.-
- AlicenseAqualityDmaintenanceAn OpenStreetMap MCP server that provides location-based services including geocoding, route directions, points of interest search, and neighborhood analysis to enhance LLMs with geospatial capabilities.121MIT