GeoServer MCP Server

GeoServer MCP Server

Connect LLMs to GeoServer for geospatial data management and AI-driven queries.

43
Stars
9
Forks
43
Watchers
1
Issues
GeoServer MCP Server implements the Model Context Protocol, enabling seamless integration between Large Language Models (LLMs) and the GeoServer REST API. It allows AI assistants to interact with, query, and manipulate geospatial data and services through standardized interfaces. The server supports management of workspaces, layers, and spatial queries, as well as rendering geospatial visualizations. Installation is supported via Docker, pip, and integration tools like Smithery, with compatibility for clients such as Claude Desktop and Cursor.

Key Features

Query and manage GeoServer workspaces, layers, and styles
Execute spatial queries on vector geospatial data
Generate map visualizations and images
Access OGC-compliant web services including WMS and WFS
Seamless integration with MCP-compatible clients
Supports Docker, pip, and development installations
Automated client configuration for tools like Claude Desktop and Cursor
Alpha-stage active development with open contribution
REST API-based geospatial operations
Easy deployment and environment isolation via Docker

Use Cases

Automate geospatial data retrieval and analysis through AI assistants
Enable LLM-powered management of workspaces and layers in GeoServer
Perform spatial queries using natural language interfaces
Facilitate generation of map images and visualizations through LLMs
Integrate advanced geospatial operations into AI workflows and assistants
Support personalized geospatial data exploration for non-technical users
Streamline geospatial data management in GIS projects
Deploy AI-driven dashboards for real-time geospatial insights
Use in academic or professional settings for geospatial research
Integrate with OGC-compliant workflows for enhanced interoperability

README

GeoServer MCP Server

Alpha

Version 0.4.0 (Alpha) is under active development and will be released shortly. We are open to contributions and welcome developers to join us in building this project.

🎥 Demo

📋 Table of Contents

🚀 Features

  • 🔍 Query and manipulate GeoServer workspaces, layers, and styles
  • 🗺️ Execute spatial queries on vector data
  • 🎨 Generate map visualizations
  • 🌐 Access OGC-compliant web services (WMS, WFS)
  • 🛠️ Easy integration with MCP-compatible clients

📋 Prerequisites

  • Python 3.10 or higher
  • Running GeoServer instance with REST API enabled
  • 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 GeoServer MCP Server for Claude Desktop automatically via Smithery:

bash
npx -y @smithery/cli install @mahdin75/geoserver-mcp --client claude

🛠️ Installation (Docker)

The Docker installation is the quickest and most isolated way to run the GeoServer MCP server. It's ideal for:

  • Quick testing and evaluation
  • Production deployments
  • Environments where you want to avoid Python dependencies
  • Consistent deployment across different systems
  1. Run geoserver-mcp:
bash
docker pull mahdin75/geoserver-mcp
docker run -d mahdin75/geoserver-mcp
  1. Configure the clients:

If you are using Claude Desktop, edit claude_desktop_config.json If you are using Cursor, Create .cursor/mcp.json

json
{
  "mcpServers": {
    "geoserver-mcp": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e",
        "GEOSERVER_URL=http://localhost:8080/geoserver",
        "-e",
        "GEOSERVER_USER=admin",
        "-e",
        "GEOSERVER_PASSWORD=geoserver",
        "-p",
        "8080:8080",
        "mahdin75/geoserver-mcp"
      ]
    }
  }
}

🛠️ Installation (pip)

The pip installation is recommended for most users who want to run the server directly on their system. This method is best for:

  • Regular users who want to run the server locally
  • Systems where you have Python 3.10+ installed
  • Users who want to customize the server configuration
  • Development and testing purposes
  1. Install uv package manager.
bash
pip install uv
  1. Create the Virtual Environment (Python 3.10+):

Linux/Mac:

bash
uv venv --python=3.10

Windows PowerShell:

bash
uv venv --python=3.10
  1. Install the package using pip:
bash
uv pip install geoserver-mcp
  1. Configure GeoServer connection:

Linux/Mac:

bash
export GEOSERVER_URL="http://localhost:8080/geoserver"
export GEOSERVER_USER="admin"
export GEOSERVER_PASSWORD="geoserver"

Windows PowerShell:

powershell
$env:GEOSERVER_URL="http://localhost:8080/geoserver"
$env:GEOSERVER_USER="admin"
$env:GEOSERVER_PASSWORD="geoserver"
  1. Start the server:

If you are going to use Claude desktop you don't need this step. For cursor or your own custom client you should run the following code.

Linux:

bash
source .venv/bin/activate

geoserver-mcp

or

bash
source .venv/bin/activate

geoserver-mcp --url http://localhost:8080/geoserver --user admin --password geoserver --debug

Windows PowerShell:

bash
.\.venv\Scripts\activate
geoserver-mcp

or

bash
.\.venv\Scripts\activate
geoserver-mcp --url http://localhost:8080/geoserver --user admin --password geoserver --debug
  1. Configure Clients:

If you are using Claude Desktop, edit claude_desktop_config.json If you are using Cursor, Create .cursor/mcp.json

Windows:

json
{
  "mcpServers": {
    "geoserver-mcp": {
      "command": "C:\\path\\to\\geoserver-mcp\\.venv\\Scripts\\geoserver-mcp",
      "args": [
        "--url",
        "http://localhost:8080/geoserver",
        "--user",
        "admin",
        "--password",
        "geoserver"
      ]
    }
  }
}

Linux:

json
{
  "mcpServers": {
    "geoserver-mcp": {
      "command": "/path/to/geoserver-mcp/.venv/bin/geoserver-mcp",
      "args": [
        "--url",
        "http://localhost:8080/geoserver",
        "--user",
        "admin",
        "--password",
        "geoserver"
      ]
    }
  }
}

🛠️ Development installation

The development installation is designed for contributors and developers who want to modify the codebase. This method is suitable for:

  • Developers contributing to the project
  • Users who need to modify the source code
  • Testing new features
  • Debugging and development purposes
  1. Install uv package manager.
bash
pip install uv
  1. Create the Virtual Environment (Python 3.10+):
bash
uv venv --python=3.10
  1. Install the package using pip:
bash
uv pip install -e .
  1. Configure GeoServer connection:

Linux/Mac:

bash
export GEOSERVER_URL="http://localhost:8080/geoserver"
export GEOSERVER_USER="admin"
export GEOSERVER_PASSWORD="geoserver"

Windows PowerShell:

powershell
$env:GEOSERVER_URL="http://localhost:8080/geoserver"
$env:GEOSERVER_USER="admin"
$env:GEOSERVER_PASSWORD="geoserver"
  1. Start the server:

If you are going to use Claude desktop you don't need this step. For cursor or your own custom client you should run the following code.

Linux:

bash
source .venv/bin/activate

geoserver-mcp

or

bash
source .venv/bin/activate

geoserver-mcp --url http://localhost:8080/geoserver --user admin --password geoserver --debug

Windows PowerShell:

bash
.\.venv\Scripts\activate
geoserver-mcp

or

bash
.\.venv\Scripts\activate
geoserver-mcp --url http://localhost:8080/geoserver --user admin --password geoserver --debug
  1. Configure Clients:

If you are using Claude Desktop, edit claude_desktop_config.json If you are using Cursor, Create .cursor/mcp.json

Windows:

json
{
  "mcpServers": {
    "geoserver-mcp": {
      "command": "C:\\path\\to\\geoserver-mcp\\.venv\\Scripts\\geoserver-mcp",
      "args": [
        "--url",
        "http://localhost:8080/geoserver",
        "--user",
        "admin",
        "--password",
        "geoserver"
      ]
    }
  }
}

Linux:

json
{
  "mcpServers": {
    "geoserver-mcp": {
      "command": "/path/to/geoserver-mcp/.venv/bin/geoserver-mcp",
      "args": [
        "--url",
        "http://localhost:8080/geoserver",
        "--user",
        "admin",
        "--password",
        "geoserver"
      ]
    }
  }
}

🛠️ Available Tools

🛠️ Workspace and Layer Management

Tool Description
list_workspaces Get available workspaces
create_workspace Create a new workspace
get_layer_info Get detailed layer metadata
list_layers List layers in a workspace
create_layer Create a new layer
delete_resource Remove resources

🛠️ Data Operations

Tool Description
query_features Execute CQL queries on vector data
update_features Modify feature attributes
delete_features Remove features based on criteria

🛠️ Visualization

Tool Description
generate_map Create styled map images
create_style Define new SLD styles
apply_style Apply existing styles to layers

🛠️ Client Development

If you're planning to develop your own client to interact with the GeoServer MCP server, you can find inspiration in the example client implementation at examples/client.py. This example demonstrates:

  • How to establish a connection with the MCP server
  • How to send requests and handle responses
  • Basic error handling and connection management
  • Example usage of various tools and operations

The example client serves as a good starting point for understanding the protocol and implementing your own client applications.

Also, here is the example usgage:

List Workspaces


Tool: list_workspaces
Parameters: {}
Response: ["default", "demo", "topp", "tiger", "sf"]

Get Layer Information


Tool: get_layer_info
Parameters: {
"workspace": "topp",
"layer": "states"
}

Query Features


Tool: query_features
Parameters: {
"workspace": "topp",
"layer": "states",
"filter": "PERSONS > 10000000",
"properties": ["STATE_NAME", "PERSONS"]
}

Generate Map


Tool: generate_map
Parameters: {
"layers": ["topp:states"],
"styles": ["population"],
"bbox": [-124.73, 24.96, -66.97, 49.37],
"width": 800,
"height": 600,
"format": "png"
}

🔮 Planned Features

  • Coverage and raster data management
  • Security and access control
  • Advanced styling capabilities
  • WPS processing operations
  • GeoWebCache integration

🤝 Contributing

We welcome contributions! Here's how you can help:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. 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

📞 Support

For support, please Open an issue

🏆 Badges

MseeP.ai Security Assessment Badge

Star History

Star History Chart

Repository Owner

mahdin75
mahdin75

User

Repository Details

Language Python
Default Branch main
Size 2,879 KB
Contributors 4
License MIT License
MCP Verified Nov 12, 2025

Programming Languages

Python
96.7%
Dockerfile
3.3%

Tags

Join Our Newsletter

Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.

We respect your privacy. Unsubscribe at any time.

Related MCPs

Discover similar Model Context Protocol servers

  • GIS MCP Server

    GIS MCP Server

    Empower AI with advanced geospatial operations via Model Context Protocol.

    GIS MCP Server provides a Model Context Protocol (MCP) server implementation that enables Large Language Models to access and perform sophisticated GIS operations. It bridges AI assistants with Python geospatial libraries such as Shapely, GeoPandas, PyProj, Rasterio, and PySAL. The server supports a wide range of spatial analysis, coordinate transformations, raster and vector data processing, and geospatial intelligence tasks. By integrating with MCP-compatible clients, it enhances AI tools with precise and extensible spatial capabilities.

    • 70
    • MCP
    • mahdin75/gis-mcp
  • MCP-Geo

    MCP-Geo

    Geocoding and reverse geocoding MCP server for LLMs.

    MCP-Geo provides geocoding and reverse geocoding capabilities to AI models using the Model Context Protocol, powered by the GeoPY library. It offers various tools such as address lookup, reverse lookup from coordinates, distance calculations, and batch processing of locations, all accessible via standard MCP tool interfaces. Safety features like rate limiting and robust error handling ensure reliable and compliant usage of geocoding services. The server is compatible with environments like Claude Desktop and can be easily configured elsewhere.

    • 28
    • MCP
    • webcoderz/MCP-Geo
  • QGISMCP

    QGISMCP

    Integrate QGIS with Claude AI via Model Context Protocol

    QGISMCP connects QGIS to Claude AI through the Model Context Protocol (MCP), enabling seamless two-way communication between the GIS platform and the AI assistant. It features a QGIS plugin that sets up a socket server and a dedicated MCP server for processing commands, facilitating tasks such as project manipulation, layer management, and Python code execution directly from Claude. This integration empowers users to streamline project creation, layer loading, and advanced automation within QGIS through AI-driven interaction.

    • 691
    • MCP
    • jjsantos01/qgis_mcp
  • Stadia Maps MCP Server (TypeScript)

    Stadia Maps MCP Server (TypeScript)

    Bringing location services, geocoding, and mapping to AI assistants via Stadia Maps APIs.

    Stadia Maps MCP Server (TypeScript) implements the Model Context Protocol to provide LLM-based assistants with structured access to Stadia Maps APIs. It enables AI tools to query for geocoding, routing, time zones, map generation, and isochrone calculations. Designed for integration with agentic tools and LLMs, the server enhances spatial intelligence and location-based features in AI workflows.

    • 18
    • MCP
    • stadiamaps/stadiamaps-mcp-server-ts
  • MCP Server for Google Tag Manager

    MCP Server for Google Tag Manager

    Remote MCP server enabling Google Tag Manager integration with AI clients.

    MCP Server for Google Tag Manager enables remote MCP connections with built-in Google OAuth, creating an interface to the Google Tag Manager API. It facilitates secure authentication and streamlined access for AI tools like Claude Desktop and Cursor AI. Developers can quickly configure their MCP clients for seamless integration and manage credentials with ease. Tools and workflows become accessible once authenticated, enhancing contextual interaction and automation through Google Tag Manager.

    • 70
    • MCP
    • stape-io/google-tag-manager-mcp-server
  • Google Ads MCP Server

    Google Ads MCP Server

    Seamlessly connect Google Ads API to MCP clients with automatic authentication and querying.

    Google Ads MCP Server is a FastMCP-powered Model Context Protocol server designed to integrate Google Ads API with MCP clients such as Claude Desktop. It provides automatic OAuth 2.0 authentication, smart token management, GAQL query execution, and keyword research tools. The server enables users to manage accounts, run advanced queries, and generate keyword ideas while maintaining secure local token storage. Optimized for one-click setup, it offers robust features for advertisers and developers looking to leverage Google Ads data with MCP-compatible tools.

    • 76
    • MCP
    • gomarble-ai/google-ads-mcp-server
  • Didn't find tool you were looking for?

    Be as detailed as possible for better results