MCP4GVA
Provides access to the Generalitat Valenciana (GVA) ArcGIS REST API for querying land activity data, including layer metadata retrieval, feature queries with SQL filters, record counting, and GeoJSON export capabilities.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP4GVAshow me 10 land activity records from Valencia"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP4GVA - MCP Server para GVA GIS
Servidor MCP (Model Context Protocol) para acceder a la API de GVA GIS (Generalitat Valenciana) - Servicio de Suelo de Actividades.
Endpoint: https://gvagis.icv.gva.es/server/rest/services/Hosted/Suelo_actividades/FeatureServer/2
🎯 Dos Implementaciones Disponibles
Este repositorio contiene dos versiones del mismo servidor MCP para que puedas comparar y aprender:
Versión | Ubicación | Runtime | Comando |
🐍 Python | Directorio raíz | Python 3.10+ |
|
📘 TypeScript |
| Node.js 18+ |
|
📊 Ver COMPARISON.md para una comparación detallada lado a lado
Python Version (este directorio)
Related MCP server: mcp-arcgis-lakeland
¿Qué es esto?
Un servidor MCP que expone la API de ArcGIS REST de la Generalitat Valenciana para que Claude Desktop (y otras aplicaciones MCP) puedan consultar datos de suelo de actividades directamente.
Instalación
Requisito previo: Instalar uv
Primero necesitas tener uv instalado:
# macOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# Windows
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
# O con pip
pip install uvOpción 1: Usar con uvx (RECOMENDADO)
Esta es la forma más simple - no requiere instalación local. Claude Desktop descargará y ejecutará automáticamente.
Configurar Claude Desktop
Edita el archivo de configuración de Claude Desktop:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
Añade esta configuración:
{
"mcpServers": {
"mcp4gva": {
"command": "uvx",
"args": ["mcp4gva"]
}
}
}Nota: Para usar esta opción, el paquete debe estar publicado en PyPI. Para desarrollo local, usa la Opción 2.
Opción 2: Desarrollo local con uvx
Si estás desarrollando o modificando el código:
# 1. Clonar/navegar al repositorio
cd mcp4gva
# 2. Configurar Claude Desktop con ruta localEn claude_desktop_config.json:
{
"mcpServers": {
"mcp4gva": {
"command": "uvx",
"args": [
"--from",
"/ruta/completa/a/mcp4gva",
"mcp4gva"
]
}
}
}Opción 3: Instalación tradicional con pip
# Instalación en desarrollo
cd mcp4gva
pip install -e .
# Configuración en Claude Desktop
{
"mcpServers": {
"mcp4gva": {
"command": "python",
"args": ["-m", "mcp4gva.server"]
}
}
}3. Reiniciar Claude Desktop
Reinicia Claude Desktop para que cargue el nuevo servidor MCP.
Herramientas Disponibles
El servidor expone 4 herramientas que Claude puede usar:
1. gva_layer_info
Obtiene metadatos de la capa (campos, tipo de geometría, sistema de referencia, extensión).
Parámetros: Ninguno
Ejemplo en Claude:
Usa la herramienta gva_layer_info para ver qué campos tiene la capa de GVA GIS2. gva_query
Consulta features de la capa con filtros SQL.
Parámetros:
where(string, default: "1=1"): Cláusula SQL WHEREout_fields(string, default: ""): Campos a devolver (separados por coma o "")return_geometry(boolean, default: true): Devolver geometríaresult_record_count(integer, default: 10): Máximo de registrosresult_offset(integer, default: 0): Offset para paginación
Ejemplo en Claude:
Usa gva_query para obtener los primeros 5 registros donde MUNICIPIO='Valencia'3. gva_count
Cuenta features que cumplen una condición.
Parámetros:
where(string, default: "1=1"): Cláusula SQL WHERE
Ejemplo en Claude:
Cuenta cuántos registros hay en total con gva_count4. gva_export_geojson
Exporta features a formato GeoJSON.
Parámetros:
where(string, default: "1=1"): Filtro SQLout_fields(string, default: "*"): Campos a incluirresult_record_count(integer, default: 100): Máximo de features
Ejemplo en Claude:
Exporta a GeoJSON los primeros 20 registrosEjemplos de Uso en Claude Desktop
Una vez configurado, puedes pedirle a Claude cosas como:
Explorar la capa:
¿Qué información tiene la capa de GVA GIS?Consultar datos:
Obtén 10 registros de la capa de suelo de actividadesFiltrar por campo:
Muéstrame todos los registros del municipio de ValenciaContar registros:
¿Cuántos registros hay en total en la capa?Exportar datos:
Exporta a GeoJSON los primeros 50 registros
Estructura del Proyecto
mcp4gva/
├── mcp4gva/
│ ├── __init__.py
│ └── server.py # Servidor MCP principal
├── pyproject.toml # Configuración del paquete
├── requirements.txt # Dependencias (legacy)
├── claude_desktop_config.json # Ejemplo de configuración
├── gva_gis_client.py # Cliente Python standalone (opcional)
├── examples.py # Ejemplos de uso del cliente (opcional)
└── README.mdUso Standalone (sin MCP)
También incluye un cliente Python que puedes usar directamente:
from gva_gis_client import GVAGISClient
client = GVAGISClient()
# Obtener info
info = client.get_layer_info()
# Consultar
result = client.query(where="1=1", result_record_count=10)
# Contar
count = client.count_features()Ver examples.py para más ejemplos.
Parámetros de Consulta SQL
Operadores básicos
CAMPO = 'valor'
CAMPO > 100
CAMPO >= 100 AND CAMPO <= 200
CAMPO IN ('valor1', 'valor2')
CAMPO LIKE '%texto%'
CAMPO IS NULL
CAMPO IS NOT NULLOperadores lógicos
CAMPO1 = 'A' AND CAMPO2 > 10
CAMPO1 = 'A' OR CAMPO1 = 'B'
NOT (CAMPO = 'valor')Debugging
Para ver los logs del servidor MCP y probar que funciona:
# Opción 1: Ejecutar con uvx (recomendado)
uvx mcp4gva
# Opción 2: Ejecutar con uvx desde directorio local
uvx --from . mcp4gva
# Opción 3: Ejecutar directamente con Python
python -m mcp4gva.server
# Opción 4: Con logging detallado
PYTHONPATH=. python -m mcp4gva.serverLos logs aparecerán en la salida estándar. El servidor MCP se comunica por stdio, así que verás JSON si funciona correctamente.
Verificar que uv/uvx está instalado
uv --version
uvx --versionLimitaciones
La API puede tener restricciones geográficas (IP)
Timeout de 30 segundos por petición
Límite de registros por consulta (usar paginación para grandes datasets)
Solución de Problemas
El servidor no aparece en Claude Desktop
Verifica que
uvesté instalado:uvx --versionVerifica que el archivo de configuración esté en la ubicación correcta
Revisa que la sintaxis JSON sea válida (usa un validador JSON)
Reinicia Claude Desktop completamente (no solo cerrar ventana)
Revisa los logs de Claude Desktop:
macOS:
~/Library/Logs/Claude/Windows:
%APPDATA%\Claude\logs\Linux:
~/.config/Claude/logs/
Probar el servidor manualmente
# Desde el directorio del proyecto
uvx --from . mcp4gvaDeberías ver que el proceso se inicia y espera entrada JSON en stdin. Si ves un error, revísalo.
Error: "command not found: uvx"
Necesitas instalar uv:
# macOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# Luego reinicia tu terminal o ejecuta:
source ~/.bashrc # o ~/.zshrc si usas zshError 403 / Access Denied desde la API
La API tiene restricciones geográficas. Asegúrate de que tu IP tiene acceso (normalmente funciona desde España).
El paquete no se encuentra con uvx
Si usas desarrollo local, asegúrate de usar --from:
{
"command": "uvx",
"args": ["--from", "/ruta/absoluta/a/mcp4gva", "mcp4gva"]
}Verificar dependencias
# Con uvx (crea entorno temporal y verifica)
uvx --from . mcp4gva --help
# Con pip (si instalaste localmente)
python -c "import mcp; import requests; print('Dependencias OK')"Recursos
Licencia
Este proyecto es código abierto. Los datos pertenecen a la Generalitat Valenciana.
Available Tools
4 toolsgva_countC
Count features matching a WHERE clause
| Name | Required | Description | Default |
|---|---|---|---|
| where | No | SQL WHERE clause (e.g., '1=1' for all) | 1=1 |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden but only states the basic function. It doesn't disclose behavioral traits like whether this is a read-only operation, performance implications, error handling for invalid SQL, or if it requires specific permissions. The description is minimal and lacks necessary context for safe use.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that directly states the tool's function without any wasted words. It is appropriately sized and front-loaded, making it easy to grasp quickly.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no annotations and no output schema, the description is incomplete for a tool that performs data operations. It doesn't explain what 'features' are, the data source, return format (e.g., integer count), or error cases, leaving significant gaps in understanding for effective use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage, fully documenting the 'where' parameter with examples. The description adds no additional meaning beyond the schema, such as explaining valid SQL syntax or constraints, so it meets the baseline of 3 where the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Count') and target ('features matching a WHERE clause'), making the purpose understandable. However, it doesn't specify what type of features or from what source (e.g., database table, GIS layer), nor does it differentiate from sibling tools like gva_query which might also involve filtering.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives such as gva_query or gva_layer_info. It mentions a WHERE clause but doesn't explain scenarios where counting is preferred over querying or exporting, leaving usage context implied at best.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
gva_export_geojsonC
Export features to GeoJSON format
| Name | Required | Description | Default |
|---|---|---|---|
| where | No | SQL WHERE clause to filter features | 1=1 |
| out_fields | No | Comma-separated field names or '*' for all | * |
| result_record_count | No | Maximum number of features to export |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. While 'Export' implies a read operation that outputs data, the description doesn't mention whether this tool is safe (non-destructive), has rate limits, requires authentication, or what the output format entails beyond 'GeoJSON format'. This leaves significant behavioral gaps.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is extremely concise—a single, clear sentence with no wasted words. It's front-loaded with the core purpose and efficiently communicates the essential function without unnecessary elaboration.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (exporting data with filtering and field selection), lack of annotations, and no output schema, the description is incomplete. It doesn't address behavioral aspects, usage context, or output details, leaving the agent with insufficient information to use the tool effectively beyond basic parameter passing.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The description adds no parameter-specific information beyond what's already in the input schema, which has 100% coverage. The schema fully documents all three parameters (where, out_fields, result_record_count) with clear descriptions and defaults. The description doesn't compensate or provide additional context, so it meets the baseline of 3.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Export') and the resource ('features to GeoJSON format'), providing a specific verb+resource combination. However, it doesn't distinguish this tool from its siblings (gva_count, gva_layer_info, gva_query), which all appear to work with similar geospatial data but serve different purposes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus its siblings or alternatives. There's no mention of prerequisites, appropriate contexts, or exclusions. The agent must infer usage from the tool name and description alone.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
gva_layer_infoA
Get metadata information about the GVA GIS layer (fields, geometry type, spatial reference, extent)
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It indicates a read operation ('Get metadata information'), which suggests non-destructive behavior, but does not disclose other traits such as authentication needs, rate limits, or response format. The description adds basic context but lacks detailed behavioral disclosure.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that front-loads the core purpose ('Get metadata information') and lists specific metadata types without waste. Every word contributes to understanding the tool's function, making it appropriately sized and well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (0 parameters, no output schema), the description is adequate but could be more complete. It explains what metadata is retrieved but does not cover the return format or any error conditions. Without annotations or output schema, additional context on behavioral aspects would enhance completeness for this read-only tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has 0 parameters with 100% schema description coverage, so no parameter documentation is needed. The description appropriately does not discuss parameters, focusing instead on the tool's purpose. This meets the baseline for tools with no parameters, as it avoids unnecessary details.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Get' and the resource 'metadata information about the GVA GIS layer', specifying the exact types of information returned (fields, geometry type, spatial reference, extent). It distinguishes from siblings like gva_count, gva_export_geojson, and gva_query by focusing on metadata retrieval rather than counting, exporting, or querying data.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for obtaining layer metadata, but does not explicitly state when to use this tool versus alternatives like gva_query for data access or gva_export_geojson for exporting. No exclusions or prerequisites are mentioned, leaving usage context inferred rather than clearly defined.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
gva_queryC
Query features from the GVA GIS layer with SQL-like WHERE clause and optional parameters
| Name | Required | Description | Default |
|---|---|---|---|
| where | No | SQL WHERE clause (e.g., '1=1' for all, 'MUNICIPIO="Valencia"') | 1=1 |
| out_fields | No | Comma-separated field names or '*' for all fields | * |
| return_geometry | No | Whether to return geometry data | |
| result_record_count | No | Maximum number of records to return | |
| result_offset | No | Offset for pagination |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions 'SQL-like WHERE clause and optional parameters' but fails to describe critical behaviors such as authentication requirements, rate limits, error handling, or the format of returned data (especially given no output schema). This leaves significant gaps for an agent to understand how to interact with the tool effectively.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that front-loads the core purpose ('Query features from the GVA GIS layer') and adds essential detail ('with SQL-like WHERE clause and optional parameters'). Every word earns its place with zero waste.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity of a query tool with 5 parameters, no annotations, and no output schema, the description is insufficient. It lacks details on authentication, rate limits, error cases, and the structure of returned data (e.g., geometry format, pagination behavior). This leaves the agent poorly equipped to handle real-world usage scenarios.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the input schema fully documents all 5 parameters with descriptions and defaults. The description adds minimal value beyond this, mentioning 'SQL-like WHERE clause and optional parameters' but not elaborating on parameter interactions or usage nuances. Baseline 3 is appropriate as the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Query features') and resource ('from the GVA GIS layer'), specifying it uses a SQL-like WHERE clause with optional parameters. It distinguishes from siblings like gva_count (counting) and gva_export_geojson (exporting), but doesn't explicitly differentiate from gva_layer_info (which likely provides metadata).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit guidance on when to use this tool versus alternatives like gva_count or gva_export_geojson is provided. The description implies usage for querying features with filtering, but lacks context on prerequisites, performance considerations, or specific scenarios where other tools might be more appropriate.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
The tools have mostly distinct purposes: gva_count counts features, gva_export_geojson exports data, gva_layer_info provides metadata, and gva_query retrieves features. However, gva_count and gva_query both involve WHERE clauses and could be slightly confused for simple counting tasks, though their outputs differ (count vs. feature list).
All tool names follow a consistent 'gva_' prefix with descriptive snake_case suffixes (e.g., count, export_geojson, layer_info, query). This pattern is uniform and predictable across all four tools, making them easy to identify and understand.
With 4 tools, the count is reasonable for a GIS data server, covering core operations like querying, exporting, counting, and metadata retrieval. It might benefit from additional tools for updates or spatial analysis, but it's well-scoped for basic interactions.
The tools cover read operations (query, count, export, metadata) well for a GIS layer, but there are notable gaps: no create, update, or delete tools, which limits full CRUD lifecycle coverage. This could cause agent failures if modifications are needed, though it's sufficient for query and export workflows.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
ArcGIS Hub — open government geospatial data (search + Feature Service query).
Tallahassee-Leon County GIS — Tallahassee-Leon County, Florida open geospatial data (ArcGIS).
Query official statistics of Catalonia (Idescat): tables, metadata and JSON-stat data via MCP.
City of Lakeland GIS — Lakeland, Florida open geospatial data (ArcGIS).
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to search and query Los Angeles County open geospatial datasets (parcels, parks, etc.) via ArcGIS Feature Services.15MIT
- AlicenseNot gradedqualityCmaintenanceEnables searching and querying City of Lakeland, Florida open geospatial data (parcels, zoning, utilities) through ArcGIS Feature Services.16MIT
- AlicenseNot gradedqualityCmaintenanceEnables querying City of Irvine GIS open geospatial data (parcels, zoning, parks) via ArcGIS Feature Services, with tools to search datasets, query layers, and retrieve schema information.17MIT
- AlicenseNot gradedqualityCmaintenanceEnables querying and searching Lancaster County, Pennsylvania open geospatial datasets (parcels, addresses, zoning, public works) via ArcGIS Feature Services. Supports dataset search, layer query with SQL-like filters, and schema retrieval.15MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/pepo1275/mcp4gva'
If you have feedback or need assistance with the MCP directory API, please join our Discord server