GeoServer

A Model Context Protocol (MCP) server implementation that connects LLMs to the GeoServer REST API
  • python

56

GitHub Stars

python

Language

6 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "mahdin75-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"
      ],
      "env": {
        "GEOSERVER_URL": "http://localhost:8080/geoserver",
        "GEOSERVER_USER": "admin",
        "GEOSERVER_PASSWORD": "geoserver"
      }
    }
  }
}

You can connect to a GeoServer instance using the GeoServer MCP Server to enable AI agents to interact with GeoServer REST APIs, manage geospatial data, and generate map visualizations through MCP-enabled clients.

How to use

You will run the MCP server and configure your client to talk to it. The server acts as a bridge between your geospatial data exposed via GeoServer REST APIs and your MCP-compatible AI client. Start the MCP server using one of the provided deployment methods, then point your MCP client to the server so you can list workspaces, query features, manage datastores, and generate maps through natural language or scripted prompts.

How to install

Prerequisites you should have before starting include Python 3.10 or higher and a GeoServer instance with the REST API enabled. You also need an MCP-compatible client and an internet connection for package installation.

Install via Docker (quickest and isolated)

pull mahdin75/geoserver-mcp
run -d mahdin75/geoserver-mcp

Additional installation approaches and client configuration

Configure clients to connect to the MCP server using the credentials and URL that you set during the server startup. The following client configuration example demonstrates how to launch the MCP server through Docker while providing GeoServer connection details to the container.

File storage and --storage usage

File storage is supported as an optional base directory for all file read/write operations used by data tools. You can provide relative paths (relative to storage root) or absolute paths. If storage is not set, paths are resolved from the working directory.

When running in Docker, mount a host directory to the container and then start the server with the storage base path configured inside the container.

Supported tools and endpoints overview

The server exposes tools to manage workspaces, datastores, layers, layer groups, users, feature types, styles, and system operations. You can list workspaces, query features, publish stores, create layers, and generate maps, among other actions.

Client development and usage examples

If you are building your own client, you can start by connecting to the MCP server and experimenting with tools such as listing workspaces, getting layer information, querying features, and generating a map. The following examples illustrate interactions you can implement in your client code.

Planned features

Planned enhancements include expanded coverage and raster data management, security and access control, advanced styling, WPS processing, and integration with GeoWebCache.

Contributing

Contributions are welcome. You can fork the project, create a feature branch, commit your changes, push, and open a pull request with a clear description of the problem and solution.

License

The project is licensed under the MIT License. See the license for details.

Support

For support, open an issue describing your problem or question.

Available tools

list_workspaces

List available workspaces in the GeoServer instance.

get_layer_info

Retrieve detailed information about a specific layer.

query_features

Query features from a vector layer using a CQL filter.

generate_map

Generate a map visualization from specified layers and styles.

create_workspace

Create a new workspace in GeoServer.

create_datastore

Create a new datastore within a workspace.

list_layers

List layers in GeoServer, with optional workspace filtering.

get_manifest

Fetch GeoServer manifest metadata/details.

get_status

Obtain general server status.

get_version

Fetch GeoServer version string.

reload_geoserver

Reload catalog and configuration from disk.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational