
GeoServer MCP Server
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.
Tools
create_layer
Create a new layer in GeoServer. Args: workspace: The workspace for the new layer layer: The name of the layer to create data_store: The data store to use source: The source data (file, table name, etc.) Returns: Dict with status and layer information
delete_resource
Delete a resource from GeoServer. Args: resource_type: Type of resource to delete (workspace, layer, style, etc.) workspace: The workspace containing the resource name: The name of the resource Returns: Dict with status and result information
query_features
Query features from a vector layer using CQL filter. Args: workspace: The workspace containing the layer layer: The layer to query filter: Optional CQL filter expression properties: Optional list of properties to return max_features: Maximum number of features to return Returns: GeoJSON FeatureCollection with query results
generate_map
Generate a map image using WMS GetMap. Args: layers: List of layers to include (format: workspace:layer) styles: Optional styles to apply (one per layer) bbox: Bounding box [minx, miny, maxx, maxy] width: Image width in pixels height: Image height in pixels format: Image format (png, jpeg, etc.) Returns: Dict with map information and URL
create_style
Create a new SLD style in GeoServer. Args: name: Name for the style sld: SLD XML content workspace: Optional workspace for the style Returns: Dict with status and style information
list_workspaces
List available workspaces in GeoServer.
create_workspace
Create a new workspace in GeoServer. Args: workspace: Name of the workspace to create Returns: Dict with status and result information
get_layer_info
Get detailed information about a layer. Args: workspace: The workspace containing the layer layer: The name of the layer Returns: Dict with layer metadata
list_layers
List layers in GeoServer, optionally filtered by workspace. Args: workspace: Optional workspace to filter layers Returns: List of layer information dictionaries
README
GeoServer MCP Server
<a href="https://badge.mcpx.dev?type=server 'MCP Server'"> <img src="https://badge.mcpx.dev?type=server" title="MCP Server"/> </a> <p align="center"> A Model Context Protocol (MCP) server implementation that connects Large Language Models (LLMs) to the GeoServer REST API, enabling AI assistants to interact with geospatial data and services. </p>
<div align="center"> <img src="docs/images/geoserver-mcp.png" alt="GeoServer MCP Server Logo" width="400"/> </div>
🏆 Badges & Indexes
<div align="center"> <a href="https://glama.ai/mcp/servers/@mahdin75/geoserver-mcp"> <img width="380" height="200" src="https://glama.ai/mcp/servers/@mahdin75/geoserver-mcp/badge" alt="GeoServer Server MCP server" /> </a> <br/><br/><br/> <a href="https://mcp.so/server/Geoserver%20MCP%20Server/mahdin75"> <img src="https://mcp.so/logo.png" alt="MCP.so Badge" width="150"/> </a> </div>
📋 Table of Contents
- Features
- Prerequisites
- Installation
- Configuration
- Available Tools
- Example Usage
- Planned Features
- Contributing
- License
- Related Projects
- Support
🚀 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)
- 🔄 Real-time interaction with GeoServer REST API
- 📊 Support for complex spatial operations
- 🛠️ 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)
geoserver-rest
package- Internet connection for package installation
🛠️ Installation
- Clone the repository:
git clone https://github.com/mahdin75/geoserver-mcp.git
cd geoserver-mcp
- Install the package:
pip install -e .
- 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"
- Start the server:
geoserver-mcp-server
🔧 Configuration
Command-line Arguments
geoserver-mcp-server --url http://localhost:8080/geoserver --user admin --password geoserver --debug
Environment Variables
Variable | Description | Default |
---|---|---|
GEOSERVER_URL | GeoServer instance URL | http://localhost:8080/geoserver |
GEOSERVER_USER | Admin username | admin |
GEOSERVER_PASSWORD | Admin password | geoserver |
MCP Client Integration
Claude Desktop
Edit claude_desktop_config.json
:
{
"mcpServers": {
"geoserver-mcp-server": {
"command": "geoserver-mcp-server",
"args": [
"--url",
"http://localhost:8080/geoserver",
"--user",
"admin",
"--password",
"geoserver"
]
}
}
}
Cursor
Create .cursor/mcp.json
:
{
"mcpServers": {
"geoserver-mcp-server": {
"command": "geoserver-mcp-server",
"args": [
"--url",
"http://localhost:8080/geoserver",
"--user",
"admin",
"--password",
"geoserver"
]
}
}
}
🛠️ Available Tools
Catalog 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 |
📚 Example Usage
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
- [ ] Batch operations support
- [ ] Performance optimizations
- [ ] Extended query capabilities
🤝 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
- Model Context Protocol - The core MCP implementation
- GeoServer REST API - Official GeoServer REST documentation
- GeoServer REST Python Client - Python client for GeoServer REST API
📞 Support
For support, please Open an issue
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.