Geospatial MCP server — give AI agents geocoding, routing, spatial ops, and OSM querying via the Model Context Protocol
Project description
mcp-geo
A geospatial MCP server that gives agents dependable GIS tools: geocoding, routing, OpenStreetMap queries, geometry operations, file inspection, raster sampling, elevation, isochrones, static maps, and workspace storage.
Why it exists
Geospatial work usually requires several specialized libraries and services.
mcp-geo packages common GIS operations behind stable MCP tools so an agent can
compose real spatial workflows instead of generating one-off scripts.
Example workflow:
geocodea place such as "Buriganga River, Dhaka".bufferthe returned point by 2 km.osm_featuresfor{"amenity": "hospital"}inside that area.distanceornearest_neighborto rank the results.static_maporsave_mapto create a visual preview.
Installation
pip install mcp-geo
For local GIS files:
pip install "mcp-geo[files,raster,visual]"
MCP client config
{
"mcpServers": {
"geo": {
"command": "uvx",
"args": ["mcp-geo"]
}
}
}
The default transport is stdio. HTTP and SSE are also available:
mcp-geo --http --host 127.0.0.1 --port 8000
mcp-geo --sse --host 127.0.0.1 --port 8000
Tools
Geometry
buffer, distance, area, length, centroid, simplify, convex_hull,
bbox, spatial_predicate, transform_crs, validate_geojson
Geocoding and OSM
geocode, reverse_geocode, build_overpass_query, osm_features,
overpass_query
Routing, elevation, and accessibility
route, route_matrix, nearest_road, elevation, elevation_profile,
isochrone
Files and rasters
vector_info, vector_read, raster_info, zonal_stats, sample_raster
Advanced workflows
build_spatial_index, spatial_query, spatial_join, cached_geocode,
batch_geocode, nearest_neighbor, repair_geometry, validate_geometry
Workspace and visualization
workspace_store, workspace_get, workspace_list, workspace_clear,
workspace_rename, static_map, save_map, suggest_tools, list_all_tools
Configuration
The server works without configuration by using public geospatial services. For production use, self-host high-volume providers where possible.
| Variable | Default | Description |
|---|---|---|
GEO_MCP_NOMINATIM_URL |
https://nominatim.openstreetmap.org |
Forward and reverse geocoding |
GEO_MCP_OSRM_URL |
https://router.project-osrm.org |
Routing and nearest-road lookup |
GEO_MCP_OVERPASS_URL |
https://overpass-api.de/api/interpreter |
OpenStreetMap feature queries |
GEO_MCP_ORS_API_KEY |
unset | OpenRouteService key for isochrones |
GEO_MCP_HTTP_RETRIES |
3 |
HTTP retry count |
mcp-geo sends a project-specific User-Agent and rate-limits Nominatim calls to
one request per second by default.
Development
git clone https://github.com/tabibhasann/geo-mcp.git
cd geo-mcp
uv sync --group dev
uv run ruff check src/ tests/
uv run mypy src/
uv run pytest
Optional GIS dependencies can be tested with:
uv sync --group dev --extra files --extra raster --extra visual
uv run pytest
Docker
docker build -t mcp-geo .
docker run --rm -p 8000:8000 mcp-geo mcp-geo --http --host 0.0.0.0 --port 8000
License
MIT
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 mcp_geo-0.3.0.tar.gz.
File metadata
- Download URL: mcp_geo-0.3.0.tar.gz
- Upload date:
- Size: 237.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5a3e4481115e7f5c949160126337181efe23e1566ccb2649d4407ffe46753234
|
|
| MD5 |
aae6647b89e9eb10735093aa8c46a113
|
|
| BLAKE2b-256 |
bebde30ca2d8964a21358636b5761cf60cf4330c93e69596d6281670557d6293
|
Provenance
The following attestation bundles were made for mcp_geo-0.3.0.tar.gz:
Publisher:
publish.yml on tabibhasann/geo-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcp_geo-0.3.0.tar.gz -
Subject digest:
5a3e4481115e7f5c949160126337181efe23e1566ccb2649d4407ffe46753234 - Sigstore transparency entry: 1769050519
- Sigstore integration time:
-
Permalink:
tabibhasann/geo-mcp@65d3306103f6a7f7d6f45777ad543359f9a935e0 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/tabibhasann
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@65d3306103f6a7f7d6f45777ad543359f9a935e0 -
Trigger Event:
push
-
Statement type:
File details
Details for the file mcp_geo-0.3.0-py3-none-any.whl.
File metadata
- Download URL: mcp_geo-0.3.0-py3-none-any.whl
- Upload date:
- Size: 32.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
527568349c1f13283b74afcd2cd93a309693d493eaf288a1a5cff2ced5680d75
|
|
| MD5 |
88d02f41644c8a25c8f734fde59a28c7
|
|
| BLAKE2b-256 |
4b8e931612da69eb7df4dafc6342d0bf069a6e362147921b5296f94a35c004a0
|
Provenance
The following attestation bundles were made for mcp_geo-0.3.0-py3-none-any.whl:
Publisher:
publish.yml on tabibhasann/geo-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
mcp_geo-0.3.0-py3-none-any.whl -
Subject digest:
527568349c1f13283b74afcd2cd93a309693d493eaf288a1a5cff2ced5680d75 - Sigstore transparency entry: 1769050630
- Sigstore integration time:
-
Permalink:
tabibhasann/geo-mcp@65d3306103f6a7f7d6f45777ad543359f9a935e0 -
Branch / Tag:
refs/tags/v0.3.0 - Owner: https://github.com/tabibhasann
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@65d3306103f6a7f7d6f45777ad543359f9a935e0 -
Trigger Event:
push
-
Statement type: