# Earthwork Volume Calculator AI Agent Connect

> Earthwork Volume Calculator MCP lets your AI client calculate the volume of material removed or added between existing terrain and design surfaces. It handles various spatial formats including grid-based data, triangulated meshes, and contour lines to provide accurate earthwork estimates.

## Overview
- **Category:** engineering
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_usTJtX9YMlxKl4YfjI4FWKpM3i6Qw7nCKH3YLt3i/ai-agent-connect
- **Tags:** earthwork, volume, contour, terrain, civil-engineering

## Description

You can now give your AI agent the ability to perform heavy-duty civil engineering calculations. This MCP handles the math for quantifying material movement between a proposed design and the current ground level. Instead of manually calculating volumes, you provide the spatial data and let your agent do the heavy lifting. It works with regular grids of elevation points, complex triangulated meshes, or interpolated surfaces derived from contour lines. Whether you are looking at a simple site plan or a complex terrain model, the math stays consistent. You can use it to determine exactly how much dirt needs to be moved to hit your design elevations, helping you avoid costly errors in material estimation.

## Tools

### calculate_contour_volume
This tool estimates volumes by interpolating surfaces from provided contour lines.

### calculate_grid_volume
This tool calculates cut and fill volumes using a regular grid of elevation points.

### calculate_tin_volume
This tool uses a Triangulated Irregular Network (TIN) model to find cut and fill volumes.

### reconcile_volumes
This tool validates that individual volume contributions match the total reported volume for mathematical consistency.

## Prompt Examples

**Prompt:** 
```
Calculate the volume for this grid data: gridData='{"matrix":[[10,12],[11,13]],"cellSize":1}' and designData='{"matrix":[[15,15],[15,15]]}'
```

**Response:** 
```
The total cut volume is 14.0 cubic units, with a fill volume of 0.0.
```

**Prompt:** 
```
What is the net volume if the total cut is 500 and total fill is 450?
```

**Response:** 
```
The net volume is 50.0 (surplus of material).
```

**Prompt:** 
```
Estimate volume from these contour lines: contourLines='[{"elevation":10, "coords":[[0,0],[1,0],[1,1],[0,1]]}]' and designSurface='{"matrix":[[12,12],[12,12]],"cellSize":1}'
```

**Response:** 
```
The estimated fill volume is 4.0 cubic units based on the linear interpolation of the provided contours.
```

## Capabilities

### Grid-based calculation
Your agent uses this when you provide elevation data in a regular matrix format.

### TIN modeling
Your agent uses this to process triangulated irregular networks for more complex terrain.

### Contour interpolation
Your agent uses this to estimate volumes from contour lines.

### Volume reconciliation
Your agent uses this to check the math between specific parts and the total volume.

## Use Cases

### Site Grading
Calculate the exact amount of fill needed to reach a design elevation on a new construction site.

### Material Surplus/Deficit Analysis
Determine if a project will have extra dirt to haul away or if more needs to be brought in.

### Contour-to-Volume Conversion
Turn contour line data into usable volume estimates for rapid site assessment.

### Data Validation
Check that the sum of individual volume segments matches the total project volume.

## Benefits

- Processes multiple spatial data formats including grids and meshes.
- Automates the math between existing terrain and design surfaces.
- Ensures mathematical consistency through volume reconciliation.
- Supports various modeling methods like TIN and contour interpolation.

## How It Works

You connect the MCP to your client and then feed it your spatial data.

1. Connect your MCP-compatible client to Vinkius.
2. Provide your terrain or design data in grid, TIN, or contour format.
3. Your agent selects the appropriate tool to process your specific data type.
4. Your agent returns the calculated cut, fill, or net volumes.

## Frequently Asked Questions

**What kind of data can this MCP process?**
It processes grid-based elevation points, triangulated meshes (TIN), and contour lines.

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

**How does it handle cut and fill?**
The tools calculate the difference between the existing terrain and your proposed design surface to find these volumes.

**What is the purpose of the reconcile tool?**
The reconcile_volumes tool checks that the individual volume parts are mathematically consistent with the total volume.

**Do I need to host this myself?**
No, Vinkius hosts and manages the MCP for you, so it is ready to use immediately after connection.

**What data formats are supported for volume calculation?**
The server supports regular grids, Triangulated Irregular Networks (TIN), and contour lines for surface interpolation.

**How do I verify if my volume calculation is accurate?**
You can use the `reconcile_volumes` tool to check if the sum of individual cell or triangle contributions matches the reported total cut and fill volumes.

**Can I use this with Cursor or Claude Desktop?**
Yes, this MCP server can be connected to Cursor, Claude Desktop, VS Code, Windsurf, and any other MCP-compatible client via Vinkius Edge.
