mahdin75/gis-mcp
If you are the rightful owner of gis-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
GIS MCP Server connects LLMs to GIS operations, enabling AI assistants to perform geospatial operations and transformations.
GIS MCP Server
✨ Want to perform accurate geospatial analysis in your chatbot? ✨
Install GIS-MCP and transform your AI's spatial capabilities!
A Model Context Protocol (MCP) server implementation that connects Large Language Models (LLMs) to GIS operations using GIS libraries, enabling AI assistants to perform geospatial operations and transformations.
🌐 Website: gis-mcp.com
Alpha
Version 0.6.0 (Beta) is under active development. We welcome contributions and developers to join us in building this project.
🎥 Demo
Rasterio Demo
📋 Table of Contents
- Features
- Prerequisites
- Installation
- Available Functions
- Client Development
- Planned Features
- Contributing
- License
- Related Projects
- Support
- Badges
🚀 Features
GIS MCP Server empowers AI assistants with advanced geospatial intelligence. Key features include:
- 🔹 Comprehensive Geometry Operations – Perform intersection, union, buffer, difference, and other geometric transformations with ease.
- 🔹 Advanced Coordinate Transformations – Effortlessly reproject and transform geometries between coordinate reference systems.
- 🔹 Accurate Measurements – Compute distances, areas, lengths, and centroids precisely.
- 🔹 Spatial Analysis & Validation – Validate geometries, run proximity checks, and perform spatial overlays or joins.
- 🔹 Raster & Vector Support – Process raster layers, compute indices like NDVI, clip, resample, and merge with vector data.
- 🔹 Spatial Statistics & Modeling – Leverage PySAL for spatial autocorrelation, clustering, and neighborhood analysis.
- 🔹 Easy Integration – Connect seamlessly with MCP-compatible clients like Claude Desktop or Cursor IDE.
- 🔹 Flexible & Extensible – Supports Python-based GIS libraries and is ready for custom tools or workflow extensions.
🌟 Tip: With GIS MCP Server, your AI can now “think spatially,” unlocking new capabilities for environmental analysis, mapping, and location intelligence.
📋 Prerequisites
- Python 3.10 or higher
- MCP-compatible client (like Claude Desktop or Cursor)
- Internet connection for package installation
🛠 Installation
Choose the installation method that best suits your needs:
🛠 Installing via Smithery
To install GIS MCP Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @mahdin75/gis-mcp --client claude
📦 pip Installation
The pip installation is recommended for most users:
- Install uv package manager:
pip install uv
- Create the Virtual Environment (Python 3.10+):
uv venv --python=3.10
- Install the package:
uv pip install gis-mcp
- Start the server:
gis-mcp
pip Configuration
To use the pip installation with Claude or Cursor, add the following configuration:
Claude Desktop:
Windows:
{
"mcpServers": {
"gis-mcp": {
"command": "C:\\Users\\YourUsername\\.venv\\Scripts\\gis-mcp",
"args": []
}
}
}
Linux/Mac:
{
"mcpServers": {
"gis-mcp": {
"command": "/home/YourUsername/.venv/bin/gis-mcp",
"args": []
}
}
}
Cursor IDE (create .cursor/mcp.json
):
Windows:
{
"mcpServers": {
"gis-mcp": {
"command": "C:\\Users\\YourUsername\\.venv\\Scripts\\gis-mcp",
"args": []
}
}
}
Linux/Mac:
{
"mcpServers": {
"gis-mcp": {
"command": "/home/YourUsername/.venv/bin/gis-mcp",
"args": []
}
}
}
After configuration:
- Make sure to replace
YourUsername
with your actual username - For development installation, replace
/path/to/gis-mcp
with the actual path to your project - Restart your IDE to apply the changes
- You can now use all GIS operations through Claude or Cursor!
🛠 Development Installation
For contributors and developers:
- Install uv package manager:
pip install uv
- Create the Virtual Environment:
uv venv --python=3.10
- Install the package in development mode:
uv pip install -e .
- Start the server:
python -m gis_mcp
Development Configuration
To use the development installation with Claude or Cursor, add the following configuration:
Claude Desktop:
Windows:
{
"mcpServers": {
"gis-mcp": {
"command": "C:\\path\\to\\gis-mcp\\.venv\\Scripts\\python",
"args": ["-m", "gis_mcp"]
}
}
}
Linux/Mac:
{
"mcpServers": {
"gis-mcp": {
"command": "/path/to/gis-mcp/.venv/bin/python",
"args": ["-m", "gis_mcp"]
}
}
}
Cursor IDE (create .cursor/mcp.json
):
Windows:
{
"mcpServers": {
"gis-mcp": {
"command": "C:\\path\\to\\gis-mcp\\.venv\\Scripts\\python",
"args": ["-m", "gis_mcp"]
}
}
}
Linux/Mac:
{
"mcpServers": {
"gis-mcp": {
"command": "/path/to/gis-mcp/.venv/bin/python",
"args": ["-m", "gis_mcp"]
}
}
}
After configuration:
- Make sure to replace
YourUsername
with your actual username - For development installation, replace
/path/to/gis-mcp
with the actual path to your project - Restart your IDE to apply the changes
- You can now use all GIS operations through Claude or Cursor!
📚 Available Functions
This section provides a comprehensive list of all available functions organized by library.
🔷 Shapely Functions (29 total)
Basic Geometric Operations:
buffer
- Create buffer around geometryintersection
- Find intersection of two geometriesunion
- Combine two geometriesdifference
- Find difference between geometriessymmetric_difference
- Find symmetric difference
Geometric Properties:
convex_hull
- Calculate convex hullenvelope
- Get bounding boxminimum_rotated_rectangle
- Get minimum rotated rectangleget_centroid
- Get centroid pointget_bounds
- Get geometry boundsget_coordinates
- Extract coordinate arrayget_geometry_type
- Get geometry type name
Transformations:
rotate_geometry
- Rotate geometry by anglescale_geometry
- Scale geometry by factorstranslate_geometry
- Move geometry by offset
Advanced Operations:
triangulate_geometry
- Create triangulationvoronoi
- Create Voronoi diagramunary_union_geometries
- Union multiple geometries
Measurements:
get_length
- Calculate geometry lengthget_area
- Calculate geometry area
Validation & Utilities:
is_valid
- Check geometry validitymake_valid
- Fix invalid geometrysimplify
- Simplify geometrysnap_geometry
- Snap to reference geometrynearest_point_on_geometry
- Find nearest pointnormalize_geometry
- Normalize orientationgeometry_to_geojson
- Convert to GeoJSONgeojson_to_geometry
- Convert from GeoJSON
🔷 PyProj Functions (11 total)
Coordinate Transformations:
transform_coordinates
- Transform point coordinatesproject_geometry
- Project geometry between CRS
CRS Information:
get_crs_info
- Get detailed CRS informationget_available_crs
- List available CRS systemsget_utm_zone
- Get UTM zone for coordinatesget_utm_crs
- Get UTM CRS for coordinatesget_geocentric_crs
- Get geocentric CRS
Geodetic Calculations:
get_geod_info
- Get ellipsoid informationcalculate_geodetic_distance
- Calculate distance on ellipsoidcalculate_geodetic_point
- Calculate point at distance/azimuthcalculate_geodetic_area
- Calculate area on ellipsoid
🔷 GeoPandas Functions (11 total)
I/O Operations:
read_file_gpd
- Read geospatial file with previewwrite_file_gpd
- Export GeoDataFrame to file
Join & Merge Operations:
append_gpd
- Concatenate GeoDataFrames verticallymerge_gpd
- Database-style attribute joinsoverlay_gpd
- Spatial overlay operationsdissolve_gpd
- Dissolve by attributeexplode_gpd
- Split multi-part geometries
Spatial Operations:
clip_vector
- Clip geometriessjoin_gpd
- Spatial joinssjoin_nearest_gpd
- Nearest neighbor spatial joinspoint_in_polygon
- Point-in-polygon tests
🔷 Rasterio Functions (18 total)
Basic Raster Operations:
metadata_raster
- Get raster metadataget_raster_crs
- Get raster CRSextract_band
- Extract single bandraster_band_statistics
- Calculate band statisticsraster_histogram
- Compute pixel histograms
Raster Processing:
clip_raster_with_shapefile
- Clip raster with polygonsresample_raster
- Resample by scale factorreproject_raster
- Reproject to new CRStile_raster
- Split into tiles
Raster Analysis:
compute_ndvi
- Calculate vegetation indexraster_algebra
- Mathematical operations on bandsconcat_bands
- Combine single-band rastersweighted_band_sum
- Weighted band combination
Advanced Analysis:
zonal_statistics
- Statistics within polygonsreclassify_raster
- Reclassify pixel valuesfocal_statistics
- Moving window statisticshillshade
- Generate hillshade from DEMwrite_raster
- Write array to raster file
🔷 PySAL Functions (15 total)
Spatial Autocorrelation:
morans_i
- Global Moran's I statisticgearys_c
- Global Geary's C statisticgamma_statistic
- Gamma indexgetis_ord_g
- Global Getis-Ord G statistic
Local Statistics:
moran_local
- Local Moran's Igetis_ord_g_local
- Local Getis-Ord G*join_counts_local
- Local join counts
Global Statistics:
join_counts
- Binary join counts testadbscan
- Adaptive density-based clustering
Spatial Weights:
weights_from_shapefile
- Create weights from shapefiledistance_band_weights
- Distance-based weightsknn_weights
- K-nearest neighbors weightsbuild_transform_and_save_weights
- Build, transform, and save weightsols_with_spatial_diagnostics_safe
- OLS regression with spatial diagnosticsbuild_and_transform_weights
- Build and transform weights
Total Functions Available: 84
🛠 Client Development
Example usage of the tools:
Buffer Operation
Tool: buffer
Parameters: {
"geometry": "POINT(0 0)",
"distance": 10,
"resolution": 16,
"join_style": 1,
"mitre_limit": 5.0,
"single_sided": false
}
Coordinate Transformation
Tool: transform_coordinates
Parameters: {
"coordinates": [0, 0],
"source_crs": "EPSG:4326",
"target_crs": "EPSG:3857"
}
Geodetic Distance
Tool: calculate_geodetic_distance
Parameters: {
"point1": [0, 0],
"point2": [10, 10],
"ellps": "WGS84"
}
🔮 Planned Features
- Implement advanced spatial indexing
- Implement network analysis capabilities
- Add support for 3D geometries
- Implement performance optimizations
- Add support for more GIS libraries
🤝 Contributing
We welcome contributions! Here's how you can help:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Please ensure your PR description clearly describes the problem and solution. Include the relevant issue number if applicable.
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🔗 Related Projects
- Model Context Protocol - The core MCP implementation
- Shapely - Python package for manipulation and analysis of geometric objects
- PyProj - Python interface to PROJ library
- GeoPandas - Python package for working with geospatial data
- Rasterio - Python package for reading and writing geospatial raster data
- PySAL - PySAL, the Python spatial analysis library for geospatial data science with an emphasis on geospatial vector data written in Python.
📞 Support
For support, please open an issue in the GitHub repository.
💬 Community
Join our Discord community for discussions, updates, and support:
👥 Contributors
Made with contrib.rocks.