OpenStreetMap MCP Server v2
Provides tools and resources for interacting with OpenStreetMap data and services, enabling geocoding addresses to coordinates, reverse geocoding, discovering nearby points of interest, getting route directions, searching places by category within a bounding box, suggesting optimal meeting points, exploring neighborhoods, finding schools and EV charging stations, analyzing commutes and neighborhood livability, and locating parking facilities.
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 v2 find EV charging stations near Golden Gate Park"
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 (OSM) MCP Server v2
An OpenStreetMap MCP server implementation that enhances LLM capabilities with location-based services and geospatial data.
This is a maintained fork. The original project is jagan-shanmugam/open-streetmap-mcp by Jagan Shanmugam, who designed and wrote all of the tools here. Upstream has had no commits since July 2025 and no longer starts against the current
mcpSDK, so this fork exists to keep it working and to review and land community contributions. Issues and pull requests are welcome.
What changed in v2
Works with
mcp2.x. The SDK renamedFastMCPtoMCPServer;uvx osm-mcp-servernow fails at import. This fork targetsmcp>=2.0.Fixed Overpass
406 Not Acceptable. overpass-api.de rejects the oldUser-Agent; every request now sendsosm-mcp-server-v2/<version>.Fixed
search_categorywith subcategories (upstream #6 by Jagan Shanmugam): Overpass QL has noorinside a tag filter; a regex filter is used instead.Gemini CLI compatibility (upstream #13 by wb1016):
suggest_meeting_pointtakes a typed{latitude, longitude}model so the schema has noadditionalProperties.HTTP transport and Docker (upstream #10 by robertlestak and #11 by JumpLink):
--transport stdio|sse|streamable-http,--host,--port, plus aDockerfile.Progress and log messages from tools are now actually delivered (they were never awaited).
OVERPASS_API_URLlets you point at an Overpass mirror or self-hosted instance.Tests (
uv run pytest) and CI.
Related MCP server: geo-mcp
Demo
Meeting Point Optimization

Neighborhood Analysis

Parking Search

Installation
In MCP Hosts like Claude Desktop, Cursor, Windsurf, etc.
Requires Python 3.13+ and uv.
"mcpServers": { "osm-mcp-server": { "command": "uvx", "args": [ "osm-mcp-server-v2" ] } }Until the package is on PyPI, run it straight from GitHub:
"mcpServers": { "osm-mcp-server": { "command": "uvx", "args": [ "--from", "git+https://github.com/ogSINGH/open-streetmap-mcp-v2", "osm-mcp-server" ] } }
HTTP transport
osm-mcp-server --transport streamable-http --host 127.0.0.1 --port 8000The MCP endpoint is then http://127.0.0.1:8000/mcp. --transport sse is also available. The server binds to
localhost by default; there is no authentication, so only expose it on 0.0.0.0 behind something that adds it.
Docker
docker build -t osm-mcp-server-v2 .
docker run -p 8000:8000 osm-mcp-server-v2
# custom port
docker run -p 3004:3004 -e PORT=3004 osm-mcp-server-v2The image serves Streamable HTTP on 0.0.0.0:$PORT (default 8000) as a non-root user.
Configuration
Variable | Default | Purpose |
|
| Overpass endpoint. The public instance rate-limits aggressively; point this at a mirror (for example |
|
| Per-request timeout in seconds for all upstream HTTP calls. |
MCP hosts launch the server as a subprocess and forward only a minimal environment, so set these in the host config rather than your shell:
"osm-mcp-server": {
"command": "uvx",
"args": ["osm-mcp-server-v2"],
"env": { "OVERPASS_API_URL": "https://overpass.openstreetmap.fr/api/interpreter" }
}All requests to Nominatim, Overpass, OSRM and the tile servers carry a User-Agent of osm-mcp-server-v2/<version>, as their usage policies require.
Features
This server provides LLMs with tools to interact with OpenStreetMap data, enabling location-based applications to:
Geocode addresses and place names to coordinates
Reverse geocode coordinates to addresses
Find nearby points of interest
Get route directions between locations
Search for places by category within a bounding box
Suggest optimal meeting points for multiple people
Explore areas and get comprehensive location information
Find schools and educational institutions near a location
Analyze commute options between home and work
Locate EV charging stations with connector and power filtering
Perform neighborhood livability analysis for real estate
Find parking facilities with availability and fee information
Components
Resources
The server implements location-based resources:
location://place/{query}: Get information about places by name or addresslocation://map/{style}/{z}/{x}/{y}: Get styled map tiles at specified coordinates
Tools
The server implements several geospatial tools:
geocode_address: Convert text to geographic coordinatesreverse_geocode: Convert coordinates to human-readable addressesfind_nearby_places: Discover points of interest near a locationget_route_directions: Get turn-by-turn directions between locationssearch_category: Find places of specific categories in an areasuggest_meeting_point: Find optimal meeting spots for multiple peopleexplore_area: Get comprehensive data about a neighborhoodfind_schools_nearby: Locate educational institutions near a specific locationanalyze_commute: Compare transportation options between home and workfind_ev_charging_stations: Locate EV charging infrastructure with filteringanalyze_neighborhood: Evaluate neighborhood livability for real estatefind_parking_facilities: Locate parking options near a destination
Local Testing
Running the Server
To run the server locally:
Install dependencies (creates
.venv):
uv syncRun the tests:
uv run pytestStart the server over stdio:
uv run osm-mcp-serverTesting with Example Clients
The repository includes two example clients in the examples/ directory:
Basic Client Example
client.py demonstrates basic usage of the OSM MCP server:
uv run python examples/client.pyThis will:
Connect to the locally running server
Get information about San Francisco
Search for restaurants in the area
Retrieve comprehensive map data with progress tracking
LLM Integration Example
location_assistant_client.py provides a helper class designed for LLM integration:
uv run python examples/location_assistant_client.pyThis example shows how an LLM can use the Location Assistant to:
Get location information from text queries
Find nearby points of interest
Get directions between locations
Find optimal meeting points
Explore neighborhoods
Writing Your Own Client
See examples/client.py: it spawns the server over stdio with mcp.client.stdio.stdio_client,
wraps it in ClientSession, and calls tools with session.call_tool(name, arguments).
Claude Desktop config for local server
On MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%/Claude/claude_desktop_config.json
"mcpServers": {
"osm-mcp-server": {
"command": "uv",
"args": [
"--directory",
"/path/to/osm-mcp-server",
"run",
"osm-mcp-server"
]
}
}Development
Building and Publishing
To prepare the package for distribution:
Sync dependencies and update lockfile:
uv syncBuild package distributions:
uv buildThis will create source and wheel distributions in the dist/ directory.
Publish to PyPI: push a
v*tag..github/workflows/publish-to-pypi.ymlbuilds and publishes with PyPI trusted publishing (no token needed once the publisher is configured on PyPI for this repo).
Debugging
Since MCP servers run over stdio, debugging can be challenging. For the best debugging experience, we strongly recommend using the MCP Inspector.
You can launch the MCP Inspector via npm with this command:
npx @modelcontextprotocol/inspector uv --directory /path/to/osm-mcp-server run osm-mcp-serverUpon launching, the Inspector will display a URL that you can access in your browser to begin debugging.
Credits
Jagan Shanmugam (@jagan-shanmugam) — original author of open-streetmap-mcp, including every tool and resource here.
Contributors whose upstream pull requests were reviewed and adapted into v2: Sesame2 (#7, superseded by #6), robertlestak (#10), JumpLink (#11), wb1016 (#13).
Maintained by @ogSINGH.
Licensed under the MIT License, same as upstream. See LICENSE.
Available Tools
12 toolsanalyze_commuteA
Perform a detailed commute analysis between home and work locations.
This advanced tool analyzes commute options between two locations (typically home and work), comparing multiple transportation modes and providing detailed metrics for each option. Includes estimated travel times, distances, turn-by-turn directions, and other commute-relevant data. Essential for real estate decisions, lifestyle planning, and workplace relocation analysis.
Args: home_latitude: Home location latitude (decimal degrees) home_longitude: Home location longitude (decimal degrees) work_latitude: Workplace location latitude (decimal degrees) work_longitude: Workplace location longitude (decimal degrees) modes: List of transportation modes to analyze (options: "car", "foot", "bike") depart_at: Optional departure time (format: "HH:MM") for time-sensitive routing
Returns: Comprehensive commute analysis with: - Summary comparing all transportation modes - Detailed route information for each mode - Total distance and duration for each option - Turn-by-turn directions
Inputs: home_latitude (required), work_latitude (required), home_longitude (required), work_longitude (required), +2 more. Returns: result
analyze_neighborhoodB
Generate a comprehensive neighborhood analysis focused on livability factors.
This advanced analysis tool evaluates a neighborhood based on multiple livability factors, including amenities, transportation options, green spaces, and services. Results include counts and proximity scores for various categories, helping to assess the overall quality and convenience of a residential area. Invaluable for real estate decisions, relocation planning, and neighborhood comparisons.
Args: latitude: Center point latitude (decimal degrees) longitude: Center point longitude (decimal degrees) radius: Analysis radius in meters (defaults to 1000m/1km)
Returns: Comprehensive neighborhood profile including: - Overall neighborhood score - Walkability assessment - Public transportation access - Nearby amenities (shops, restaurants, services) - Green spaces and recreation - Education and healthcare facilities - Detailed counts and distance metrics for each category
Inputs: latitude (required), longitude (required), radius. Returns: result
explore_areaB
Generate a comprehensive profile of an area including all amenities and features.
This powerful analysis tool creates a detailed overview of a neighborhood or area by identifying and categorizing all geographic features, amenities, and points of interest. Results are organized by category for easy analysis. Excellent for neighborhood research, area comparisons, and location-based decision making.
Args: latitude: Center point latitude (decimal degrees) longitude: Center point longitude (decimal degrees) radius: Search radius in meters (defaults to 500m)
Returns: In-depth area profile including: - Address and location context - Total feature count - Features organized by category and subcategory - Each feature includes name, coordinates, and detailed metadata
Inputs: latitude (required), longitude (required), radius. Returns: result
find_ev_charging_stationsA
Locate electric vehicle charging stations near a specific location.
This specialized search tool identifies EV charging infrastructure within a specified distance from a location. Results can be filtered by connector type (Tesla, CCS, CHAdeMO, etc.) and minimum power delivery. Essential for EV owners planning trips or evaluating potential charging stops.
Args: latitude: Center point latitude (decimal degrees) longitude: Center point longitude (decimal degrees) radius: Search radius in meters (defaults to 5000m/5km) connector_types: Optional list of specific connector types to filter by (e.g., ["type2", "ccs", "tesla"]) min_power: Minimum charging power in kW
Returns: List of charging stations with: - Location name and operator - Available connector types - Charging speeds - Number of charging points - Access restrictions - Other relevant metadata
Inputs: latitude (required), longitude (required), radius, min_power, +1 more. Returns: result
find_nearby_placesA
Discover points of interest and amenities near a specific location.
This tool performs a comprehensive search around a geographic point to identify nearby establishments, amenities, and points of interest. Results are organized by category and subcategory, making it easy to find specific types of places. Essential for location-based recommendations, neighborhood analysis, and proximity-based decision making.
Args: latitude: Center point latitude (decimal degrees) longitude: Center point longitude (decimal degrees) radius: Search radius in meters (defaults to 1000m/1km) categories: List of OSM categories to search for (e.g., ["amenity", "shop", "tourism"]). If omitted, searches common categories. limit: Maximum number of total results to return
Returns: Structured dictionary containing: - Original query parameters - Total count of places found - Results grouped by category and subcategory - Each place includes name, coordinates, and associated tags
Inputs: latitude (required), longitude (required), limit, radius, +1 more. Returns: result
find_parking_facilitiesA
Locate parking facilities near a specific location.
This tool finds parking options (lots, garages, street parking) near a specified location. Results can be filtered by parking type and include capacity information where available. Useful for trip planning, city navigation, and evaluating parking availability in urban areas.
Args: latitude: Center point latitude (decimal degrees) longitude: Center point longitude (decimal degrees) radius: Search radius in meters (defaults to 1000m/1km) parking_type: Optional filter for specific types of parking facilities ("surface", "underground", "multi-storey", etc.)
Returns: List of parking facilities with: - Name and type - Capacity information if available - Fee structure if available - Access restrictions - Distance from search point
Inputs: latitude (required), longitude (required), radius, parking_type. Returns: result
find_schools_nearbyB
Locate educational institutions near a specific location, filtered by education level.
This specialized search tool identifies schools, colleges, and other educational institutions within a specified distance from a location. Results can be filtered by education level (elementary, middle, high school, university, etc.). Essential for families evaluating neighborhoods or real estate purchases with education considerations.
Args: latitude: Center point latitude (decimal degrees) longitude: Center point longitude (decimal degrees) radius: Search radius in meters (defaults to 2000m/2km) education_levels: Optional list of specific education levels to filter by (e.g., ["elementary", "secondary", "university"])
Returns: List of educational institutions with: - Name and type - Distance from search point - Education levels offered - Contact information if available - Other relevant metadata
Inputs: latitude (required), longitude (required), radius, education_levels. Returns: result
geocode_addressA
Convert an address or place name to geographic coordinates with detailed location information.
This tool takes a text description of a location (such as an address, landmark name, or place of interest) and returns its precise geographic coordinates along with rich metadata. The results can be used for mapping, navigation, location-based analysis, and as input to other geospatial tools.
Args: address: The address, place name, landmark, or description to geocode (e.g., "Empire State Building", "123 Main St, Springfield", "Golden Gate Park, San Francisco")
Returns: List of matching locations with: - Geographic coordinates (latitude/longitude) - Formatted address - Administrative boundaries (city, state, country) - OSM type and ID - Bounding box (if applicable) - Importance ranking
Inputs: address (required). Returns: result
get_route_directionsA
Calculate detailed route directions between two geographic points.
This tool provides comprehensive routing information between two locations using OpenStreetMap/OSRM. The output can be minimized using the steps, overview, and annotations parameters to reduce the response size.
Args: from_latitude: Starting point latitude (decimal degrees) from_longitude: Starting point longitude (decimal degrees) to_latitude: Destination latitude (decimal degrees) to_longitude: Destination longitude (decimal degrees) ctx: Context (provided internally by MCP) mode: Transportation mode ("car", "bike", "foot") steps: Turn-by-turn instructions (True/False, Default: False) overview: Geometry output ("full", "simplified", "false"; Default: "simplified") annotations: Additional segment info (True/False, Default: False)
Returns: Dictionary with routing information (summary, directions, geometry, waypoints)
Example: { "from_latitude": 51.3334193, "from_longitude": 9.4540423, "to_latitude": 51.3295516, "to_longitude": 9.4576721, "mode": "car", "steps": false, "overview": "simplified", "annotations": false }
Inputs: to_latitude (required), to_longitude (required), from_latitude (required), from_longitude (required), +4 more. Returns: result
reverse_geocodeA
Convert geographic coordinates to a detailed address and location description.
This tool takes a specific point on Earth (latitude and longitude) and returns comprehensive information about that location, including its address, nearby landmarks, administrative boundaries, and other contextual information. Useful for translating GPS coordinates into human-readable locations.
Args: latitude: The latitude coordinate (decimal degrees, WGS84) longitude: The longitude coordinate (decimal degrees, WGS84)
Returns: Detailed address and location information including: - Formatted address - Building, street, city, state, country - Administrative hierarchy - OSM metadata - Postal code and other relevant identifiers
Inputs: latitude (required), longitude (required). Returns: result
search_categoryA
Search for specific types of places within a defined geographic area.
This tool allows targeted searches for places matching specific categories within a rectangular geographic region. It's particularly useful for filtering places by type (restaurants, schools, parks, etc.) within a neighborhood or city district. Results include complete location details and metadata about each matching place.
Args: category: Main OSM category to search for (e.g., "amenity", "shop", "tourism", "building") min_latitude: Southern boundary of search area (decimal degrees) min_longitude: Western boundary of search area (decimal degrees) max_latitude: Northern boundary of search area (decimal degrees) max_longitude: Eastern boundary of search area (decimal degrees) subcategories: Optional list of specific subcategories to filter by (e.g., ["restaurant", "cafe"])
Returns: Structured results including: - Query parameters - Count of matching places - List of matching places with coordinates, names, and metadata
Inputs: category (required), max_latitude (required), min_latitude (required), max_longitude (required), +2 more. Returns: result
suggest_meeting_pointA
Find the optimal meeting place for multiple people coming from different locations.
This tool calculates a central meeting point based on the locations of multiple individuals, then recommends suitable venues near that central point. Ideal for planning social gatherings, business meetings, or any situation where multiple people need to converge from different starting points.
Args: locations: List of dictionaries, each containing the latitude and longitude of a person's location Example: [{"latitude": 37.7749, "longitude": -122.4194}, {"latitude": 37.3352, "longitude": -121.8811}] venue_type: Type of venue to suggest as a meeting point. Options include: "cafe", "restaurant", "bar", "library", "park", etc.
Returns: Meeting point recommendations including: - Calculated center point coordinates - List of suggested venues with names and details - Total number of matching venues in the area
Inputs: locations (required), venue_type. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 12 tools
Several tools overlap substantially: explore_area, find_nearby_places, analyze_neighborhood, and search_category all return categorized POIs in an area, and find_schools_nearby, find_ev_charging_stations, and find_parking_facilities are essentially specialized subsets that find_nearby_places could handle. The descriptions help distinguish analysis-oriented tools (analyze_neighborhood, explore_area) from search-oriented ones, but an agent could still easily misselect among the area-search family.
Every tool follows a clean verb_noun pattern (explore_area, reverse_geocode, geocode_address, find_nearby_places, get_route_directions, search_category, suggest_meeting_point, analyze_commute, etc.). Verbs are consistent (find_/get_/analyze_/search_) and naming is fully snake_case with no deviations.
12 tools is a reasonable, well-scoped size for an OSM geospatial server covering geocoding, routing, search, and analysis. It's slightly heavy given the redundant specialized search tools, but nothing feels padded to the point of being unmanageable.
Core geospatial workflows are well covered: both geocoding directions, routing, POI/category search, area and neighborhood analysis, and specialized searches. Minor gaps exist (e.g., isochrones, elevation, map/static image generation, or boundary/administrative lookups), but agents can accomplish most realistic tasks.
Related MCP Connectors
Routing, geocoding, places, matrix and map tools for location-aware AI workflows.
Mobility, geocoding and nearby urban services for AI agents.
Geocode, reverse geocode, and run Overpass spatial queries on OpenStreetMap data.
Geocode, reverse geocode, and run Overpass spatial queries on OpenStreetMap data.
Related MCP Servers
AlicenseBqualityCmaintenanceEnables AI agents to become geospatially intelligent assistants with tools for location search, smart routing, round trip planning, reverse geocoding, isochrone analysis, route visualization, geofence management, and interactive map display.817 npm8Apache 2.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-
- 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
- AlicenseAqualityDmaintenanceAn OpenStreetMap MCP server providing geocoding, routing, points of interest, map tiles, public transport, and energy infrastructure tools to enhance LLM location-based capabilities.16MIT