Skip to content
Back to search

open-streetmap-mcp

An OpenStreetMap MCP server implementation that enhances LLM capabilities with location-based services and geospatial data.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/jagan-shanmugam--open-streetmap-mcp/badge.svg)](/listings/jagan-shanmugam--open-streetmap-mcp)

HTML

<a href="/listings/jagan-shanmugam--open-streetmap-mcp"><img src="/api/listings/jagan-shanmugam--open-streetmap-mcp/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

In MCP Hosts like Claude Desktop, Cursor, Windsurf, etc.

- `osm-mcp-server`: The main server, available for public use.

  "mcpServers": {
    "osm-mcp-server": {
      "command": "uvx",
      "args": [
        "osm-mcp-server"
      ]
    }
  }

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 213 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # OpenStreetMap (OSM) MCP Server
  2. An OpenStreetMap MCP server implementation that enhances LLM capabilities with location-based services and geospatial data.
  3. ## Demo
  4. ### Meeting Point Optimization
  5. ![Meeting Point Use Case](demo/use-case-meeting.gif)
  6. ### Neighborhood Analysis
  7. ![Neighborhood Analysis Use Case](demo/use-case-neighborhood.gif)
  8. ### Parking Search
  9. ![Parking Search Use Case](demo/use-case-parking.gif)
  10. ## Installation
  11. ### In MCP Hosts like Claude Desktop, Cursor, Windsurf, etc.
  12. - `osm-mcp-server`: The main server, available for public use.
  13. ```json
  14. "mcpServers": {
  15. "osm-mcp-server": {
  16. "command": "uvx",
  17. "args": [
  18. "osm-mcp-server"
  19. ]
  20. }
  21. }
  22. ```
  23. ## Features
  24. This server provides LLMs with tools to interact with OpenStreetMap data, enabling location-based applications to:
  25. - Geocode addresses and place names to coordinates
  26. - Reverse geocode coordinates to addresses
  27. - Find nearby points of interest
  28. - Get route directions between locations
  29. - Search for places by category within a bounding box
  30. - Suggest optimal meeting points for multiple people
  31. - Explore areas and get comprehensive location information
  32. - Find schools and educational institutions near a location
  33. - Analyze commute options between home and work
  34. - Locate EV charging stations with connector and power filtering
  35. - Perform neighborhood livability analysis for real estate
  36. - Find parking facilities with availability and fee information
  37. ## Components
  38. ### Resources
  39. The server implements location-based resources:
  40. - `location://place/{query}`: Get information about places by name or address
  41. - `location://map/{style}/{z}/{x}/{y}`: Get styled map tiles at specified coordinates
  42. ### Tools
  43. The server implements several geospatial tools:
  44. - `geocode_address`: Convert text to geographic coordinates
  45. - `reverse_geocode`: Convert coordinates to human-readable addresses
  46. - `find_nearby_places`: Discover points of interest near a location
  47. - `get_route_directions`: Get turn-by-turn directions between locations
  48. - `search_category`: Find places of specific categories in an area
  49. - `suggest_meeting_point`: Find optimal meeting spots for multiple people
  50. - `explore_area`: Get comprehensive data about a neighborhood
  51. - `find_schools_nearby`: Locate educational institutions near a specific location
  52. - `analyze_commute`: Compare transportation options between home and work
  53. - `find_ev_charging_stations`: Locate EV charging infrastructure with filtering
  54. - `analyze_neighborhood`: Evaluate neighborhood livability for real estate
  55. - `find_parking_facilities`: Locate parking options near a destination
  56. ## Local Testing
  57. ### Running the Server
  58. To run the server locally:
  59. 1. Install the package in development mode:
  60. ```bash
  61. pip install -e .
  62. ```
  63. 2. Start the server:
  64. ```bash
  65. osm-mcp-server
  66. ```
  67. 3. The server will start and listen for MCP requests on the standard input/output.
  68. ### Testing with Example Clients
  69. The repository includes two example clients in the `examples/` directory:
  70. #### Basic Client Example
  71. `client.py` demonstrates basic usage of the OSM MCP server:
  72. ```bash
  73. python examples/client.py
  74. ```
  75. This will:
  76. - Connect to the locally running server
  77. - Get information about San Francisco
  78. - Search for restaurants in the area
  79. - Retrieve comprehensive map data with progress tracking
  80. #### LLM Integration Example
  81. `llm_client.py` provides a helper class designed for LLM integration:
  82. ```bash
  83. python examples/llm_client.py
  84. ```
  85. This example shows how an LLM can use the Location Assistant to:
  86. - Get location information from text queries
  87. - Find nearby points of interest
  88. - Get directions between locations
  89. - Find optimal meeting points
  90. - Explore neighborhoods
  91. ### Writing Your Own Client
  92. To create your own client:
  93. 1. Import the MCP client:
  94. ```python
  95. from mcp.client import Client
  96. ```
  97. 2. Initialize the client with your server URL:
  98. ```python
  99. client = Client("http://localhost:8000")
  100. ```
  101. 3. Invoke tools or access resources:
  102. ```python
  103. # Example: Geocode an address
  104. results = await client.invoke_tool("geocode_address", {"address": "New York City"})
  105. ```
  106. #### Claude Desktop config for local server
  107. On MacOS: `~/Library/Application\ Support/Claude/claude_desktop_config.json`
  108. On Windows: `%APPDATA%/Claude/claude_desktop_config.json`
  109. <details>
  110. <summary>Development/Unpublished Servers Configuration</summary>
  111. ```json
  112. "mcpServers": {
  113. "osm-mcp-server": {
  114. "command": "uv",
  115. "args": [
  116. "--directory",
  117. "/path/to/osm-mcp-server",
  118. "run",
  119. "osm-mcp-server"
  120. ]
  121. }
  122. }
  123. ```
  124. </details>
  125. ## Development
  126. ### Building and Publishing
  127. To prepare the package for distribution:
  128. 1. Sync dependencies and update lockfile:
  129. ```bash
  130. uv sync
  131. ```
  132. 2. Build package distributions:
  133. ```bash
  134. uv build
  135. ```
  136. This will create source and wheel distributions in the `dist/` directory.
  137. 3. Publish to PyPI:
  138. ```bash
  139. uv publish
  140. ```
  141. Note: You'll need to set PyPI credentials via environment variables or command flags.
  142. ### Debugging
  143. Since MCP servers run over stdio, debugging can be challenging. For the best debugging
  144. experience, we strongly recommend using the [MCP Inspector](https://github.com/modelcontextprotocol/inspector).
  145. You can launch the MCP Inspector via [`npm`](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) with this command:
  146. ```bash
  147. npx @modelcontextprotocol/inspector uv --directory /path/to/osm-mcp-server run osm-mcp-server
  148. ```
  149. Upon launching, the Inspector will display a URL that you can access in your browser to begin debugging.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.