Skip to main content

A modular, enterprise-grade OpenStreetMap MCP server with advanced geospatial analytics.

Project description

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.

🛠 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

openstreetmap_mcp-1.0.1.tar.gz (909.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

openstreetmap_mcp-1.0.1-py3-none-any.whl (21.8 kB view details)

Uploaded Python 3

File details

Details for the file openstreetmap_mcp-1.0.1.tar.gz.

File metadata

  • Download URL: openstreetmap_mcp-1.0.1.tar.gz
  • Upload date:
  • Size: 909.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for openstreetmap_mcp-1.0.1.tar.gz
Algorithm Hash digest
SHA256 75736c7320fdbaa21c31d3051a682055ad6d74897497b3fc43b625ee165fc556
MD5 aee9d45332bcd47bd820616a7fe44615
BLAKE2b-256 103b4fc6f20e9966991944e9826ee2fde076648099e926ba8889636e7e9eb815

See more details on using hashes here.

Provenance

The following attestation bundles were made for openstreetmap_mcp-1.0.1.tar.gz:

Publisher: publish-to-pypi.yml on neco001/openstreetmap-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file openstreetmap_mcp-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for openstreetmap_mcp-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 391b9171ea5e5501e7b48c56ce8651c65db66abfca7399c267671ffd48bc3561
MD5 ab64f9603cd8ce2938b333f8eb0e4c32
BLAKE2b-256 5ed4e7db8e3f67710577d683c9cf777176b59a2984042253cf255942827b4cf1

See more details on using hashes here.

Provenance

The following attestation bundles were made for openstreetmap_mcp-1.0.1-py3-none-any.whl:

Publisher: publish-to-pypi.yml on neco001/openstreetmap-mcp

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page