mcp-geo
v0.3.0Geospatial MCP server — give AI agents geocoding, routing, spatial ops, and OSM querying via the Model Context Protocol
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
buffer
Buffer a Geometry by a distance in metres. Auto-picks the correct UTM zone, buffers in metre-space, and reprojects back to WGS84 GeoJSON.
| Parameter | Type | Description |
|---|---|---|
distance_m * | number | |
geojson * | string | |
quad_segs | integer |
distance
Geodesic centroid-to-centroid distance between two GeoJSON geometries.
| Parameter | Type | Description |
|---|---|---|
geojson_a * | string | |
geojson_b * | string | |
unit | string |
area
Geodesic area of a GeoJSON geometry on the WGS84 ellipsoid.
| Parameter | Type | Description |
|---|---|---|
geojson * | string | |
unit | string |
length
Geodesic length/perimeter of a GeoJSON geometry on the WGS84 ellipsoid.
| Parameter | Type | Description |
|---|---|---|
geojson * | string | |
unit | string |
centroid
Return the centroid of a GeoJSON geometry as a GeoJSON Point.
| Parameter | Type | Description |
|---|---|---|
geojson * | string |
simplify
Simplify a GeoJSON geometry using the Douglas-Peucker algorithm.
| Parameter | Type | Description |
|---|---|---|
geojson * | string | |
tolerance * | number | |
topology | boolean |
convex_hull
Return the convex hull of a GeoJSON geometry.
| Parameter | Type | Description |
|---|---|---|
geojson * | string |
bbox
Return the bounding box [minx, miny, maxx, maxy] of a GeoJSON geometry.
| Parameter | Type | Description |
|---|---|---|
geojson * | string |
spatial_predicate
Check a spatial relationship between two GeoJSON geometries. Supported operations: intersects, within, contains, touches, overlaps, crosses, disjoint, equals.
| Parameter | Type | Description |
|---|---|---|
geojson_a * | string | |
geojson_b * | string | |
op * | string |
transform_crs
Reproject a GeoJSON geometry from one coordinate reference system to another. Uses EPSG codes (e.g., 'EPSG:4326', 'EPSG:3857') or PROJ strings.
| Parameter | Type | Description |
|---|---|---|
from_crs * | string | |
geojson * | string | |
to_crs * | string |
validate_geojson
Validate a GeoJSON geometry and attempt repair if invalid. Returns: {valid, errors?, repaired}
| Parameter | Type | Description |
|---|---|---|
geojson * | string |
geocode
Forward geocode an address or place name to coordinates. Returns a list of matches with name, lat, lon, bounding box, OSM type, and importance score, sorted most relevant first.
| Parameter | Type | Description |
|---|---|---|
query * | string | |
countrycodes | ||
limit | integer |
reverse_geocode
Reverse geocode coordinates to the nearest address or place. Returns a structured address and display name.
| Parameter | Type | Description |
|---|---|---|
lat * | number | |
lon * | number | |
zoom | integer |
build_overpass_query
Build a safe Overpass QL query string (no network call). area can be: - A bbox: [south, west, north, east] - A place name like "Dhaka, Bangladesh" (resolved via geocoding first) - A GeoJSON polygon string (will be serialized as poly) tags are OSM tag key-value pairs, e.g., {"amenity": "hospital"}. element_types: ["node", "way", "relation"] (default: all three).
| Parameter | Type | Description |
|---|---|---|
area * | ||
tags * | object | |
element_types |
osm_features
Find OSM features matching tags within an area. area: bbox [s,w,n,e] as JSON string, place name string, or GeoJSON polygon. tags: JSON object of OSM tag key-value pairs, e.g., '{"amenity":"hospital"}'. Returns a GeoJSON FeatureCollection. Features: - Automatic bbox splitting for large areas (avoids Overpass limits) - Shared HTTP retry transport - Result validation and warnings
| Parameter | Type | Description |
|---|---|---|
area * | string | |
tags * | string | |
limit | integer |
overpass_query
Execute a raw Overpass QL query and return results as a GeoJSON FeatureCollection. Power-user escape hatch — use build_overpass_query for safe query construction.
| Parameter | Type | Description |
|---|---|---|
ql_string * | string | |
limit | integer |
route
Compute a route between waypoints. coordinates: JSON array of [lon, lat] pairs (at least 2). profile: "driving", "walking", or "cycling". Returns distance (metres), duration (seconds), and the route geometry as GeoJSON.
| Parameter | Type | Description |
|---|---|---|
coordinates * | ||
profile | string |
route_matrix
Compute a duration/distance matrix between source and destination points. sources: JSON array of [lon, lat] source locations. destinations: JSON array of [lon, lat] destination locations. profile: "driving", "walking", or "cycling". Returns {durations: [[s]], distances: [[m]]}.
| Parameter | Type | Description |
|---|---|---|
destinations * | ||
sources * | ||
profile | string |
nearest_road
Snap a coordinate to the nearest road. Returns {lat, lon, name} of the nearest road.
| Parameter | Type | Description |
|---|---|---|
lat * | number | |
lon * | number | |
profile | string |
elevation
Get elevation (metres above sea level) for a coordinate. Uses the Open-Elevation public API (free, no key required). Returns {lat, lon, elevation_m}.
| Parameter | Type | Description |
|---|---|---|
lat * | number | |
lon * | number |
elevation_profile
Get elevation at multiple points along a path. coordinates: JSON array of [lon, lat] pairs. Returns a list of {lat, lon, elevation_m} for each point.
| Parameter | Type | Description |
|---|---|---|
coordinates * | string |
isochrone
Compute an isochrone (reachable area) from a point. Args: lat: Latitude of the starting point. lon: Longitude of the starting point. range_value: Range limit. For time: seconds (default 300 = 5 min). For distance: metres (default 300 m). range_type: "time" (seconds) or "distance" (metres). profile: Routing profile. Options: "driving-car", "driving-hgv", "foot-walking", "foot-hiking", "cycling-regular", "cycling-road", "cycling-mountain", "cycling-electric", "wheelchair". Returns:…
| Parameter | Type | Description |
|---|---|---|
lat * | number | |
lon * | number | |
profile | string | |
range_type | string | |
range_value | number |
vector_info
Get metadata about a vector file (Shapefile, GeoJSON, GeoPackage, etc.). Returns: {driver, crs, feature_count, geometry_types, fields, bbox, layers}.
| Parameter | Type | Description |
|---|---|---|
path * | string |
vector_read
Read features from a vector file as a GeoJSON FeatureCollection. Supports optional bounding box and attribute filters.
| Parameter | Type | Description |
|---|---|---|
path * | string | |
bbox | ||
layer | ||
limit | integer | |
where |
raster_info
Get metadata about a raster file. Returns: {crs, bands, width, height, bounds, res, nodata, dtype}.
| Parameter | Type | Description |
|---|---|---|
path * | string |
zonal_stats
Compute zonal statistics for polygon zones against a raster. stats: list of stat names, e.g. ["min", "max", "mean", "count"]. Returns a list of dicts, one per zone.
| Parameter | Type | Description |
|---|---|---|
raster_path * | string | |
zones_geojson * | string | |
stats |
sample_raster
Sample raster values at point locations. points_geojson: GeoJSON Point or MultiPoint geometry. Returns a list of point coordinates and sampled values.
| Parameter | Type | Description |
|---|---|---|
path * | string | |
points_geojson * | string |
build_spatial_index
Build a Shapely STRtree spatial index for a GeoJSON FeatureCollection.
| Parameter | Type | Description |
|---|---|---|
geojson_collection * | string |
spatial_query
Query a GeoJSON FeatureCollection using spatial predicates.
| Parameter | Type | Description |
|---|---|---|
geojson_collection * | string | |
query_geojson * | string | |
predicate | string |
spatial_join
Join point features to the first polygon that contains each point.
| Parameter | Type | Description |
|---|---|---|
points_geojson * | string | |
polygons_geojson * | string |
cached_geocode
Geocode an address and cache the result in memory for this server process.
| Parameter | Type | Description |
|---|---|---|
address * | string | |
limit | integer |
batch_geocode
Geocode multiple addresses with cache metadata for each item.
| Parameter | Type | Description |
|---|---|---|
addresses * | array | |
limit | integer |
nearest_neighbor
Find the nearest features to a query geometry.
| Parameter | Type | Description |
|---|---|---|
candidates_geojson * | string | |
query_geojson * | string | |
k | integer |
repair_geometry
Repair an invalid geometry using Shapely's zero-width buffer fallback.
| Parameter | Type | Description |
|---|---|---|
geojson * | string |
validate_geometry
Validate a geometry and report issues that a caller can act on.
| Parameter | Type | Description |
|---|---|---|
geojson * | string |
static_map
Render GeoJSON as a base64-encoded PNG.
| Parameter | Type | Description |
|---|---|---|
geojson * | string | |
center | ||
height | integer | |
style | string | |
width | integer | |
zoom |
save_map
Render GeoJSON and save it as a PNG file.
| Parameter | Type | Description |
|---|---|---|
geojson * | string | |
output_path * | string | |
height | integer | |
style | string | |
width | integer |
workspace_store
Store JSON data for later use in this server process.
| Parameter | Type | Description |
|---|---|---|
data * | string | |
name * | string | |
description |
workspace_get
Retrieve a stored item by name.
| Parameter | Type | Description |
|---|---|---|
name * | string |
workspace_list
List stored workspace items.
workspace_clear
Clear one stored item, or the entire workspace when no name is provided.
| Parameter | Type | Description |
|---|---|---|
name |
workspace_rename
Rename a stored workspace item.
| Parameter | Type | Description |
|---|---|---|
new_name * | string | |
old_name * | string |
suggest_tools
Suggest relevant tools for a natural-language geospatial task.
| Parameter | Type | Description |
|---|---|---|
task_description * | string | |
context |
list_all_tools
Return the full tool catalog grouped by category.