# Microgrid Energy Balance Calculator AI Agent Connect

> Microgrid Energy Balance Calculator MCP lets your AI client run high-fidelity simulations of energy equilibrium. It handles the math for renewable generation, battery state of charge, and grid connectivity. You can model energy flows over time, check if your system can run in islanded mode, and calculate exactly when you'll need to curtail excess renewable energy.

## Overview
- **Category:** engineering
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_8bbH0dG9EPSFbebfXosPqeSN5gunYu6l8nloTNQr/ai-agent-connect
- **Tags:** microgrid, energy-balance, renewable-energy, battery-management, power-systems

## Description

You can use this MCP to run complex energy management simulations without manual calculations. It gives your agent the ability to model how energy moves through a microgrid over a specific period. You can account for battery limits, generator constraints, and how much renewable power you're actually pulling in. 

If you're designing a system, you can test if it's physically capable of meeting a load while disconnected from the main grid. You can also figure out the exact point where your battery or grid constraints force you to stop using renewable energy. It works for both grid-connected setups and isolated islanded modes, making it a practical tool for testing system stability and resource management.

## Tools

### calculate_curtailment_threshold
This tool finds the maximum amount of renewable energy you can use before you hit battery or grid limits.

### get_system_summary
This tool pulls aggregate statistics from your completed energy simulations.

### simulate_energy_balance
This tool runs a full temporal simulation to track energy balance over a set timeframe.

### validate_microgrid_constraints
This tool checks if your specific microgrid setup can actually handle a load profile while in islanded mode.

## Prompt Examples

**Prompt:** 
```
Simulate a 5-step energy balance with a load of [10, 12, 15, 10, 8], renewable generation of [5, 15, 20, 10, 5], a generator with min 2 and max 20, a battery with 50 capacity and 25 current SoC, and grid-connected mode.
```

**Response:** 
```
The simulation shows a stable energy balance. The battery SoC fluctuated between 25 and 35, and the renewable energy met the load while keeping generator output within limits.
```

**Prompt:** 
```
Check if this microgrid can meet the load [20, 25, 30] with renewable generation [10, 10, 10] and a battery with 40 capacity in islanded mode.
```

**Response:** 
```
The configuration is not feasible for islanded mode. The unmet load occurs at steps 0, 1, and 2 because the local renewable generation and battery capacity are insufficient without grid support.
```

**Prompt:** 
```
What is the maximum renewable energy I can use before I need to curtail it, given a current SoC of 40 and a battery capacity of 100?
```

**Response:** 
```
The maximum allowable renewable energy usage before curtailment is required is 60 units, based on the remaining battery capacity.
```

## Capabilities

### Temporal Simulation
Your agent models energy flows across a defined timeline.

### Islanded Mode Validation
Your agent checks if a configuration can sustain a load without grid access.

### Curtailment Planning
The tool identifies the threshold for excess renewable energy to protect battery health.

### System Aggregation
Your agent gets high-level statistical summaries from simulation runs.

## Use Cases

### Islanded Feasibility Testing
Verify if a remote site can stay powered using only local renewables and batteries.

### Battery Constraint Management
Determine how much renewable energy can be injected before the battery reaches capacity.

### Grid-Connected Modeling
Simulate how a microgrid interacts with the main grid during varying load periods.

### Generator Limit Verification
Ensure generator output stays within minimum and maximum operational bounds.

## Benefits

- Models energy equilibrium by accounting for battery SoC and generator limits.
- Tests islanded mode feasibility against specific load profiles.
- Calculates renewable curtailment thresholds to prevent constraint violations.
- Provides aggregate statistics for completed simulations.

## How It Works

Connect your client to Vinkius and start running simulations immediately.

1. Connect your MCP-compatible client to Vinkius.
2. Provide your agent with load, generation, and battery parameters.
3. Your agent calls the simulation tools to process the data.
4. Your agent receives the results and provides the analysis or summary.

## Frequently Asked Questions

**Can I use this with Claude?**
Yes, you can connect this MCP to any MCP-compatible client like Claude, Cursor, or Windsurf.

**Does it support islanded mode?**
Yes, the MCP includes tools specifically to validate if a microgrid can meet load requirements while in islanded mode.

**How does it handle renewable energy?**
It allows you to model renewable generation and calculate curtailment thresholds to prevent violating battery or grid constraints.

**What kind of data do I need to provide?**
You typically need to provide load profiles, renewable generation levels, battery capacity, current state of charge, and generator limits.

**Do I need to host the MCP myself?**
No, Vinkius hosts and manages the MCP for you. You connect your client and start working.

**How do I simulate a microgrid in islanded mode?**
Set the `operationalMode` parameter to 'islanded' in the `simulate_energy_balance` tool. In this mode, the simulation will ensure no energy is imported from or exported to the grid.

**Can I check if my battery can handle the load?**
Yes, you can use `validate_microgrid_constraints` to determine if your local assets, including the battery, can satisfy the load profile under islanded conditions.

**What is included in the simulation results?**
The `simulate_energy_balance` tool returns a detailed breakdown for each time step, including source contributions (renewable, generator, battery, grid), sink details (load, battery charge, grid export, curtailment), storage trajectory, and unmet load.
