Skip to main content
Glama
srobbin

opengov-mcp-server

by srobbin

Servidor MCP de OpenGov

Un servidor MCP (Protocolo de Contexto de Modelo) que permite a clientes MCP como Claude Desktop acceder a las API de Datos Abiertos de Socrata. Esta integración permite a Claude Desktop buscar, recuperar y analizar conjuntos de datos públicos de portales de datos gubernamentales.

Descripción general

Este servidor MCP proporciona acceso a datos abiertos desde cualquier portal de datos impulsado por Socrata, incluidos los de ciudades, estados y agencias federales como:

No se requiere una clave API para el uso básico, ya que el servidor accede a datos públicos.

Related MCP server: json-mcp-server

Características

Con este servidor MCP, los clientes pueden:

  • Busque y descubra conjuntos de datos por palabra clave, categoría o etiquetas

  • Ver metadatos del conjunto de datos e información de columnas

  • Ejecute consultas similares a SQL para recuperar y analizar datos

  • Obtener estadísticas de uso del portal

Instalación para Claude Desktop

Configuración rápida con npx (recomendado)

La forma más sencilla de utilizar este servidor MCP es con npx, que no requiere ninguna instalación:

  1. Crea o edita tu configuración de Claude Desktop :

    Cree o edite claude_desktop_config.json en su directorio de inicio:

    {
      "mcpServers": { 
        "opengov": {
          "command": "npx",
          "args": ["-y", "opengov-mcp-server@latest"],
          "env": {
            "DATA_PORTAL_URL": "https://data.cityofchicago.org"
          }
        }
      }
    }

    Puede reemplazar DATA_PORTAL_URL con cualquier portal de datos impulsado por Socrata.

  2. Reinicie Claude Desktop (si ya estaba ejecutándose)

  3. Comience a utilizar el servidor MCP :

    En Claude Desktop, ahora puedes hacer preguntas como:

    How many cars were towed in Chicago this month?

    y puedes continuar con preguntas que profundicen más en detalle:

    Which make and color were towed the most?
    Also, were there any interesting vanity plates?

    La primera vez que ejecute una consulta, npx descargará y ejecutará automáticamente la última versión del servidor.

Instalación manual desde la fuente

Si prefiere ejecutar desde la fuente (para desarrollo o personalización):

  1. Clonar este repositorio :

    git clone https://github.com/srobbin/opengov-mcp-server.git
    cd opengov-mcp-server
  2. Instalar dependencias y compilar :

    npm install
    npm run build
  3. Crear la configuración de Claude Desktop :

    Cree o edite claude_desktop_config.json en su directorio de inicio:

    {
      "mcpServers": { 
        "opengov": {
          "command": "node",
          "args": [
            "/path/to/your/opengov-mcp-server/dist/index.js"
          ],
          "env": {
            "DATA_PORTAL_URL": "https://data.cityofchicago.org"
          }
        }
      }
    }

    Reemplace /path/to/your/opengov-mcp-server con la ruta real donde clonó el repositorio.

  4. Reinicie Claude Desktop (si ya estaba ejecutándose)

Herramienta disponible: get_data

Este servidor MCP proporciona una herramienta get_data unificada que Claude Desktop utiliza para acceder a los datos de Socrata.

Parámetros

  • type (cadena, obligatorio): Tipo de operación

    • catalog : buscar y listar conjuntos de datos

    • categories : Lista de categorías de conjuntos de datos

    • tags : Lista de etiquetas del conjunto de datos

    • dataset-metadata : Obtener detalles del conjunto de datos

    • column-info : Obtener información de la columna del conjunto de datos

    • data-access : Consultar y recuperar registros

    • site-metrics : Obtener estadísticas del portal

  • domain (cadena, opcional): nombre de host del portal de datos (sin protocolo)

  • query (cadena, opcional): consulta de búsqueda de conjuntos de datos

  • datasetId (cadena): identificador del conjunto de datos para operaciones específicas

  • soqlQuery (cadena, opcional): consulta SoQL para filtrar datos

  • limit (número, opcional): Máximo de resultados a devolver (predeterminado: 10)

  • offset (número, opcional): Resultados a omitir para la paginación (predeterminado: 0)

Consultas de ejemplo

Estos son ejemplos de cómo Claude Desktop formateará las consultas al servidor MCP:

// Find datasets about budgets
{
  "type": "catalog",
  "query": "budget",
  "limit": 5
}

// Get information about a dataset
{
  "type": "dataset-metadata",
  "datasetId": "6zsd-86xi"
}

// Query dataset records with SQL-like syntax
{
  "type": "data-access",
  "datasetId": "6zsd-86xi",
  "soqlQuery": "SELECT * WHERE amount > 1000 ORDER BY date DESC",
  "limit": 10
}

Opciones de configuración

El servidor requiere una variable de entorno:

  • DATA_PORTAL_URL : La URL del portal de datos de Socrata (por ejemplo, https://data.cityofchicago.org )

Esto se puede configurar:

  • En la configuración de Claude Desktop (recomendado)

  • En sus variables de entorno

  • A través de la línea de comandos: DATA_PORTAL_URL=https://data.cityofchicago.org opengov-mcp-server

Available Tools

1 tool
get_dataC

[City of Chicago | Data Portal] Access data and metadata to learn more about the city and its underlying information.

ParametersJSON Schema
NameRequiredDescriptionDefault
typeYesThe type of operation to perform: - catalog: List datasets with optional search - categories: List all dataset categories - tags: List all dataset tags - dataset-metadata: Get detailed metadata for a specific dataset - column-info: Get column details for a specific dataset - data-access: Access records from a dataset (with query support) - site-metrics: Get portal-wide statistics
domainNoOptional domain (hostname only, without protocol). Used with all operation types.
queryNoSearch or query string with different uses depending on operation type: - For type=catalog: Search query to filter datasets - For type=data-access: SoQL query string for complex data filtering
datasetIdNoDataset identifier required for the following operations: - For type=dataset-metadata: Get dataset details - For type=column-info: Get column information - For type=data-access: Specify which dataset to query (e.g., 6zsd-86xi)
soqlQueryNoFor type=data-access only. Optional SoQL query string for filtering data. This is an alias for the query parameter and takes precedence if both are provided.
selectNoFor type=data-access only. Specifies which columns to return in the result set.
whereNoFor type=data-access only. Filters the rows to be returned (e.g., "magnitude > 3.0").
orderNoFor type=data-access only. Orders the results based on specified columns (e.g., "date DESC").
groupNoFor type=data-access only. Groups results for aggregate functions.
havingNoFor type=data-access only. Filters for grouped results, similar to where but for grouped data.
qNoFor type=data-access only. Full text search parameter for free-text searching across the dataset.
limitNoMaximum number of results to return: - For type=catalog: Limits dataset results - For type=data-access: Limits data records returned
offsetNoNumber of results to skip for pagination: - For type=catalog: Skips dataset results - For type=data-access: Skips data records for pagination

TDQS

C2.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description should disclose behavioral traits. It fails to mention that the tool supports multiple operation types, is read-only (implied but not stated), or any other behavioral aspects beyond a generic 'access data and metadata'.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness2/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single vague sentence. While it is concise, it is under-specified and does not effectively convey the tool's capabilities.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness1/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's complexity (13 parameters, multiple operation types, no output schema), the description is extremely incomplete. It does not explain the different operations, query syntax, or return values, leaving the agent with almost no useful context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. The description adds no parameter context beyond what the schema already provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description is vague: 'Access data and metadata to learn more about the city and its underlying information.' It does not specify the specific actions or resources available, despite the schema supporting many operations like 'catalog', 'data-access', etc.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives, nor any context on when not to use it. The description provides no usage context despite the diverse operations.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 1 tool updatev1.0.0
    • First observedget_data

TDQS

C2.4/5.0

Scored across 1 tool

Disambiguation5/5

With only one tool, there is no possibility of confusion between tools, so disambiguation is perfect.

Naming Consistency5/5

The single tool name 'get_data' follows a clear verb_noun pattern, and consistency is trivially maintained.

Tool Count1/5

Only one tool is far below the typical 3-15 range for a well-scoped server, and the broad purpose of accessing open government data likely requires multiple tools.

Completeness1/5

The single generic 'get_data' tool cannot cover the expected operations for a government data portal, such as searching datasets, filtering, or accessing specific data types.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers