# Geometry Calculator MCP

> The Geometry Calculator MCP provides autonomous agents with a deterministic, local engine for solving complex spatial problems. It accurately computes Euclidean distances between points in 2D or 3D space, calculates exact areas of shapes like circles and triangles, and determines volumes for structures such as spheres and cylinders. This is essential math tooling that eliminates guesswork from large language models.

## Overview
- **Category:** developer-tools
- **Price:** Free
- **Tags:** spatial-reasoning, euclidean-geometry, mathematical-engine, 3d-modeling, computational-geometry, autonomous-agents

## Description

When your agent needs to know the dimensions of something—the volume of a storage tank, the area of a foundation slab, or the distance between two survey points—it doesn't guess; it calculates. This MCP connects your AI client directly to an engine that performs pure Euclidean geometry math. You never have to worry about hallucinated measurements again. Because all calculations happen locally, you don't send any sensitive architectural coordinates over the internet. Whether you're running a complex simulation or just checking dimensions for a blueprint, this tool gives your agent absolute mathematical certainty. Vinkius hosts this MCP so that agents connected through any compatible client can access reliable spatial reasoning without needing to build the math engine themselves.

## Tools

### calculate_2d_area
Finds the exact surface area for common flat shapes like circles, rectangles, and triangles based on provided dimensions.

### calculate_distance
Calculates the straight-line Euclidean distance between two specific points using their X, Y, and Z coordinates.

### calculate_3d_volume
Determines the precise internal volume of three-dimensional objects such as spheres, cubes, cylinders, and prisms.

## Prompt Examples

**Prompt:** 
```
Calculate the area of a circle with a radius of 7.5 units.
```

**Response:** 
```
Using the calculate_2d_area tool (shape='circle', params={"radius": 7.5}): The exact area is 176.71458.
```

**Prompt:** 
```
What is the volume of a cylinder with radius 5 and height 10?
```

**Response:** 
```
Using the calculate_3d_volume tool (shape='cylinder', params={"radius": 5, "height": 10}): The volume is 785.398.
```

**Prompt:** 
```
Calculate the Euclidean distance between point A (0, 0, 0) and point B (3, 4, 12).
```

**Response:** 
```
Using the calculate_distance tool: The exact Euclidean distance is 13.
```

## Capabilities

### Determine cross-section areas
Calculates precise 2D areas for common shapes like circles, rectangles, and triangles.

### Calculate spatial volumes
Determines the exact internal capacity or volume of complex 3D objects, including spheres, cubes, and cylinders.

### Measure point-to-point distance
Finds the true Euclidean straight-line distance between any two specified coordinates in 2D or 3D space.

## Use Cases

### Checking foundation layout coordinates
A civil engineer needs to verify the distance between four corner points marked on a site plan. Instead of manually calculating the Pythagorean theorem, they ask their agent to run `calculate_distance` across all pairs of points to ensure structural integrity.

### Calculating material for piping
A mechanical engineer must know the volume of liquid a storage tank will hold. They use `calculate_3d_volume` with cylinder parameters (radius and height) to confirm the capacity before ordering materials.

### Assessing roof material needs
A builder is designing a pitched roof section. Instead of estimating, they ask their agent to use `calculate_2d_area` for the specific triangular and rectangular sections to get an exact surface area for ordering roofing panels.

### Validating component size in CAD
A product designer must ensure a machined part fits within a casing. They use `calculate_3d_volume` and compare the calculated volume to the maximum allowable space, confirming clearance before finalizing the model.

## Benefits

- Eliminate mathematical guesswork. Instead of relying on an agent's probabilistic guess for a measurement, you use the `calculate_distance` tool to get a precise Euclidean reading.
- Maintain absolute data privacy. Because this MCP runs calculations locally, you never send sensitive architectural coordinates or design measurements over the internet.
- Model complex structures confidently. Use `calculate_3d_volume` when determining if a container will hold enough fluid or how much material is needed for a cast component.
- Solve 2D design problems instantly. Quickly determine the area of oddly shaped components using `calculate_2d_area`, whether it's a circle or an irregular triangle.
- Speed up agent reasoning. Your AI client gets immediate, deterministic answers from this MCP, significantly cutting down on multi-step planning and self-correction loops.

## How It Works

The bottom line is that it gives your AI client an instant source of truth for any standard geometric measurement.

1. You prompt your agent with a geometric problem, providing the necessary dimensions (e.g., radius and height).
2. The agent recognizes the need for math and invokes this MCP, passing the specific coordinates or measurements to the appropriate tool.
3. The MCP runs the calculation locally and returns a single, precise number—the exact area, volume, or distance—to your agent.

## Frequently Asked Questions

**Can calculate_2d_area handle curved shapes?**
No. The tool only calculates the area of standard, defined 2D geometric types, like circles, rectangles, and triangles. It's for basic Euclidean shapes.

**How does calculate_3d_volume work for complex objects?**
It handles standard polyhedral or simple curved forms (spheres, cylinders, etc.). For highly irregular or organic shapes, you need to break them down into component parts and run multiple `calculate_3d_volume` calls.

**What inputs does calculate_distance require?**
It requires three coordinates for each point: X, Y, and Z. You can provide two points to find the distance between them in either 2D or full 3D space.

**Is this MCP secure for confidential designs?**
Yes. The engine runs calculations entirely on your client side; coordinates and dimensions never leave your local environment, ensuring absolute privacy.

**When using calculate_2d_area, do I need to specify units for the dimensions?**
Yes, you must use consistent base units across all inputs. The MCP does not automatically convert units (like feet to meters). If your circle radius is in inches and your rectangle width is in centimeters, the calculation will fail or yield incorrect results.

**What happens if I pass impossible dimensions to calculate_3d_volume?**
The tool returns a structured error message. It doesn't guess or hallucinate; instead, it tells you exactly which parameter is invalid (e.g., 'side length cannot be negative'). This provides clear failure handling for your agent.

**Is calculate_distance limited by network latency when running through my AI client?**
No. Because the geometry engine runs 100% locally, it completely bypasses internet latency. The calculation is deterministic and executes near-instantly, making it much faster than external API calls.

**Can calculate_2d_area process composite shapes or overlapping figures?**
No. This MCP is designed to handle single, simple geometric forms (like a single circle or rectangle). For complex shapes, you need to break them down into their constituent parts and run the calculations separately.

**Does it support 3D spatial distances?**
Yes! The `calculate_distance` tool supports both 2D (x,y) and 3D (x,y,z) coordinates, calculating the exact Euclidean distance between any two points.

**Why use this instead of an LLM prompt?**
LLMs predict text; they do not natively compute math. When calculating volumes (like Pi * r^2 * h), LLMs often generate subtly incorrect approximations. This MCP engine guarantees 100% architectural precision.

**Does this require internet access?**
No. The entire engine runs strictly local in your local environment, ensuring that proprietary architectural layouts or sensitive geospatial coordinates never leave your machine.