# ANA Data MCP

> ANA (Movimentação de Dados) provides direct access to Brazil's National Water Agency data. Your AI agent queries real-time and historical records for flow, rainfall, water quality metrics, and cross-section profiles. It handles complex hydrological time series retrieval and management across multiple variables.

## Overview
- **Category:** data-management
- **Price:** Free
- **Tags:** hydrology, brazil-water, environmental-monitoring, rainfall-data, water-quality

## Description

Dealing with Brazilian water data used to mean jumping between government portals, manually finding station codes, and downloading massive spreadsheets just to get a quick trend analysis. Now, you can talk to your AI agent and it does the heavy lifting. This MCP connects directly to the ANA API, letting you pull everything from flow rates and rainfall totals to specific water quality parameters in one go. You're not limited to simple queries; authorized users can even update data series records within the system itself. Vinkius hosts this entire catalog of tools, so whether your client is Claude, Cursor, or another agent, you just connect once and get access to all these hydrological functions. It’s about turning massive, disparate datasets into actionable intelligence without ever leaving your development environment.

## Tools

### create_serie_chuva
Adds a new rainfall series record to the ANA system.

### create_serie_cota
Adds a new river level/stage data series record.

### create_serie_perfil_transversal
Adds a new cross-section profile data series record for engineering analysis.

### create_serie_qa
Adds a new water quality monitoring series record.

### create_serie_resumo_descarga
Adds a new discharge summary data series record.

### create_serie_vazao
Adds a new flow rate (discharge) series record to the system.

### get_serie_chuva
Searches for and retrieves historical rainfall data series using station or date codes.

### get_serie_cota
Retrieves the current and historical river level (stage) data series.

### get_serie_perfil_transversal
Searches for specific cross-section profile datasets needed for mapping river geometry.

### get_serie_qa
Retrieves detailed water quality monitoring data series, including parameters like dissolved oxygen and pH.

### get_serie_resumo_descarga
Gets comprehensive discharge summary records for a given basin or station.

### get_serie_vazao
Retrieves flow rate data series, providing daily measurements of water volume through a section.

### update_serie_chuva
Modifies or corrects existing rainfall data records in the ANA system.

### update_serie_cota
Updates and corrects existing river level (stage) data series records.

### update_serie_perfil_transversal
Corrects or updates geometry in the stored cross-section profile data.

### update_serie_qa
Modifies water quality parameters within an existing monitoring series record.

### update_serie_resumo_descarga
Updates the summary records for river discharge totals when new data becomes available.

### update_serie_vazao
Modifies existing flow rate data series to incorporate corrections or newer measurements.

## Prompt Examples

**Prompt:** 
```
Search for flow series data (vazão) for station code 66070000.
```

**Response:** 
```
I've retrieved the flow data for station 66070000. The series includes daily measurements showing a mean flow of 150 m³/s for the requested period. Would you like to see the full table?
```

**Prompt:** 
```
Get the water quality (QA) series for ID 12345.
```

**Response:** 
```
Accessing Water Quality data... For series ID 12345, I found parameters for Turbidity, Dissolved Oxygen, and pH levels. The last recorded pH was 7.2.
```

**Prompt:** 
```
List the rainfall series (chuva) for station 45001000 on 2023-05-20.
```

**Response:** 
```
Querying rainfall data... On 2023-05-20, station 45001000 recorded a total precipitation of 12.5mm. There are 3 active series associated with this station.
```

## Capabilities

### Querying Hydrometeorological Time Series
Your agent retrieves historical or real-time data for specific variables like rainfall, flow, and water levels using station codes.

### Analyzing Water Quality Data
You pull detailed monitoring series to check environmental health by retrieving parameters such as turbidity and pH.

### Managing River Profiles
The MCP allows you to fetch transverse profile data, which is key for river morphology studies and engineering reports.

### Handling Discharge Summaries
You access summaries of water discharge and current level data necessary for comprehensive basin management.

### Modifying Data Records (Write Access)
Authorized users can create or update the core records for various data series directly in the ANA system.

## Use Cases

### Assessing Flood Risk After a Storm
A civil engineer needs to know if the river is stable. They ask their agent to run `get_serie_chuva` for precipitation, then use that data in conjunction with `get_serie_cota` (water level) and `get_serie_vazao` (flow rate). The agent compiles a single report showing historical correlations between high rainfall and peak flow, allowing immediate structural risk assessment.

### Compliance Reporting for Pollutants
An environmental scientist must prove compliance. They ask the agent to retrieve `get_serie_qa` data across five different sites over a year. The MCP collects parameters like pH and dissolved oxygen from all locations, enabling immediate identification of non-compliant zones.

### Hydraulic Model Initialization
A hydrologist starts a new model build. Instead of gathering geometry data manually, they use `get_serie_perfil_transversal` to pull the baseline cross-section profile for the river segment. This ensures their simulation starts with accurate physical dimensions.

### Correcting Input Data
An authorized user spots an error in a historical flow reading. They don't have to call ANA directly; they use `update_serie_vazao` through the MCP, correcting the data point and maintaining auditability within their workflow.

## Benefits

- Streamlined Access: Instead of manually navigating the ANA website, your agent calls `get_serie_vazao` or `get_serie_chuva`, pulling flow and rainfall data directly into your workflow.
- Full Spectrum Analysis: You don't have to use multiple tools. The MCP handles everything from basic level checks (`get_serie_cota`) to complex environmental analysis using water quality records via `get_serie_qa`.
- Advanced Reporting: When modeling requires precise geometry, you can retrieve the necessary data for river shape using `get_serie_perfil_transversal`, saving hours of manual GIS work.
- Data Integrity Checks: Beyond just reading, authorized users use functions like `update_serie_vazao` or `update_serie_qa` to ensure your analysis is built on the most current data available in the system.
- Cohesive Workflow: Connect this MCP through Vinkius. Your AI client accesses all these hydrological tools from one place, eliminating vendor lock-in and simplifying development setup.

## How It Works

The bottom line is you stop navigating portals; you just ask your agent for the specific data points you need.

1. Subscribe to this MCP and provide your specific ANA Identificador and credentials.
2. Instruct your AI client to perform a task, like 'get rainfall for station XYZ on date ABC'.
3. The agent calls the appropriate function, pulling structured data that your application can immediately use.

## Frequently Asked Questions

**How do I find historical rainfall data using the get_serie_chuva tool?**
You use `get_serie_chuva` and specify the station code and date range. The agent returns a structured time series, meaning you get daily or periodic measurements ready to graph.

**Can I update water quality data with the update_serie_qa tool?**
Yes, if you are an authorized user, you can use `update_serie_qa` to modify existing parameters. This is useful for correcting errors found in historical records.

**What kind of data does get_serie_vazao retrieve?**
It retrieves flow rate data series, giving you measurements of the volume of water passing through a specific point over time. This is critical for modeling discharge and flood risk.

**Does this MCP handle cross-section profiles? Which tool do I use?**
Yes. You need `get_serie_perfil_transversal` to retrieve the transverse profile data, which maps the river's physical geometry for engineering studies.

**Before I run `get_serie_qa`, what credentials do I need for successful access?**
You must provide your official ANA Identificador and Senha. These are the necessary security keys for authenticating against their data systems. Never share these credentials outside of your secure AI client environment.

**How do I establish a new discharge summary record using the `create_serie_resumo_descarga` tool?**
You must supply specific required parameters, including the station code and the desired date range. The system validates these inputs before creating or modifying the series record in the ANA database.

**If I run `get_serie_chuva` with an invalid station code, what error message should I expect?**
The tool will return a specific API failure response indicating that the station identifier was not found. This means you need to double-check your input against valid ANA codes.

**Is there a limit on the amount of data I can retrieve using `get_serie_vazao`?**
The service supports high volumes of searches per request. For extremely large datasets, it's best practice to break your retrieval into smaller, manageable chunks over time.

**How can I search for flow data for a specific station?**
Use the `get_serie_vazao` tool by providing the `codigo_estacao`. You can also filter by `data_busca` to get data for a specific date.

**Is it possible to update existing rainfall records?**
Yes, if you have the necessary permissions, you can use the `update_serie_chuva` tool with the updated JSON data body.

**What information is included in the cross-section profile search?**
The `get_serie_perfil_transversal` tool retrieves morphological data of the riverbed at the station location, including depth and width measurements recorded in the series.