GeoServer MCP Server
Servidor MCP de GeoServer
La versión 0.4.0 (Alfa) está en desarrollo activo y se lanzará próximamente. Estamos abiertos a contribuciones y damos la bienvenida a los desarrolladores a unirse a este proyecto.
🎥 Demostración
Related MCP server: QGISMCP
📋 Índice de contenidos
🚀 Características
🔍 Consultar y manipular espacios de trabajo, capas y estilos de GeoServer
🗺️ Ejecutar consultas espaciales en datos vectoriales
🎨 Generar visualizaciones de mapas
🌐 Acceda a servicios web compatibles con OGC (WMS, WFS)
🛠️ Fácil integración con clientes compatibles con MCP
📋 Requisitos previos
Python 3.10 o superior
Ejecución de una instancia de GeoServer con la API REST habilitada
Cliente compatible con MCP (como Claude Desktop o Cursor)
Conexión a Internet para la instalación del paquete
🛠️ Instalación
Elija el método de instalación que mejor se adapte a sus necesidades:
🛠️ Instalación (Docker)
La instalación de Docker es la forma más rápida y aislada de ejecutar el servidor GeoServer MCP. Es ideal para:
Pruebas y evaluaciones rápidas
Despliegues de producción
Entornos en los que desea evitar las dependencias de Python
Implementación consistente en diferentes sistemas
Ejecute geoserver-mcp:
docker pull mahdin75/geoserver-mcp
docker run -d mahdin75/geoserver-mcpConfigurar los clientes:
Si está usando Claude Desktop, edite claude_desktop_config.json Si está usando Cursor, cree .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"
]
}
}
}🛠️ Instalación (pip)
Se recomienda la instalación de pip para la mayoría de los usuarios que desean ejecutar el servidor directamente en su sistema. Este método es ideal para:
Usuarios habituales que quieran ejecutar el servidor localmente
Sistemas donde tenga instalado Python 3.10+
Usuarios que quieran personalizar la configuración del servidor
Fines de desarrollo y prueba
Instalar el administrador de paquetes uv.
pip install uvCrear el entorno virtual (Python 3.10+):
Linux/Mac:
uv venv --python=3.10Windows PowerShell:
uv venv --python=3.10Instale el paquete usando pip:
uv pip install geoserver-mcpConfigurar la conexión GeoServer:
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"Iniciar el servidor:
Si va a usar el escritorio Claude, no necesita este paso. Para el cursor o su propio cliente personalizado, debe ejecutar el siguiente código.
Linux:
source .venv/bin/activate
geoserver-mcpo
source .venv/bin/activate
geoserver-mcp --url http://localhost:8080/geoserver --user admin --password geoserver --debugWindows PowerShell:
.\.venv\Scripts\activate
geoserver-mcpo
.\.venv\Scripts\activate
geoserver-mcp --url http://localhost:8080/geoserver --user admin --password geoserver --debugConfigurar clientes:
Si está usando Claude Desktop, edite claude_desktop_config.json Si está usando Cursor, cree .cursor/mcp.json
Ventanas:
{
"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"
]
}
}
}🛠️ Instalación de desarrollo
La instalación de desarrollo está diseñada para colaboradores y desarrolladores que desean modificar el código base. Este método es adecuado para:
Desarrolladores que contribuyen al proyecto
Usuarios que necesitan modificar el código fuente
Probando nuevas funciones
Fines de depuración y desarrollo
Instalar el administrador de paquetes uv.
pip install uvCrear el entorno virtual (Python 3.10+):
uv venv --python=3.10Instale el paquete usando pip:
uv pip install -e .Configurar la conexión GeoServer:
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"Iniciar el servidor:
Si va a usar el escritorio Claude, no necesita este paso. Para el cursor o su propio cliente personalizado, debe ejecutar el siguiente código.
Linux:
source .venv/bin/activate
geoserver-mcpo
source .venv/bin/activate
geoserver-mcp --url http://localhost:8080/geoserver --user admin --password geoserver --debugWindows PowerShell:
.\.venv\Scripts\activate
geoserver-mcpo
.\.venv\Scripts\activate
geoserver-mcp --url http://localhost:8080/geoserver --user admin --password geoserver --debugConfigurar clientes:
Si está usando Claude Desktop, edite claude_desktop_config.json Si está usando Cursor, cree .cursor/mcp.json
Ventanas:
{
"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"
]
}
}
}🛠️ Herramientas disponibles
🛠️ Gestión de espacios de trabajo y capas
Herramienta | Descripción |
| Obtener espacios de trabajo disponibles |
| Crear un nuevo espacio de trabajo |
| Obtener metadatos de capa detallados |
| Enumerar capas en un espacio de trabajo |
| Crear una nueva capa |
| Eliminar recursos |
Operaciones de datos
Herramienta | Descripción |
| Ejecutar consultas CQL en datos vectoriales |
| Modificar atributos de características |
| Eliminar funciones según criterios |
🛠️ Visualización
Herramienta | Descripción |
| Crear imágenes de mapas con estilo |
| Definir nuevos estilos SLD |
| Aplicar estilos existentes a las capas |
🛠️ Desarrollo de clientes
Si planea desarrollar su propio cliente para interactuar con el servidor GeoServer MCP, puede inspirarse en el ejemplo de implementación de cliente en examples/client.py . Este ejemplo demuestra:
Cómo establecer una conexión con el servidor MCP
Cómo enviar solicitudes y gestionar respuestas
Manejo básico de errores y gestión de conexiones
Ejemplo de uso de diversas herramientas y operaciones
El cliente de ejemplo sirve como un buen punto de partida para comprender el protocolo e implementar sus propias aplicaciones cliente.
Además, aquí está el ejemplo de uso:
Lista de espacios de trabajo
Tool: list_workspaces
Parameters: {}
Response: ["default", "demo", "topp", "tiger", "sf"]
Obtener información de la capa
Tool: get_layer_info
Parameters: {
"workspace": "topp",
"layer": "states"
}
Características de consulta
Tool: query_features
Parameters: {
"workspace": "topp",
"layer": "states",
"filter": "PERSONS > 10000000",
"properties": ["STATE_NAME", "PERSONS"]
}
Generar mapa
Tool: generate_map
Parameters: {
"layers": ["topp:states"],
"styles": ["population"],
"bbox": [-124.73, 24.96, -66.97, 49.37],
"width": 800,
"height": 600,
"format": "png"
}
🔮 Funciones planificadas
[ ] Gestión de cobertura y datos ráster
[ ] Seguridad y control de acceso
[ ] Capacidades de estilo avanzadas
[ ] Operaciones de procesamiento de WPS
[ ] Integración de GeoWebCache
🤝 Contribuyendo
¡Agradecemos tus contribuciones! Puedes ayudarnos de la siguiente manera:
Bifurcar el repositorio
Crear una rama de características (
git checkout -b feature/AmazingFeature)Confirme sus cambios (
git commit -m 'Add some AmazingFeature')Empujar a la rama (
git push origin feature/AmazingFeature)Abrir una solicitud de extracción
Asegúrese de que la descripción de su solicitud de relaciones públicas describa claramente el problema y la solución. Incluya el número de problema correspondiente, si corresponde.
📄 Licencia
Este proyecto está licenciado bajo la licencia MIT: consulte el archivo de LICENCIA para obtener más detalles.
🔗 Proyectos relacionados
Protocolo de contexto del modelo : la implementación principal del MCP
API REST de GeoServer : documentación oficial de GeoServer REST
Cliente Python REST de GeoServer : cliente Python para la API REST de GeoServer
📞 Soporte
Para obtener ayuda, abra un problema.
🏆 Insignias
Available Tools
9 toolscreate_layerC
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
Inputs: data_store (required), layer (required), source (required), workspace (required).
create_styleB
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
Inputs: name (required), sld (required), workspace.
create_workspaceC
Create a new workspace in GeoServer.
Args:
workspace: Name of the workspace to create
Returns:
Dict with status and result information
Inputs: workspace (required).
delete_resourceC
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
Inputs: name (required), resource_type (required), workspace (required).
generate_mapB
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
Inputs: layers (required), bbox, format, height, +2 more.
get_layer_infoC
Get detailed information about a layer.
Args:
workspace: The workspace containing the layer
layer: The name of the layer
Returns:
Dict with layer metadata
Inputs: layer (required), workspace (required).
list_layersB
List layers in GeoServer, optionally filtered by workspace.
Args:
workspace: Optional workspace to filter layers
Returns:
List of layer information dictionaries
Inputs: workspace.
list_workspacesB
List available workspaces in GeoServer.
Inputs: no named parameters.
query_featuresB
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
Inputs: layer (required), workspace (required), filter, max_features, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 9 tools
Each tool has a clearly distinct purpose with no ambiguity. The tools cover different operations like creation (create_layer, create_style, create_workspace), deletion (delete_resource), retrieval (get_layer_info, list_layers, list_workspaces), querying (query_features), and visualization (generate_map). There is no overlap in functionality.
Tool names follow a consistent verb_noun pattern throughout, using snake_case. All tools start with a clear action verb (create, delete, generate, get, list, query) followed by a specific noun, making them predictable and readable.
With 9 tools, this server is well-scoped for managing a GeoServer instance. It covers essential operations for workspaces, layers, styles, and maps without being overly complex or too sparse, making it efficient for agents to handle geospatial data tasks.
The tool set provides comprehensive coverage for core GeoServer operations, including CRUD for layers, styles, and workspaces, along with querying and map generation. A minor gap exists in updating resources (e.g., update_layer or update_style), but agents can work around this by deleting and recreating.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Geospatial AI MCP server — satellite imagery, embeddings, weather, GNS governance
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
The Mercado Pago MCP Server implements the Model Context Protocol to provide AI agents and LLMs with access to Mercado Pago's APIs and tools within compatible development environments. It acts as an intermediary that translates Mercado Pago resources into executable functions (tools) that AI applications can invoke to perform actions and automate flows. The server simplifies integration, enables using documentation to implement or improve code, and optimizes operations through natural language interactions without manual implementations.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceA server that enables Large Language Models to discover and interact with REST APIs defined by OpenAPI specifications through the Model Context Protocol.12,706 npm302MIT
- AlicenseBqualityDmaintenanceA Model Context Protocol server that connects Claude AI to QGIS, enabling direct interaction with the GIS software for project creation, layer manipulation, code execution, and processing algorithms through natural language prompts.1510Creative Commons Zero v1.0 Universal
- AlicenseCqualityDmaintenanceA Model Context Protocol server that connects LLMs to GIS operations, enabling AI assistants to perform accurate geospatial analysis including geometric operations, coordinate transformations, and spatial measurements.87208MIT
- AlicenseBqualityDmaintenanceA server application that provides PostGIS database connection using Model Context Protocol (MCP), enabling spatial database functionality through natural language interactions.2221ISC