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_nearbyfind_ev_charging_stationsfind_parking_facilitiessuggest_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) orpip
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
75736c7320fdbaa21c31d3051a682055ad6d74897497b3fc43b625ee165fc556
|
|
| MD5 |
aee9d45332bcd47bd820616a7fe44615
|
|
| BLAKE2b-256 |
103b4fc6f20e9966991944e9826ee2fde076648099e926ba8889636e7e9eb815
|
Provenance
The following attestation bundles were made for openstreetmap_mcp-1.0.1.tar.gz:
Publisher:
publish-to-pypi.yml on neco001/openstreetmap-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
openstreetmap_mcp-1.0.1.tar.gz -
Subject digest:
75736c7320fdbaa21c31d3051a682055ad6d74897497b3fc43b625ee165fc556 - Sigstore transparency entry: 915081750
- Sigstore integration time:
-
Permalink:
neco001/openstreetmap-mcp@a25c80024a1cb56cd35d6c8cba0046352cd20537 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/neco001
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@a25c80024a1cb56cd35d6c8cba0046352cd20537 -
Trigger Event:
push
-
Statement type:
File details
Details for the file openstreetmap_mcp-1.0.1-py3-none-any.whl.
File metadata
- Download URL: openstreetmap_mcp-1.0.1-py3-none-any.whl
- Upload date:
- Size: 21.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
391b9171ea5e5501e7b48c56ce8651c65db66abfca7399c267671ffd48bc3561
|
|
| MD5 |
ab64f9603cd8ce2938b333f8eb0e4c32
|
|
| BLAKE2b-256 |
5ed4e7db8e3f67710577d683c9cf777176b59a2984042253cf255942827b4cf1
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
openstreetmap_mcp-1.0.1-py3-none-any.whl -
Subject digest:
391b9171ea5e5501e7b48c56ce8651c65db66abfca7399c267671ffd48bc3561 - Sigstore transparency entry: 915081814
- Sigstore integration time:
-
Permalink:
neco001/openstreetmap-mcp@a25c80024a1cb56cd35d6c8cba0046352cd20537 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/neco001
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@a25c80024a1cb56cd35d6c8cba0046352cd20537 -
Trigger Event:
push
-
Statement type: