An OpenStreetMap MCP server implementation that enhances LLM capabilities with location-based services and geospatial data. - osm-mcp-server: The main server, available for public use. 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
Add this skill
npx mdskills install jagan-shanmugam/open-streetmap-mcpComprehensive geospatial toolkit with excellent tool variety and clear documentation
1# OpenStreetMap (OSM) MCP Server23An OpenStreetMap MCP server implementation that enhances LLM capabilities with location-based services and geospatial data.45## Demo67### Meeting Point Optimization8910### Neighborhood Analysis111213### Parking Search14151617## Installation1819### In MCP Hosts like Claude Desktop, Cursor, Windsurf, etc.20- `osm-mcp-server`: The main server, available for public use.2122 ```json23 "mcpServers": {24 "osm-mcp-server": {25 "command": "uvx",26 "args": [27 "osm-mcp-server"28 ]29 }30 }31 ```3233## Features3435This server provides LLMs with tools to interact with OpenStreetMap data, enabling location-based applications to:3637- Geocode addresses and place names to coordinates38- Reverse geocode coordinates to addresses39- Find nearby points of interest40- Get route directions between locations41- Search for places by category within a bounding box42- Suggest optimal meeting points for multiple people43- Explore areas and get comprehensive location information44- Find schools and educational institutions near a location45- Analyze commute options between home and work46- Locate EV charging stations with connector and power filtering47- Perform neighborhood livability analysis for real estate48- Find parking facilities with availability and fee information4950## Components5152### Resources5354The server implements location-based resources:55- `location://place/{query}`: Get information about places by name or address56- `location://map/{style}/{z}/{x}/{y}`: Get styled map tiles at specified coordinates5758### Tools5960The server implements several geospatial tools:61- `geocode_address`: Convert text to geographic coordinates62- `reverse_geocode`: Convert coordinates to human-readable addresses63- `find_nearby_places`: Discover points of interest near a location64- `get_route_directions`: Get turn-by-turn directions between locations65- `search_category`: Find places of specific categories in an area66- `suggest_meeting_point`: Find optimal meeting spots for multiple people67- `explore_area`: Get comprehensive data about a neighborhood68- `find_schools_nearby`: Locate educational institutions near a specific location69- `analyze_commute`: Compare transportation options between home and work70- `find_ev_charging_stations`: Locate EV charging infrastructure with filtering71- `analyze_neighborhood`: Evaluate neighborhood livability for real estate72- `find_parking_facilities`: Locate parking options near a destination737475## Local Testing7677### Running the Server7879To run the server locally:80811. Install the package in development mode:8283```bash84pip install -e .85```86872. Start the server:8889```bash90osm-mcp-server91```92933. The server will start and listen for MCP requests on the standard input/output.9495### Testing with Example Clients9697The repository includes two example clients in the `examples/` directory:9899#### Basic Client Example100101`client.py` demonstrates basic usage of the OSM MCP server:102103```bash104python examples/client.py105```106107This will:108- Connect to the locally running server109- Get information about San Francisco110- Search for restaurants in the area111- Retrieve comprehensive map data with progress tracking112113#### LLM Integration Example114115`llm_client.py` provides a helper class designed for LLM integration:116117```bash118python examples/llm_client.py119```120121This example shows how an LLM can use the Location Assistant to:122- Get location information from text queries123- Find nearby points of interest124- Get directions between locations125- Find optimal meeting points126- Explore neighborhoods127128### Writing Your Own Client129130To create your own client:1311321. Import the MCP client:133```python134from mcp.client import Client135```1361372. Initialize the client with your server URL:138```python139client = Client("http://localhost:8000")140```1411423. Invoke tools or access resources:143```python144# Example: Geocode an address145results = await client.invoke_tool("geocode_address", {"address": "New York City"})146```147148#### Claude Desktop config for local server149150On MacOS: `~/Library/Application\ Support/Claude/claude_desktop_config.json`151On Windows: `%APPDATA%/Claude/claude_desktop_config.json`152153<details>154 <summary>Development/Unpublished Servers Configuration</summary>155156 ```json157 "mcpServers": {158 "osm-mcp-server": {159 "command": "uv",160 "args": [161 "--directory",162 "/path/to/osm-mcp-server",163 "run",164 "osm-mcp-server"165 ]166 }167 }168 ```169</details>170171172173## Development174175### Building and Publishing176177To prepare the package for distribution:1781791. Sync dependencies and update lockfile:180```bash181uv sync182```1831842. Build package distributions:185```bash186uv build187```188189This will create source and wheel distributions in the `dist/` directory.1901913. Publish to PyPI:192```bash193uv publish194```195196Note: You'll need to set PyPI credentials via environment variables or command flags.197198### Debugging199200Since MCP servers run over stdio, debugging can be challenging. For the best debugging201experience, we strongly recommend using the [MCP Inspector](https://github.com/modelcontextprotocol/inspector).202203You can launch the MCP Inspector via [`npm`](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) with this command:204205```bash206npx @modelcontextprotocol/inspector uv --directory /path/to/osm-mcp-server run osm-mcp-server207```208209Upon launching, the Inspector will display a URL that you can access in your browser to begin debugging.210211212213214
Full transparency — inspect the skill content before installing.