Skip to main content
Glama
OSM MCP Analytics Server

OSM MCP Analytics Server

by neco001

Enterprise OpenStreetMap (OSM) MCP Analytics Server

A modular, high-performance Model Context Protocol (MCP) server for OpenStreetMap. This implementation goes beyond simple geocoding, providing advanced geospatial analytics like neighborhood livability scoring and commute analysis.

πŸš€ Why this server?

While there are many OSM MCP servers, this version is built for stability, modular extension, and advanced insights:

  • Modular Architecture: Clean separation between API Client, Utility logic, and Tool definitions. Easy to audit and extend.

  • Enterprise Analytics:

    • analyze_neighborhood: Calculates a "Livability Score" based on walking proximity to essential services (groceries, healthcare, parks).

    • analyze_commute: Multi-modal comparison of travel times (car, bike, foot) for lifestyle planning.

  • Efficient: Uses FastMCP for asynchronous I/O and structured tool registration.

  • Windows Optimized: Built and tested to run reliably as a background process on Windows environments.

Related MCP server: chuk-mcp-geocoder

πŸ›  Features

Core Tools

  • Geocoding: geocode_address, reverse_geocode

  • Routing: get_route_directions (OSRM based)

  • Search: find_nearby_places, search_category

  • Analytics: explore_area, analyze_neighborhood, analyze_commute

Specialized Tools (Optional)

Found in tools/extras.py (not loaded by default for performance):

  • find_schools_nearby

  • find_ev_charging_stations

  • find_parking_facilities

  • suggest_meeting_point

Resources

  • location://place/{query}: Real-time place metadata.

  • location://map/{style}/{z}/{x}/{y}: Interactive map tile retrieval.

πŸ“¦ Installation

Requirements

  • Python 3.10+

  • uv (recommended) or pip

Method 1: Via MCP Config (Claude/Cursor)

Add this to your mcp_config.json:

{
  "mcpServers": {
    "osm-mcp": {
      "command": "python",
      "args": [
        "c:/path/to/osm-mcp-server/src/openstreetmap_mcp/server.py"
      ],
      "env": {
        "PYTHONPATH": "c:/path/to/osm-mcp-server/src/openstreetmap_mcp"
      }
    }
  }
}

Method 2: Local Development

git clone https://github.com/neco001/openstreetmap-mcp
cd openstreetmap-mcp
uv sync

πŸ“‚ Project Structure

src/openstreetmap_mcp/
β”œβ”€β”€ server.py           # Main Entry Point
β”œβ”€β”€ instance.py         # FastMCP lifecycle
β”œβ”€β”€ client.py           # HTTP logic for OSM/OSRM/Overpass
β”œβ”€β”€ utils.py            # Haversine & geometric helpers
β”œβ”€β”€ tools/              # Categorized tool definitions
β”‚   β”œβ”€β”€ geocoding.py
β”‚   β”œβ”€β”€ routing.py
β”‚   β”œβ”€β”€ search.py
β”‚   └── analysis.py
└── resources.py        # Map & Data resources

βš–οΈ License

MIT License - feel free to use, modify and distribute.

Acknowledgments

Original logic & concepts by Jagan Shanmugam. This repository is a modular refactor focused on Enterprise usage, Windows compatibility, and Analytics tools.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Geospatial API tools for AI agents β€” geocoding, reverse geocoding, routing, isochrone, distance matrix, static maps, H3 hexagons, elevation, GPS map-matching, point-in-polygon, address normalisation, timezone lookup, and batch geocoding. Built on OpenStreetMap infrastructure. Cost-effective alternative to Google Maps API.
      18
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Provides forward/reverse geocoding, bounding box extraction, nearby places discovery, batch geocoding, route waypoints, and administrative boundary lookup using OpenStreetMap data.
      10
      Apache 2.0
    • A
      license
      A
      quality
      B
      maintenance
      A read-only MCP server for OpenStreetMap offering geocoding, routing, route optimization, isochrones, and POI searchβ€”requiring no API key and built for AI travel planning.
      11
      561 npm
      6
      MIT