The GIS MCP Server connects LLMs to Python GIS libraries (primarily Shapely and PyProj) to perform geospatial operations and transformations, including:
Geometric Operations: Buffer, intersection, union, difference, symmetric difference, and convex hull
Property Calculations: Centroid, bounds, coordinates, length, area, and geometry type identification
Coordinate Transformations: Convert between different Coordinate Reference Systems (CRS)
Geodetic Calculations: Calculate distances, areas, and points based on geodetic principles
Geometry Manipulation: Rotate, scale, translate, triangulate, and simplify geometries
Validation: Check if geometries are valid and make them valid if needed
Advanced Spatial Analysis: Create Voronoi diagrams, calculate minimum rotated rectangles, and perform unary unions
CRS Information: Retrieve information about available CRS, including UTM and geocentric systems
GIS MCP Server
Category | Badges |
Package |
|
Installation & Transport |
|
Data Sources |
|
Agentic AI |
|
Community |
|
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
Current version is 0.14.0 (Beta):
We welcome contributions and developers to join us in building this project.
🎥 Demo
Related MCP server: Math-MCP
📋 Table of Contents
🚀 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.
🔹 HTTP/SSE Transport – Run as HTTP service with RESTful storage endpoints for file upload/download operations.
🔹 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
Vibe Coding
If you’re building agents via vibe coding, use these context files in your editor so the LLM understands the GIS MCP server:
llms.txt: summarized context for smaller windows.llms-full.txt: full context when your model has a larger window.
🛠 Installation
Choose the installation method that best suits your needs:
🐳 Docker Installation
GIS MCP Server can be run using Docker, which provides an isolated environment with all dependencies pre-installed.
Important: Both Dockerfile and Dockerfile.local have HTTP transport mode enabled by default. The server runs on port 9010 and is accessible at http://localhost:9010/mcp.
Using Dockerfile
The main Dockerfile installs the package from PyPI:
Build the Docker image:
Run the container (HTTP mode is enabled by default):
Using Dockerfile.local
The Dockerfile.local installs the package from local source files (useful for development or custom builds):
Build the Docker image:
Run the container (HTTP mode is enabled by default):
The server will be available at http://localhost:9010/mcp in HTTP transport mode.
For more details on Docker configuration and environment variables, see the Docker installation guide.
📦 pip Installation
The pip installation is recommended for most users:
Install uv package manager:
Create the Virtual Environment (Python 3.10+):
Activate the Virtual Environment:
On Windows (PowerShell):
On Linux:
Install the package:
Install with Visualization Features
To install with visualization capabilities (Folium and PyDeck for interactive maps):
This will install additional dependencies:
folium>=0.15.0- For creating interactive web mapspydeck>=0.9.0- For advanced 3D visualizations
Start the server:
By default, the server runs in STDIO transport mode, which is ideal for local development and integration with Claude Desktop or Cursor IDE.
You can also run the server in HTTP transport mode for network deployments:
When running in HTTP or SSE transport mode, the following endpoints are available:
MCP endpoint:
http://host:port/mcp(HTTP) orhttp://host:port/sse(SSE)Storage endpoints:
POST /storage/upload- Upload files to server storageGET /storage/download?path=<file>- Download files from server storageGET /storage/list?path=<dir>- List files in server storage
For more details on transport modes and complete endpoint documentation, see:
pip Configuration
To use the pip installation with Claude or Cursor, add the following configuration:
Claude Desktop:
Windows:
Linux/Mac:
Cursor IDE (create .cursor/mcp.json):
Windows:
Linux/Mac:
After configuration:
Make sure to replace
YourUsernamewith your actual usernameFor development installation, replace
/path/to/gis-mcpwith the actual path to your projectRestart 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:
Create the Virtual Environment:
Install the package in development mode:
Start the server:
Development Configuration
To use the development installation with Claude or Cursor, add the following configuration:
Claude Desktop:
Windows:
Linux/Mac:
Cursor IDE (create .cursor/mcp.json):
Windows:
Linux/Mac:
After configuration:
Make sure to replace
YourUsernamewith your actual usernameFor development installation, replace
/path/to/gis-mcpwith the actual path to your projectRestart your IDE to apply the changes
You can now use all GIS operations through Claude or Cursor!
🤖 Build Your First GIS AI Agent
Ready to create your own AI agent that can perform geospatial operations? Our comprehensive tutorial will guide you from zero to hero!
What You'll Learn
✅ How to set up the GIS MCP server in HTTP mode
✅ How to build a LangChain agent from scratch
✅ How to connect your agent to GIS tools
✅ How to use OpenRouter to access multiple AI models (DeepSeek, Gemini, GPT-4, Claude, etc.)
✅ How to customize and extend your agent
Get Started
👉 Follow the complete tutorial →
🎥 Watch tutorials on YouTube →
The tutorial is beginner-friendly and requires no prior AI or GIS experience. You'll build a working agent that can:
Calculate distances between points
Transform coordinates between different systems
Create buffers around locations
Perform spatial analysis
And much more!
Perfect for: Developers, data scientists, GIS professionals, and anyone interested in building AI-powered geospatial applications.
📚 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 (13 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 (13 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 (20 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 (18 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
Spatial-Temporal Analysis:
spatial_markov- Spatial Markov analysis for panel datadynamic_lisa- Dynamic LISA (directional LISA) analysis
Spatial Regression:
gm_lag- GM_Lag spatial 2SLS/GMM-IV spatial lag model
🔷 Visualization Functions (2 total)
Static Map Visualization (Matplotlib/GeoPandas):
create_map– Generate high-quality static maps (PNG, PDF, JPG) from multiple geospatial data sources including shapefiles, rasters, WKT geometries, and coordinate arrays. Supports multiple layers with individual styling options, legends, titles, and grid overlays.
Interactive Web Map Visualization (Folium):
create_web_map– Generate interactive HTML maps using Folium with layer controls, legends, scale bars, dynamic titles, tooltips, and minimap. Supports multiple basemap options and responsive design for web browsers.
🔷 Administrative Boundaries Functions (1 total)
Boundary Download:
download_boundaries- Download GADM administrative boundaries and save as GeoJSON
🔷 Climate Data Functions (1 total)
Climate Data Download:
download_climate_data- Download climate data (ERA5 or other CDS datasets)
🔷 Ecology Data Functions (2 total)
Ecology Data Download and Info:
get_species_info– Retrieve taxonomic information for a given species namedownload_species_occurrences– Download occurrence records for a given species and save as JSON
🔷 Movement Data Functions (2 total)
Movement Data Download and Routing (via
download_street_network– Download a street network for a given place and save as GraphMLcalculate_shortest_path– Calculate the shortest path between two points using a saved street network
🔷 Land Cover Data Functions (2 total)
Land Cover from Planetary Computer:
download_worldcover– Download ESA WorldCover for AOI/year; optional crop and reprojectioncompute_s2_ndvi– Compute NDVI from Sentinel-2 L2A; crop and reprojection supported
🔷 Satellite Imagery Functions (1 total)
STAC-based Satellite Download:
download_satellite_imagery– Download and stack bands from STAC items (e.g., Sentinel-2, Landsat), with optional crop and reprojection
Total Functions Available: 92
🛠 Client Development
Example usage of the tools:
Buffer Operation
Coordinate Transformation
Geodetic Distance
Static Map Creation
Interactive Web Map Creation
🔮 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
Project Name | Category | Description |
MCP Related | The core MCP Specification | |
MCP Related | The fast, Pythonic way to build MCP servers and clients | |
Geospatial Analysis | Python package for manipulation and analysis of geometric objects | |
Geospatial Analysis | Python interface to PROJ library | |
Geospatial Analysis | Python package for working with geospatial data | |
Geospatial Analysis | Python package for reading and writing geospatial raster data | |
Geospatial Analysis | Python interface to OGR library for reading and writing vector geospatial data formats | |
Geospatial Analysis | Python spatial analysis library for geospatial data science | |
Visualization | Python library for creating interactive web maps using Leaflet.js | |
Visualization | Python library for creating advanced 3D visualizations and interactive maps | |
Visualization | Python plotting library for creating static maps and visualizations | |
Geospatial Data Collecting | Python API to access the Copernicus Climate Data Store (CDS) | |
Geospatial Data Collecting | Easy access to administrative boundary defined by GADM from Python scripts | |
Geospatial Data Collecting | Python client for the GBIF API (ecology and biodiversity data) | |
Geospatial Data Collecting | Python package for downloading, modeling, and analyzing street networks and urban features from OpenStreetMap | |
Geospatial Data Collecting | Python client for STAC catalogs; search and access spatiotemporal assets | |
Geospatial Data Collecting | Python SDK for Microsoft Planetary Computer; auth and helpers for STAC/COGs |
🔗 Related MCP Servers
Server Name | Description |
A Model Context Protocol (MCP) server implementation that connects LLMs to the GeoServer REST API |
📞 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.
🏆 Badges