# Acre Dados Abertos MCP

> Acre Dados Abertos lets your AI agent query public datasets from the State of Acre, Brazil. This MCP allows you to search for specific government packages by topic, check detailed metadata on resources, and filter records directly within large tables without downloading gigabytes of files. It connects complex state-level data into simple conversations.

## Overview
- **Category:** data-analytics
- **Price:** Free
- **Tags:** open-data, public-sector, transparency, dataset-discovery, brazil-government, data-query

## Description

Need to pull figures from a Brazilian government report? You don't have to manually navigate dozens of departmental websites or download massive ZIP archives just to find one number. This MCP lets your agent talk directly to the Acre Dados Abertos portal, treating it like a structured database you can query in natural language. Instead of browsing by folder structure and hoping the right data is inside, your AI client handles the discovery process for you. It finds specific datasets, checks who published them, and even filters records within those tables using specialized tools. You connect this MCP via Vinkius, giving any compatible agent instant access to thousands of public records across different sectors like health or education. Your agent acts as a research assistant, finding the data points so you can focus on what you're actually writing.

## Tools

### get_group
Retrieves specific details about a single thematic group (e.g., 'Health' or 'Economy').

### get_package
Fetches the detailed metadata for one specific dataset package.

### get_resource
Gets technical information about a single data file or resource within a dataset.

### list_groups
Lists every major thematic group available in the Acre open data catalog.

### list_organizations
Shows all government organizations that publish data through the portal.

### list_packages
Lists every available dataset package name in the system.

### search_datastore
Filters and finds specific records inside a large, tabular resource without downloading the entire file.

### search_packages
Searches across all available datasets for packages that match your keywords.

## Prompt Examples

**Prompt:** 
```
Search for datasets related to 'economia' in Acre.
```

**Response:** 
```
I found several datasets. The most relevant are 'PIB Municipal' and 'Arrecadação Estadual'. Would you like to see the detailed metadata for 'PIB Municipal'?
```

**Prompt:** 
```
List all thematic groups available in the Acre Open Data portal.
```

**Response:** 
```
There are several thematic groups, including 'Saúde', 'Educação', 'Economia', and 'Segurança Pública'. Which group would you like to explore for specific datasets?
```

**Prompt:** 
```
Query the datastore for resource ID 8f3e... filtering by municipio 'Rio Branco'.
```

**Response:** 
```
I've retrieved the records from the datastore for Rio Branco. The data includes columns like 'ano', 'valor', and 'descricao'. Would you like me to summarize the results?
```

## Capabilities

### List all available thematic groups
You list every major topic area (like 'Health' or 'Economy') published by the state government.

### Find specific datasets by name
Your agent searches for packages using keywords to pinpoint relevant data sets, like GDP reports or demographic statistics.

### Get deep metadata on a resource
You fetch technical details about any file—its format, source, and how it was created—before you even use the data.

### Query records in a table
Your agent searches inside large CSV files by applying filters (e.g., 'only show Rio Branco for 2020'), so you don't download the whole thing.

## Use Cases

### Comparing municipal spending year-over-year
A data analyst needs to compare education funding across four different municipalities for five years. They instruct their agent to use `search_datastore` on the relevant package, specifying filters by municipality and year, avoiding manual exports.

### Verifying a journalist's claim about environmental policy
A journalist wants proof of resource allocation for Amazonian conservation. They ask their agent to first use `list_groups` to find 'Environment,' then run `search_packages` within that group, and finally retrieve the metadata using `get_package` on the most promising hit.

### Mapping all available data sources for a project
A developer needs to know every potential data source before coding. They ask their agent to run `list_groups` and `list_organizations`, providing them with a full, categorized inventory of what's available.

### Deep dive into a single record's history
A researcher finds one interesting data point. They use the resource ID to run `get_resource` immediately, verifying if the file is an official CSV or just a PDF summary before continuing their research.

## Benefits

- You don't download massive files. By using `search_datastore`, your agent filters records inside large tables, giving you only the exact rows you need.
- Finding related datasets is fast. Instead of browsing folders, use `list_groups` to see every available thematic area and then focus your search.
- You get context on the data source immediately. Using `get_resource` lets you check the file format and provenance before committing to a query.
- It handles the bureaucracy of government portals. Your agent manages the difference between listing organizations using `list_organizations` versus finding specific reports via `search_packages`.
- The whole process is conversational. You just ask your AI client, 'Find me data on X,' and the MCP figures out which tools to run behind the scenes.

## How It Works

The bottom line is you give your agent the question; it handles the complex data portal navigation and extraction process for you.

1. Subscribe to this MCP and connect it to your preferred AI client.
2. (Optional) Enter an Acre API Key into the connection settings for higher query limits.
3. Ask your agent a question like, 'Show me all datasets related to education in Acre.' The agent then uses the available tools to browse and filter the public records.

## Frequently Asked Questions

**How do I find a dataset related to my topic using search_packages?**
You simply ask your agent to run `search_packages` with keywords. The tool scans the entire catalog of datasets and returns matching packages, saving you from manually checking every department.

**Does get_resource help me if I don't know the file format?**
Yes. You pass the resource ID to `get_resource`, and it pulls the technical metadata for that specific file, telling you exactly what kind of data it is (CSV, JSON, etc.).

**Can I filter large files without downloading them using search_datastore?**
Absolutely. That's the point of `search_datastore`. You give your agent a resource ID and filtering criteria—like 'Rio Branco' and '2019'—and it returns only those specific, filtered records.

**What is the difference between list_groups and list_organizations?**
Use `list_groups` when you want to browse by topic (like education or health). Use `list_organizations` when you need to know which specific government body published the data.

**What do I need to use my own API key when running list_groups?**
You can optionally provide an Acre API Key for higher rate limits. This key ensures your queries aren't restricted by default usage caps, giving you reliable access even with heavy data exploration.

**How do I find out what kind of organization published a dataset using get_package?**
The `get_package` tool provides detailed metadata about the package, including its originating government body. This helps you trace the data's provenance and understand who was responsible for publishing it.

**If I want to see all available datasets first, should I use list_packages or search_packages?**
Use `list_packages` if you just need a comprehensive list of every dataset name. If you know keywords, `search_packages` is faster because it lets your agent filter the results immediately.

**After I find a thematic group using list_groups, how do I see what specific data resources are inside?**
Once you have identified the theme via `list_groups`, you should use `get_group` with that group's ID. This will show all associated datasets and organizations relevant to your topic.

**How can I search for datasets related to a specific topic like 'health'?**
Use the `search_packages` tool with the query 'saude'. The agent will return a list of datasets matching that theme from the Acre portal.

**Can I filter data inside a CSV file without downloading it?**
Yes! If the resource is in the Datastore, use the `search_datastore` tool with the Resource ID. You can apply filters like `{"municipio": "Rio Branco"}` to get specific rows.

**How do I find which government departments are publishing data?**
Use the `list_organizations` tool to see all contributing entities, or `list_groups` to see thematic categorizations like 'Environment' or 'Economy'.