# Mato Grosso do Sul Open Data MCP for AI Agents AI Agent Connect

> Mato Grosso do Sul Open Data lets you query Brazilian public records directly. It connects your AI agent to the state's official open data portal, allowing you to search datasets, browse government organizations, and run SQL queries on large CSVs or spreadsheets without manually downloading any files.

## Overview
- **Category:** data-analytics
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_1AhdW0jTsKGmPAmWugSHrUX3hdktYZTTcpzTLkQP/ai-agent-connect
- **Tags:** open-data, brazil, public-records, ckan, sql-query

## Description

If you're trying to track public spending or analyze infrastructure in Mato Grosso do Sul, you know the drill. You have to navigate a clunky government portal, find the right department, and then spend way too much time downloading massive CSV files just to find a single piece of information. This Connector changes that. Instead of doing the heavy lifting yourself, you can just ask your agent to find the data for you. It handles the connection to the state's official data portal, letting you pull specific records or run complex queries on the fly. Whether you're looking for vehicle fleet info or public spending records, you can get straight to the answers without the manual download cycle. This tool is part of the Vinkius catalog, which makes it easy to plug into your existing workflow so you can stop copy-pasting and start actually analyzing. You get to stay in your preferred workspace while the agent does the digging across the state's public datasets. It turns a manual, multi-tab process into a single conversation. You get the raw data you need, formatted and filtered exactly how you want it, while the agent handles the API heavy lifting in the background.

## Tools

### get_resource
Pull information about a specific file or link within a dataset. Use this to see the structure of the data you're about to analyze.

### list_organizations
Browse the government organizations responsible for the data. It helps you identify which agency owns the information you need.

### list_packages
Get a complete list of all public data packages available in the state. You can use this to find the right dataset for your project.

### get_package
Get the full details and metadata for a specific dataset package. This helps you understand what's inside a dataset before you start querying it.

### list_groups
See a list of all the different groups within the state's data portal. This is great for getting a bird's eye view of how data is categorized.

### datastore_search_sql
Run complex SQL queries directly on DataStore resources. This is the fastest way to filter and analyze large amounts of data.

### datastore_search
Search through records in a DataStore resource using keywords. Use this for quick lookups when you don't need a full SQL query.

## Prompt Examples

**Prompt:** 
```
What public data packages are available for vehicle fleets in Mato Grosso do Sul?
```

**Response:** 
```
I've found the following relevant datasets for vehicle fleets:

| Package Name | Description |
| :--- | :--- |
| **frota-de-veiculos** | Detailed records of state-owned vehicle fleets |
| **transporte-pessoal** | Public transport data for the region |

Would you like me to get more details on the 'frota-de-veiculos' package?
```

**Prompt:** 
```
Find all records in the 'receita-2023' resource where the value is over 5 million.
```

**Response:** 
```
I've executed the SQL query on the 2023 revenue records. Here are the high-value entries:

* **Transferências Constitucionais**: 5,400,000
* **Investimentos Estaduais**: 4,200,000
* **Pagamentos de Pessoal**: 3,850,000

I found 3 entries exceeding 5 million. Should I pull the full breakdown for any of these?
```

**Prompt:** 
```
Which government organizations are responsible for public spending data?
```

**Response:** 
```
Based on the portal records, the following organizations manage public spending data:

* **Secretaria de Estado do Planejamento**
* **Secretaria de Fazenda**
* **Tribunal de Contas do Estado**

I can list more specific groups within these organizations if you need.
```

## Capabilities

### Query records via SQL
Run complex SQL statements directly on public DataStore resources to filter large datasets.

### Search CSV data
Find specific rows in spreadsheets using keyword searches without downloading the files.

### Browse datasets
Get a full list of all available public data packages from the state portal.

### Identify data owners
List all government organizations and groups responsible for different data categories.

### Inspect file structures
Retrieve metadata for specific resources to see available columns and data types.

## Use Cases

### Tracking urban infrastructure
An analyst needs to find all urban projects in a specific city. They ask the agent to search for 'urban infrastructure' in the resource.

### Budget auditing
A researcher wants to find spending over 1 million. They use a SQL query to filter the 'receita-2023' resource.

### Dataset discovery
A developer wants to see what data is available for a new app. They list all packages to find relevant categories.

### Agency mapping
A journalist wants to know which departments handle vehicle data. They use the organization list to map out the state's data owners.

## Benefits

- Skip the manual download cycle by using list_packages to see everything available instantly.
- Perform deep data analysis on large spreadsheets using datastore_search_sql to filter by specific values.
- Identify the correct government source quickly with list_organizations to ensure your data is from a trusted source.
- Get specific metadata on any file using get_resource so you know exactly what fields are available before you query.
- Automate the collection of public records using datastore_search to save hours of manual searching and filtering.

## How It Works

The bottom line is you get instant access to Brazilian public records without the manual download cycle.

1. Subscribe to the Connector and grab your API key from the Mato Grosso do Sul Data Portal.
2. Add your API key to your configuration to link the Brazilian state data source.
3. Ask your agent to search for specific records or run SQL queries on the public records.

## Frequently Asked Questions

**Can I use the Mato Grosso do Sul Open Data MCP to find public spending records?**
Yes, you can query specific datasets like 'receita-2023' to find detailed spending records and high-value entries directly.

**Does the Mato Grosso do Sul Open Data MCP support SQL queries?**
Yes, it allows you to run complex SQL statements directly on DataStore resources to filter and analyze large amounts of state data.

**Can I use the Mato Grosso do Sul Open Data MCP to find vehicle data?**
Yes, it can access packages like 'frota-de-veiculos' to give you specific details on state-owned vehicle fleets.

**How does the Mato Grosso do Sul Open Data MCP help with research?**
It lets you automate the collection of metadata and specific records from multiple government agencies without manual downloads.

**Is the Mato Grosso do Sul Open Data MCP only for Brazilian data?**
Yes, this Connector is specifically designed to connect to the Mato Grosso do Sul state data portal in Brazil.

**How do I find specific datasets about health or education?**
Use the `list_packages` tool to see all available dataset names, then use `get_package` with a specific ID to see the resources and descriptions related to that topic.

**Can I perform complex filtering on the data records?**
Yes! Use the `datastore_search_sql` tool to execute standard SQL queries (e.g., SELECT, WHERE, GROUP BY) directly against the DataStore resources for precise analysis.

**How do I see which government departments provide the data?**
Use the `list_organizations` action. It will return a list of all state entities and departments that have published data on the portal.