GeoServer MCP Server

MIT License
10
  • Linux
  • Apple

GeoServer MCP Server

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:

🛠️ 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:
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

{ "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.
pip install uv
  1. Create the Virtual Environment (Python 3.10+):

Linux/Mac:

uv venv --python=3.10

Windows PowerShell:

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

Linux/Mac:

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

Windows 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:

source .venv/bin/activate geoserver-mcp

or

source .venv/bin/activate geoserver-mcp --url http://localhost:8080/geoserver --user admin --password geoserver --debug

Windows PowerShell:

.\.venv\Scripts\activate geoserver-mcp

or

.\.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:

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

Linux:

{ "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.
pip install uv
  1. Create the Virtual Environment (Python 3.10+):
uv venv --python=3.10
  1. Install the package using pip:
uv pip install -e .
  1. Configure GeoServer connection:

Linux/Mac:

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

Windows 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:

source .venv/bin/activate geoserver-mcp

or

source .venv/bin/activate geoserver-mcp --url http://localhost:8080/geoserver --user admin --password geoserver --debug

Windows PowerShell:

.\.venv\Scripts\activate geoserver-mcp

or

.\.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:

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

Linux:

{ "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

ToolDescription
list_workspacesGet available workspaces
create_workspaceCreate a new workspace
get_layer_infoGet detailed layer metadata
list_layersList layers in a workspace
create_layerCreate a new layer
delete_resourceRemove resources

🛠️ Data Operations

ToolDescription
query_featuresExecute CQL queries on vector data
update_featuresModify feature attributes
delete_featuresRemove features based on criteria

🛠️ Visualization

ToolDescription
generate_mapCreate styled map images
create_styleDefine new SLD styles
apply_styleApply 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.

📞 Support

For support, please Open an issue

🏆 Badges

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

A Model Context Protocol server that connects Large Language Models to the GeoServer REST API, enabling AI assistants to query and manipulate geospatial data through natural language.

  1. 🎥 Demo
    1. 📋 Table of Contents
      1. 🚀 Features
        1. 📋 Prerequisites
          1. 🛠️ Installation
            1. 🛠️ Installation (Docker)
            2. 🛠️ Installation (pip)
            3. 🛠️ Development installation
          2. 🛠️ Available Tools
            1. 🛠️ Workspace and Layer Management
            2. 🛠️ Data Operations
            3. 🛠️ Visualization
          3. 🛠️ Client Development
            1. List Workspaces
            2. Get Layer Information
            3. Query Features
            4. Generate Map
          4. 🔮 Planned Features
            1. 🤝 Contributing
              1. 📄 License
                1. 🔗 Related Projects
                  1. 📞 Support
                    1. 🏆 Badges

                      Related MCP Servers

                      • A
                        security
                        A
                        license
                        A
                        quality
                        A production-ready Model Context Protocol server that enables language models to leverage AI-powered web scraping capabilities, offering tools for transforming webpages to markdown, extracting structured data, and executing AI-powered web searches.
                        Last updated -
                        3
                        16
                        Python
                        MIT License
                        • Apple
                      • -
                        security
                        A
                        license
                        -
                        quality
                        A Model Context Protocol server enabling AI agents to access and manipulate ServiceNow data through natural language interactions, allowing users to search for records, update them, and manage scripts.
                        Last updated -
                        9
                        Python
                        MIT License
                      • -
                        security
                        A
                        license
                        -
                        quality
                        A server that enables Large Language Models to discover and interact with REST APIs defined by OpenAPI specifications through the Model Context Protocol.
                        Last updated -
                        658
                        91
                        TypeScript
                        MIT License
                        • Apple
                      • -
                        security
                        A
                        license
                        -
                        quality
                        A Model Context Protocol server that enables AI agents to query Erick Wendel's talks, blog posts, and videos across different platforms using natural language.
                        Last updated -
                        55
                        TypeScript
                        MIT License

                      View all related MCP servers

                      MCP directory API

                      We provide all the information about MCP servers via our MCP API.

                      curl -X GET 'https://glama.ai/api/mcp/v1/servers/mahdin75/geoserver-mcp'

                      If you have feedback or need assistance with the MCP directory API, please join our Discord server