Skip to content
Back to search

gis-mcp

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.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/mahdin75--gis-mcp/badge.svg)](/listings/mahdin75--gis-mcp)

HTML

<a href="/listings/mahdin75--gis-mcp"><img src="/api/listings/mahdin75--gis-mcp/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

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:

1. Build the Docker image:

docker build -t gis-mcp .

2. Run the container (HTTP mode is enabled by default):

docker run -p 9010:9010 gis-mcp

Using Dockerfile.local

The `Dockerfile.local` installs the package from local source files (useful for development or custom builds):

1. Build the Docker image:

docker build -f Dockerfile.local -t gis-mcp:local .

2. Run the container (HTTP mode is enabled by default):

docker run -p 9010:9010 gis-mcp:local

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](docs/install/docker.md).

๐Ÿ“ฆ pip Installation

The pip installation is recommended for most users:

1. Install uv package manager:

pip install uv

2. Create the Virtual Environment (Python 3.10+):

uv venv --python=3.10

3. Activate the Virtual Environment:

On Windows (PowerShell):

.\.venv\Scripts\Activate.ps1

On Linux:

source .venv/bin/activate

4. Install the package:

uv pip install gis-mcp

Install with Visualization Features

To install with visualization capabilities (Folium and PyDeck for interactive maps):

uv pip install gis-mcp[visualize]

This will install additional dependencies:

- `folium>=0.15.0` - For creating interactive web maps - `pydeck>=0.9.0` - For advanced 3D visualizations

5. Start the server:

gis-mcp

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:

export GIS_MCP_TRANSPORT=http
export GIS_MCP_PORT=8080
gis-mcp

When running in HTTP or SSE transport mode, the following endpoints are available:

- **MCP endpoint**: `http://host:port/mcp` (HTTP) or `http://host:port/sse` (SSE) - **Storage endpoints**: - `POST /storage/upload` - Upload files to server storage - `GET /storage/download?path=<file>` - Download files from server storage - `GET /storage/list?path=<dir>` - List files in server storage

For more details on transport modes and complete endpoint documentation, see:

- [HTTP Transport Configuration](docs/http-transport.md) - [Server Endpoints](docs/endpoints.md)

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:

1. Make sure to replace `YourUsername` with your actual username 2. For development installation, replace `/path/to/gis-mcp` with the actual path to your project 3. Restart your IDE to apply the changes 4. You can now use all GIS operations through Claude or Cursor!

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md ยท README ยท 865 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # GIS MCP Server
  2. GIS-MCP is an open-source Model Context Protocol (MCP) server that connects AI assistants and Large Language Models (LLMs) with GIS and geospatial operations.
  3. It enables AI agents to perform geospatial analysis, spatial data processing, vector and raster operations, coordinate transformations, spatial statistics, mapping, and other GIS workflows through MCP-compatible clients.
  4. ๐ŸŒ **Official Documentation:** https://gis-mcp.com
  5. ๐Ÿ“ฆ **PyPI:** https://pypi.org/project/gis-mcp/
  6. ๐Ÿ’ป **Source Code:** https://github.com/mahdin75/gis-mcp
  7. > **92+ GIS tools** across Shapely, GeoPandas, PyProj, Rasterio, PySAL, visualization, satellite imagery, climate, ecology, movement, and land-cover data.
  8. <br/>
  9. [![MCP Toplist](https://mcptoplist.com/badge/mcp.so%2Fgis-mcp-server%2Fmahdin75.svg)](https://mcptoplist.com/server/mcp.so%2Fgis-mcp-server%2Fmahdin75)
  10. <div align="center">
  11. | Category | Badges |
  12. | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
  13. | **Package** | [![PyPI version](https://img.shields.io/pypi/v/gis-mcp.svg)](https://pypi.org/project/gis-mcp/) [![PyPI downloads](https://static.pepy.tech/personalized-badge/gis-mcp?period=total&units=international_system&left_color=grey&right_color=blue&left_text=PyPI%20downloads)](https://pepy.tech/project/gis-mcp) [![Tests](https://github.com/mahdin75/gis-mcp/actions/workflows/test.yml/badge.svg)](https://github.com/mahdin75/gis-mcp/actions/workflows/test.yml) |
  14. | **Installation & Transport** | [![Docker Installation](https://img.shields.io/badge/Docker-Installation-2496ED?logo=docker&logoColor=white)](https://gis-mcp.com/install/docker/) [![Transport](https://img.shields.io/badge/Transport-HTTP%20%7C%20stdio-blue)](https://github.com/mahdin75/gis-mcp) |
  15. | **Storage** | [![Local Filesystem](https://img.shields.io/badge/Local-Filesystem-4CAF50?logo=files&logoColor=white)](https://gis-mcp.com/storage-configuration/) [![GCP Cloud Storage](https://img.shields.io/badge/GCP-Cloud%20Storage-4285F4?logo=googlecloud&logoColor=white)](https://gis-mcp.com/storage-configuration/) |
  16. | **Data Sources** | [![Climate](https://img.shields.io/badge/Climate-Data-B91C1C?logo=weather&logoColor=white)](https://gis-mcp.com/data-gathering/climate/) [![Biodiversity](https://img.shields.io/badge/Biodiversity-Data-4CAF50?logo=leaf&logoColor=white)](https://gis-mcp.com/data-gathering/ecology/) [![LandCover](https://img.shields.io/badge/LandCover-Data-5D4037?logo=map&logoColor=white)](https://gis-mcp.com/data-gathering/land_cover/) [![Movement](https://img.shields.io/badge/Movement-Data-FF6B35?logo=person-walking&logoColor=white)](https://gis-mcp.com/data-gathering/movement/) [![Satellite](https://img.shields.io/badge/Satellite-Imagery-6C5CE7?logo=satellite&logoColor=white)](https://gis-mcp.com/data-gathering/satellite_imagery/) [![Administrative](https://img.shields.io/badge/Administrative-Boundaries-7289DA?logo=map&logoColor=white)](https://gis-mcp.com/data-gathering/administrative_boundaries/) |
  17. | **Agentic AI** | [![LangChain Agent Example](<https://img.shields.io/badge/LangChain-Agent%20Example%20(Python)-3776AB?logo=langchain&logoColor=white>)](https://gis-mcp.com/gis-ai-agent/langchain/basic-geospatial-agent/) [![OpenAI Agent Example](<https://img.shields.io/badge/OpenAI-Agent%20Example%20(Node.js)-111827?logo=openai&logoColor=white>)](https://gis-mcp.com/gis-ai-agent/openai-nodejs/basic-geospatial-agent/) |
  18. | **Community** | [![Discord](https://img.shields.io/badge/Discord-Community-7289DA?logo=discord&logoColor=white)](https://discord.gg/SeVmVhVbk) [![YouTube](https://img.shields.io/badge/YouTube-Tutorials-B91C1C?logo=youtube&logoColor=white)](https://www.youtube.com/@gis-mcp) [![DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/mahdin75/gis-mcp) |
  19. </div>
  20. <div align="center">
  21. <h3>โœจ Want to perform accurate geospatial analysis in your chatbot? โœจ</h3>
  22. <p><strong>Install GIS-MCP and transform your AI's spatial capabilities!</strong></p>
  23. <br/>
  24. <img src="docs/Logo.png" alt="GIS MCP Server Logo" width="300"/>
  25. <br/>
  26. </div>
  27. > Current version is 0.15.0 (Beta):
  28. >
  29. > We welcome contributions and developers to join us in building this project.
  30. ## ๐ŸŽฅ Demo
  31. <div align="center">
  32. <img src="docs/demo.gif" alt="GIS MCP Server Demo" width="800"/>
  33. </div>
  34. ## ๐Ÿ“‹ Table of Contents
  35. - [Features](#-features)
  36. - [Storage](#-storage)
  37. - [Prerequisites](#-prerequisites)
  38. - [Vibe Coding](#vibe-coding)
  39. - [Installation](#-installation)
  40. - [Docker Installation](#-docker-installation)
  41. - [pip Installation](#-pip-installation)
  42. - [Development Installation](#-development-installation)
  43. - [Build Your First GIS AI Agent](#-build-your-first-gis-ai-agent)
  44. - [Available Functions](#-available-functions)
  45. - [Shapely Functions](#-shapely-functions-29-total)
  46. - [PyProj Functions](#-pyproj-functions-13-total)
  47. - [GeoPandas Functions](#-geopandas-functions-13-total)
  48. - [Rasterio Functions](#-rasterio-functions-20-total)
  49. - [PySAL Functions](#-pysal-functions-18-total)
  50. - [Visualization Functions](#-visualization-functions-2-total)
  51. - [Static Map Functions](#-static-map-functions-1-total)
  52. - [Interactive Web Map Functions](#-interactive-web-map-functions-1-total)
  53. - [Administrative Boundaries Functions](#-administrative-boundaries-functions-1-total)
  54. - [Climate Data Functions](#-climate-data-functions-1-total)
  55. - [Ecology Data Functions](#-ecology-data-functions-2-total)
  56. - [Movement Data Functions](#-movement-data-functions-2-total)
  57. - [Land Cover Data Functions](#-land-cover-data-functions-2-total)
  58. - [Satellite Imagery Functions](#-satellite-imagery-functions-1-total)
  59. - [Client Development](#-client-development)
  60. - [Planned Features](#-planned-features)
  61. - [Contributing](#-contributing)
  62. - [License](#-license)
  63. - [Related Projects](#-related-projects)
  64. - [Support](#-support)
  65. - [Badges](#-badges)
  66. ## ๐Ÿš€ Features
  67. GIS MCP Server empowers AI assistants with advanced geospatial intelligence. Key features include:
  68. - ๐Ÿ”น **Comprehensive Geometry Operations** โ€“ Perform intersection, union, buffer, difference, and other geometric transformations with ease.
  69. - ๐Ÿ”น **Advanced Coordinate Transformations** โ€“ Effortlessly reproject and transform geometries between coordinate reference systems.
  70. - ๐Ÿ”น **Accurate Measurements** โ€“ Compute distances, areas, lengths, and centroids precisely.
  71. - ๐Ÿ”น **Spatial Analysis & Validation** โ€“ Validate geometries, run proximity checks, and perform spatial overlays or joins.
  72. - ๐Ÿ”น **Raster & Vector Support** โ€“ Process raster layers, compute indices like NDVI, clip, resample, and merge with vector data.
  73. - ๐Ÿ”น **Spatial Statistics & Modeling** โ€“ Leverage PySAL for spatial autocorrelation, clustering, and neighborhood analysis.
  74. - ๐Ÿ”น **Easy Integration** โ€“ Connect seamlessly with MCP-compatible clients like Claude Desktop or Cursor IDE.
  75. - ๐Ÿ”น **HTTP/SSE Transport** โ€“ Run as HTTP service with RESTful storage endpoints for file upload/download operations.
  76. - ๐Ÿ”น **Flexible Storage** โ€“ Local filesystem by default, or Google Cloud Storage when you want files in a GCS bucket.
  77. - ๐Ÿ”น **Flexible & Extensible** โ€“ Supports Python-based GIS libraries and is ready for custom tools or workflow extensions.
  78. > ๐ŸŒŸ **Tip:** With GIS MCP Server, your AI can now โ€œthink spatially,โ€ unlocking new capabilities for environmental analysis, mapping, and location intelligence.
  79. ---
  80. ## ๐Ÿ’พ Storage
  81. GIS MCP Server supports two storage backends for file upload, download, and tool outputs:
  82. | Backend | When to use | Configure with |
  83. | ------- | ----------- | -------------- |
  84. | **Local filesystem** | Default; files on disk (including Docker volumes) | `--storage-path` or `GIS_MCP_STORAGE_PATH` |
  85. | **Google Cloud Storage (GCP)** | When you want files in a GCS bucket | `--storage-config` / `GIS_MCP_STORAGE_CONFIG` or `GIS_MCP_STORAGE_PROVIDER=gcp` |
  86. Install GCP support with:
  87. ```bash
  88. pip install gis-mcp[gcp]
  89. ```
  90. Full setup (paths, IAM, Docker, credentials): [Storage Configuration](https://gis-mcp.com/storage-configuration/).
  91. ---
  92. ## ๐Ÿ“‹ Prerequisites
  93. - Python 3.10 or higher
  94. - MCP-compatible client (like Claude Desktop or Cursor)
  95. - Internet connection for package installation
  96. ## Vibe Coding
  97. If youโ€™re building agents via vibe coding, give the model these generated maps of GIS MCP:
  98. - [`llms.txt`](https://gis-mcp.com/llms.txt): curated summary for smaller windows.
  99. - [`llms-full.txt`](https://gis-mcp.com/llms-full.txt): full documentation map for larger windows.
  100. Copies also live in the repository root (`llms.txt`, `llms-full.txt`). They are regenerated from the docs during the MkDocs build.
  101. ## ๐Ÿ›  Installation
  102. Choose the installation method that best suits your needs:
  103. ### ๐Ÿณ Docker Installation
  104. GIS MCP Server can be run using Docker, which provides an isolated environment with all dependencies pre-installed.
  105. **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`.
  106. #### Using Dockerfile
  107. The main `Dockerfile` installs the package from PyPI:
  108. 1. Build the Docker image:
  109. ```bash
  110. docker build -t gis-mcp .
  111. ```
  112. 2. Run the container (HTTP mode is enabled by default):
  113. ```bash
  114. docker run -p 9010:9010 gis-mcp
  115. ```
  116. #### Using Dockerfile.local
  117. The `Dockerfile.local` installs the package from local source files (useful for development or custom builds):
  118. 1. Build the Docker image:
  119. ```bash
  120. docker build -f Dockerfile.local -t gis-mcp:local .
  121. ```
  122. 2. Run the container (HTTP mode is enabled by default):
  123. ```bash
  124. docker run -p 9010:9010 gis-mcp:local
  125. ```
  126. The server will be available at `http://localhost:9010/mcp` in HTTP transport mode.
  127. For more details on Docker configuration and environment variables, see the [Docker installation guide](docs/install/docker.md).
  128. ### ๐Ÿ“ฆ pip Installation
  129. The pip installation is recommended for most users:
  130. 1. Install uv package manager:
  131. ```bash
  132. pip install uv
  133. ```
  134. 2. Create the Virtual Environment (Python 3.10+):
  135. ```bash
  136. uv venv --python=3.10
  137. ```
  138. 3. Activate the Virtual Environment:
  139. On Windows (PowerShell):
  140. ```powershell
  141. .\.venv\Scripts\Activate.ps1
  142. ```
  143. On Linux:
  144. ```bash
  145. source .venv/bin/activate
  146. ```
  147. 4. Install the package:
  148. ```bash
  149. uv pip install gis-mcp
  150. ```
  151. #### Install with Visualization Features
  152. To install with visualization capabilities (Folium and PyDeck for interactive maps):
  153. ```bash
  154. uv pip install gis-mcp[visualize]
  155. ```
  156. This will install additional dependencies:
  157. - `folium>=0.15.0` - For creating interactive web maps
  158. - `pydeck>=0.9.0` - For advanced 3D visualizations
  159. 5. Start the server:
  160. ```bash
  161. gis-mcp
  162. ```
  163. By default, the server runs in **STDIO transport mode**, which is ideal for local development and integration with Claude Desktop or Cursor IDE.
  164. You can also run the server in **HTTP transport mode** for network deployments:
  165. ```bash
  166. export GIS_MCP_TRANSPORT=http
  167. export GIS_MCP_PORT=8080
  168. gis-mcp
  169. ```
  170. When running in HTTP or SSE transport mode, the following endpoints are available:
  171. - **MCP endpoint**: `http://host:port/mcp` (HTTP) or `http://host:port/sse` (SSE)
  172. - **Storage endpoints**:
  173. - `POST /storage/upload` - Upload files to server storage
  174. - `GET /storage/download?path=<file>` - Download files from server storage
  175. - `GET /storage/list?path=<dir>` - List files in server storage
  176. For more details on transport modes and complete endpoint documentation, see:
  177. - [HTTP Transport Configuration](docs/http-transport.md)
  178. - [Server Endpoints](docs/endpoints.md)
  179. #### pip Configuration
  180. To use the pip installation with Claude or Cursor, add the following configuration:
  181. **Claude Desktop:**
  182. **Windows:**
  183. ```json
  184. {
  185. "mcpServers": {
  186. "gis-mcp": {
  187. "command": "C:\\Users\\YourUsername\\.venv\\Scripts\\gis-mcp",
  188. "args": []
  189. }
  190. }
  191. }
  192. ```
  193. **Linux/Mac:**
  194. ```json
  195. {
  196. "mcpServers": {
  197. "gis-mcp": {
  198. "command": "/home/YourUsername/.venv/bin/gis-mcp",
  199. "args": []
  200. }
  201. }
  202. }
  203. ```
  204. **Cursor IDE** (create `.cursor/mcp.json`):
  205. **Windows:**
  206. ```json
  207. {
  208. "mcpServers": {
  209. "gis-mcp": {
  210. "command": "C:\\Users\\YourUsername\\.venv\\Scripts\\gis-mcp",
  211. "args": []
  212. }
  213. }
  214. }
  215. ```
  216. **Linux/Mac:**
  217. ```json
  218. {
  219. "mcpServers": {
  220. "gis-mcp": {
  221. "command": "/home/YourUsername/.venv/bin/gis-mcp",
  222. "args": []
  223. }
  224. }
  225. }
  226. ```
  227. After configuration:
  228. 1. Make sure to replace `YourUsername` with your actual username
  229. 2. For development installation, replace `/path/to/gis-mcp` with the actual path to your project
  230. 3. Restart your IDE to apply the changes
  231. 4. You can now use all GIS operations through Claude or Cursor!
  232. ### ๐Ÿ›  Development Installation
  233. For contributors and developers:
  234. 1. Install uv package manager:
  235. ```bash
  236. pip install uv
  237. ```
  238. 2. Create the Virtual Environment:
  239. ```bash
  240. uv venv --python=3.10
  241. ```
  242. 3. Install the package in development mode:
  243. ```bash
  244. uv pip install -e .
  245. ```
  246. 4. Start the server:
  247. ```bash
  248. python -m gis_mcp
  249. ```
  250. #### Development Configuration
  251. To use the development installation with Claude or Cursor, add the following configuration:
  252. **Claude Desktop:**
  253. **Windows:**
  254. ```json
  255. {
  256. "mcpServers": {
  257. "gis-mcp": {
  258. "command": "C:\\path\\to\\gis-mcp\\.venv\\Scripts\\python",
  259. "args": ["-m", "gis_mcp"]
  260. }
  261. }
  262. }
  263. ```
  264. **Linux/Mac:**
  265. ```json
  266. {
  267. "mcpServers": {
  268. "gis-mcp": {
  269. "command": "/path/to/gis-mcp/.venv/bin/python",
  270. "args": ["-m", "gis_mcp"]
  271. }
  272. }
  273. }
  274. ```
  275. **Cursor IDE** (create `.cursor/mcp.json`):
  276. **Windows:**
  277. ```json
  278. {
  279. "mcpServers": {
  280. "gis-mcp": {
  281. "command": "C:\\path\\to\\gis-mcp\\.venv\\Scripts\\python",
  282. "args": ["-m", "gis_mcp"]
  283. }
  284. }
  285. }
  286. ```
  287. **Linux/Mac:**
  288. ```json
  289. {
  290. "mcpServers": {
  291. "gis-mcp": {
  292. "command": "/path/to/gis-mcp/.venv/bin/python",
  293. "args": ["-m", "gis_mcp"]
  294. }
  295. }
  296. }
  297. ```
  298. After configuration:
  299. 1. Make sure to replace `YourUsername` with your actual username
  300. 2. For development installation, replace `/path/to/gis-mcp` with the actual path to your project
  301. 3. Restart your IDE to apply the changes
  302. 4. You can now use all GIS operations through Claude or Cursor!
  303. ## ๐Ÿค– Build Your First GIS AI Agent
  304. Create agents that call **real GIS MCP tools** (not invented spatial math).
  305. ### LangChain (Python) โ€” park buffer proximity
  306. Tutorial: **[Park buffer proximity agent](https://gis-mcp.com/gis-ai-agent/langchain/basic-geospatial-agent/)**
  307. Sample: [`agents/Langchain/`](agents/Langchain/)
  308. ### LangGraph (Python) โ€” stateful site coverage
  309. Tutorial: **[Stateful site-coverage workflow](https://gis-mcp.com/gis-ai-agent/langgraph/stateful-geospatial-agent/)**
  310. Sample: [`agents/LangGraph/`](agents/LangGraph/)
  311. - Explicit graph: interpret โ†’ plan โ†’ execute GIS MCP tools โ†’ validate โ†’ respond
  312. - Verify without an LLM: `python agents/LangGraph/verify_graph.py`
  313. ### LangGraph (Python) โ€” multi-agent setback
  314. Tutorial: **[Multi-agent setback workflow](https://gis-mcp.com/gis-ai-agent/langgraph/multi-agent-geospatial-workflow/)**
  315. - Planner / Analysis / Validation agents; only Analysis calls GIS MCP
  316. - Verify: `python agents/LangGraph/verify_multi_agent.py`
  317. ### More agent docs
  318. ๐Ÿ‘‰ **[Agent tutorials overview โ†’](https://gis-mcp.com/gis-ai-agent/)**
  319. Minimal starters: [`templates/`](templates/) (`langchain-gis-agent`, `langgraph-gis-workflow`, `langgraph-multi-agent-gis`)
  320. Also available: [OpenAI Agents SDK (Node.js)](https://gis-mcp.com/gis-ai-agent/openai-nodejs/basic-geospatial-agent/)
  321. ๐Ÿ“ **[Medium article (LangChain intro) โ†’](https://medium.com/@mahdinazari75/build-your-first-gis-ai-agent-by-gis-mcp-server-langchain-c0c1bfa36f6d)**
  322. ๐ŸŽฅ **[YouTube โ†’](https://www.youtube.com/@gis-mcp)**
  323. ## ๐Ÿ“š Available Functions
  324. This section provides a comprehensive list of all available functions organized by library.
  325. ### ๐Ÿ”ท Shapely Functions (29 total)
  326. **Basic Geometric Operations:**
  327. - `buffer` - Create buffer around geometry
  328. - `intersection` - Find intersection of two geometries
  329. - `union` - Combine two geometries
  330. - `difference` - Find difference between geometries
  331. - `symmetric_difference` - Find symmetric difference
  332. **Geometric Properties:**
  333. - `convex_hull` - Calculate convex hull
  334. - `envelope` - Get bounding box
  335. - `minimum_rotated_rectangle` - Get minimum rotated rectangle
  336. - `get_centroid` - Get centroid point
  337. - `get_bounds` - Get geometry bounds
  338. - `get_coordinates` - Extract coordinate array
  339. - `get_geometry_type` - Get geometry type name
  340. **Transformations:**
  341. - `rotate_geometry` - Rotate geometry by angle
  342. - `scale_geometry` - Scale geometry by factors
  343. - `translate_geometry` - Move geometry by offset
  344. **Advanced Operations:**
  345. - `triangulate_geometry` - Create triangulation
  346. - `voronoi` - Create Voronoi diagram
  347. - `unary_union_geometries` - Union multiple geometries
  348. **Measurements:**
  349. - `get_length` - Calculate geometry length
  350. - `get_area` - Calculate geometry area
  351. **Validation & Utilities:**
  352. - `is_valid` - Check geometry validity
  353. - `make_valid` - Fix invalid geometry
  354. - `simplify` - Simplify geometry
  355. - `snap_geometry` - Snap to reference geometry
  356. - `nearest_point_on_geometry` - Find nearest point
  357. - `normalize_geometry` - Normalize orientation
  358. - `geometry_to_geojson` - Convert to GeoJSON
  359. - `geojson_to_geometry` - Convert from GeoJSON
  360. ### ๐Ÿ”ท PyProj Functions (13 total)
  361. **Coordinate Transformations:**
  362. - `transform_coordinates` - Transform point coordinates
  363. - `project_geometry` - Project geometry between CRS
  364. **CRS Information:**
  365. - `get_crs_info` - Get detailed CRS information
  366. - `get_available_crs` - List available CRS systems
  367. - `get_utm_zone` - Get UTM zone for coordinates
  368. - `get_utm_crs` - Get UTM CRS for coordinates
  369. - `get_geocentric_crs` - Get geocentric CRS
  370. **Geodetic Calculations:**
  371. - `get_geod_info` - Get ellipsoid information
  372. - `calculate_geodetic_distance` - Calculate distance on ellipsoid
  373. - `calculate_geodetic_point` - Calculate point at distance/azimuth
  374. - `calculate_geodetic_area` - Calculate area on ellipsoid
  375. ### ๐Ÿ”ท GeoPandas Functions (13 total)
  376. **I/O Operations:**
  377. - `read_file_gpd` - Read geospatial file with preview
  378. - `write_file_gpd` - Export GeoDataFrame to file
  379. **Join & Merge Operations:**
  380. - `append_gpd` - Concatenate GeoDataFrames vertically
  381. - `merge_gpd` - Database-style attribute joins
  382. - `overlay_gpd` - Spatial overlay operations
  383. - `dissolve_gpd` - Dissolve by attribute
  384. - `explode_gpd` - Split multi-part geometries
  385. **Spatial Operations:**
  386. - `clip_vector` - Clip geometries
  387. - `sjoin_gpd` - Spatial joins
  388. - `sjoin_nearest_gpd` - Nearest neighbor spatial joins
  389. - `point_in_polygon` - Point-in-polygon tests
  390. ### ๐Ÿ”ท Rasterio Functions (20 total)
  391. **Basic Raster Operations:**
  392. - `metadata_raster` - Get raster metadata
  393. - `get_raster_crs` - Get raster CRS
  394. - `extract_band` - Extract single band
  395. - `raster_band_statistics` - Calculate band statistics
  396. - `raster_histogram` - Compute pixel histograms
  397. **Raster Processing:**
  398. - `clip_raster_with_shapefile` - Clip raster with polygons
  399. - `resample_raster` - Resample by scale factor
  400. - `reproject_raster` - Reproject to new CRS
  401. - `tile_raster` - Split into tiles
  402. **Raster Analysis:**
  403. - `compute_ndvi` - Calculate vegetation index
  404. - `raster_algebra` - Mathematical operations on bands
  405. - `concat_bands` - Combine single-band rasters
  406. - `weighted_band_sum` - Weighted band combination
  407. **Advanced Analysis:**
  408. - `zonal_statistics` - Statistics within polygons
  409. - `reclassify_raster` - Reclassify pixel values
  410. - `focal_statistics` - Moving window statistics
  411. - `hillshade` - Generate hillshade from DEM
  412. - `write_raster` - Write array to raster file
  413. ### ๐Ÿ”ท PySAL Functions (18 total)
  414. **Spatial Autocorrelation:**
  415. - `morans_i` - Global Moran's I statistic
  416. - `gearys_c` - Global Geary's C statistic
  417. - `gamma_statistic` - Gamma index
  418. - `getis_ord_g` - Global Getis-Ord G statistic
  419. **Local Statistics:**
  420. - `moran_local` - Local Moran's I
  421. - `getis_ord_g_local` - Local Getis-Ord G\*
  422. - `join_counts_local` - Local join counts
  423. **Global Statistics:**
  424. - `join_counts` - Binary join counts test
  425. - `adbscan` - Adaptive density-based clustering
  426. **Spatial Weights:**
  427. - `weights_from_shapefile` - Create weights from shapefile
  428. - `distance_band_weights` - Distance-based weights
  429. - `knn_weights` - K-nearest neighbors weights
  430. - `build_transform_and_save_weights` - Build, transform, and save weights
  431. - `ols_with_spatial_diagnostics_safe` - OLS regression with spatial diagnostics
  432. - `build_and_transform_weights` - Build and transform weights
  433. **Spatial-Temporal Analysis:**
  434. - `spatial_markov` - Spatial Markov analysis for panel data
  435. - `dynamic_lisa` - Dynamic LISA (directional LISA) analysis
  436. **Spatial Regression:**
  437. - `gm_lag` - GM_Lag spatial 2SLS/GMM-IV spatial lag model
  438. ### ๐Ÿ”ท Visualization Functions (2 total)
  439. **Static Map Visualization (Matplotlib/GeoPandas):**
  440. - `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.
  441. **Interactive Web Map Visualization (Folium):**
  442. - `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.
  443. ### ๐Ÿ”ท Administrative Boundaries Functions (1 total)
  444. **Boundary Download:**
  445. - `download_boundaries` - Download GADM administrative boundaries and save as GeoJSON
  446. ### ๐Ÿ”ท Climate Data Functions (1 total)
  447. **Climate Data Download:**
  448. - `download_climate_data` - Download climate data (ERA5 or other CDS datasets)
  449. ### ๐Ÿ”ท Ecology Data Functions (2 total)
  450. **Ecology Data Download and Info:**
  451. - `get_species_info` โ€“ Retrieve taxonomic information for a given species name
  452. - `download_species_occurrences` โ€“ Download occurrence records for a given species and save as JSON
  453. ### ๐Ÿ”ท Movement Data Functions (2 total)
  454. **Movement Data Download and Routing (via [OSMnx](https://osmnx.readthedocs.io/en/stable/)):**
  455. - `download_street_network` โ€“ Download a street network for a given place and save as GraphML
  456. - `calculate_shortest_path` โ€“ Calculate the shortest path between two points using a saved street network
  457. ### ๐Ÿ”ท Land Cover Data Functions (2 total)
  458. **Land Cover from Planetary Computer:**
  459. - `download_worldcover` โ€“ Download ESA WorldCover for AOI/year; optional crop and reprojection
  460. - `compute_s2_ndvi` โ€“ Compute NDVI from Sentinel-2 L2A; crop and reprojection supported
  461. ### ๐Ÿ”ท Satellite Imagery Functions (1 total)
  462. **STAC-based Satellite Download:**
  463. - `download_satellite_imagery` โ€“ Download and stack bands from STAC items (e.g., Sentinel-2, Landsat), with optional crop and reprojection
  464. **Total Functions Available: 92**
  465. ## ๐Ÿ›  Client Development
  466. Example usage of the tools:
  467. ### Buffer Operation
  468. ```python
  469. Tool: buffer
  470. Parameters: {
  471. "geometry": "POINT(0 0)",
  472. "distance": 10,
  473. "resolution": 16,
  474. "join_style": 1,
  475. "mitre_limit": 5.0,
  476. "single_sided": false
  477. }
  478. ```
  479. ### Coordinate Transformation
  480. ```python
  481. Tool: transform_coordinates
  482. Parameters: {
  483. "coordinates": [0, 0],
  484. "source_crs": "EPSG:4326",
  485. "target_crs": "EPSG:3857"
  486. }
  487. ```
  488. ### Geodetic Distance
  489. ```python
  490. Tool: calculate_geodetic_distance
  491. Parameters: {
  492. "point1": [0, 0],
  493. "point2": [10, 10],
  494. "ellps": "WGS84"
  495. }
  496. ```
  497. ### Static Map Creation
  498. ```python
  499. Tool: create_map
  500. Parameters: {
  501. "layers": [
  502. {
  503. "data": "buildings.shp",
  504. "style": {"label": "Buildings", "color": "red", "alpha": 0.7}
  505. },
  506. {
  507. "data": "roads.shp",
  508. "style": {"label": "Roads", "color": "black", "linewidth": 1}
  509. }
  510. ],
  511. "filename": "city_analysis",
  512. "filetype": "png",
  513. "title": "City Infrastructure Analysis",
  514. "show_grid": true,
  515. "add_legend": true
  516. }
  517. ```
  518. ### Interactive Web Map Creation
  519. ```python
  520. Tool: create_web_map
  521. Parameters: {
  522. "layers": [
  523. {
  524. "data": "buildings.shp",
  525. "style": {"label": "Buildings", "color": "red"}
  526. },
  527. {
  528. "data": "parks.geojson",
  529. "style": {"label": "Parks", "color": "green"}
  530. }
  531. ],
  532. "filename": "city_interactive.html",
  533. "title": "City Infrastructure Map",
  534. "basemap": "CartoDB positron",
  535. "show_grid": true,
  536. "add_legend": true,
  537. "add_minimap": true
  538. }
  539. ```
  540. ## ๐Ÿ”ฎ Planned Features
  541. - Implement advanced spatial indexing
  542. - Implement network analysis capabilities
  543. - Add support for 3D geometries
  544. - Implement performance optimizations
  545. - Add support for more GIS libraries
  546. ## ๐Ÿค Contributing
  547. We welcome contributions! Here's how you can help:
  548. 1. Fork the repository
  549. 2. Create a feature branch (`git checkout -b feature/AmazingFeature`)
  550. 3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
  551. 4. Push to the branch (`git push origin feature/AmazingFeature`)
  552. 5. Open a Pull Request
  553. Please ensure your PR description clearly describes the problem and solution. Include the relevant issue number if applicable.
  554. ## ๐Ÿ“„ License
  555. This project is licensed under the MIT License - see the LICENSE file for details.
  556. ## ๐Ÿ”— Related Projects
  557. | Project Name | Category | Description |
  558. | --------------------------------------------------------------------------------------------------- | -------------------------- | ------------------------------------------------------------------------------------------------------------- |
  559. | [Model Context Protocol](https://github.com/modelcontextprotocol/modelcontextprotocol) | MCP Related | The core MCP Specification |
  560. | [FastMCP](https://github.com/jlowin/fastmcp) | MCP Related | The fast, Pythonic way to build MCP servers and clients |
  561. | [Shapely](https://github.com/shapely/shapely) | Geospatial Analysis | Python package for manipulation and analysis of geometric objects |
  562. | [PyProj](https://github.com/pyproj4/pyproj) | Geospatial Analysis | Python interface to PROJ library |
  563. | [GeoPandas](https://github.com/geopandas/geopandas) | Geospatial Analysis | Python package for working with geospatial data |
  564. | [Rasterio](https://github.com/rasterio/rasterio) | Geospatial Analysis | Python package for reading and writing geospatial raster data |
  565. | [Fiona](https://github.com/Toblerity/Fiona) | Geospatial Analysis | Python interface to OGR library for reading and writing vector geospatial data formats |
  566. | [PySAL](https://github.com/pysal/pysal) | Geospatial Analysis | Python spatial analysis library for geospatial data science |
  567. | [Folium](https://github.com/python-visualization/folium) | Visualization | Python library for creating interactive web maps using Leaflet.js |
  568. | [PyDeck](https://github.com/visgl/deck.gl) | Visualization | Python library for creating advanced 3D visualizations and interactive maps |
  569. | [Matplotlib](https://github.com/matplotlib/matplotlib) | Visualization | Python plotting library for creating static maps and visualizations |
  570. | [cdsapi](https://github.com/ecmwf/cdsapi) | Geospatial Data Collecting | Python API to access the Copernicus Climate Data Store (CDS) |
  571. | [pygadm](https://github.com/12rambau/pygadm) | Geospatial Data Collecting | Easy access to administrative boundary defined by GADM from Python scripts |
  572. | [pygbif](https://github.com/gbif/pygbif) | Geospatial Data Collecting | Python client for the GBIF API (ecology and biodiversity data) |
  573. | [OSMnx](https://osmnx.readthedocs.io/en/stable/) | Geospatial Data Collecting | Python package for downloading, modeling, and analyzing street networks and urban features from OpenStreetMap |
  574. | [pystac-client](https://github.com/stac-utils/pystac-client) | Geospatial Data Collecting | Python client for STAC catalogs; search and access spatiotemporal assets |
  575. | [Planetary Computer SDK for Python](https://github.com/microsoft/planetary-computer-sdk-for-python) | Geospatial Data Collecting | Python SDK for Microsoft Planetary Computer; auth and helpers for STAC/COGs |
  576. ## ๐Ÿ”— Related MCP Servers
  577. | Server Name | Description |
  578. | ----------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
  579. | [GeoServer MCP](https://github.com/mahdin75/geoserver-mcp/) | A Model Context Protocol (MCP) server implementation that connects LLMs to the GeoServer REST API |
  580. ## ๐Ÿ“ž Support
  581. For support, please open an issue in the GitHub repository.
  582. ## ๐Ÿ’ฌ Community
  583. Join our Discord community for discussions, updates, and support:
  584. [![Join our Discord](https://img.shields.io/badge/Discord-Join%20our%20community-7289DA?style=for-the-badge&logo=discord&logoColor=white)](https://discord.gg/SeVmVhVbk)
  585. ## ๐Ÿ‘ฅ Contributors
  586. <a href="https://github.com/mahdin75/gis-mcp/graphs/contributors">
  587. <img src="https://contrib.rocks/image?repo=mahdin75/gis-mcp" />
  588. </a>
  589. Made with [contrib.rocks](https://contrib.rocks).
  590. <br/>
  591. ## ๐Ÿ† Badges
  592. <div align="center">
  593. [![PyPI version](https://img.shields.io/pypi/v/gis-mcp.svg)](https://pypi.org/project/gis-mcp/)
  594. [![PyPI downloads](https://img.shields.io/pypi/dm/gis-mcp.svg)](https://pypi.org/project/gis-mcp/)
  595. <br/></br>
  596. [![MCP Toplist](https://mcptoplist.com/badge/mcp.so%2Fgis-mcp-server%2Fmahdin75.svg)](https://mcptoplist.com/server/mcp.so%2Fgis-mcp-server%2Fmahdin75)
  597. <br/></br>
  598. [![Trust Score](https://archestra.ai/mcp-catalog/api/badge/quality/mahdin75/gis-mcp)](https://archestra.ai/mcp-catalog/mahdin75__gis-mcp)
  599. <br/></br>
  600. <a href="https://glama.ai/mcp/servers/@mahdin75/gis-mcp">
  601. <img width="380" height="200" src="https://glama.ai/mcp/servers/@mahdin75/gis-mcp/badge" alt="GIS Server MCP server" />
  602. </a>
  603. <br/><br/><br/>
  604. <a href="https://mcp.so/server/gis-mcp-server/mahdin75">
  605. <img src="https://mcp.so/logo.png" alt="MCP.so Badge" width="150"/>
  606. </a>
  607. </div>

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If itโ€™s helped, pass it on.