# vpc-cidr-calculator AI Agent Connect

> Deterministic AWS VPC CIDR and subnet layout generator.

## Overview
- **Category:** infrastructure
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_cS0IyRhvhPl0jrJG1mVXJe41DVbTqyDH5axO1m4q/ai-agent-connect
- **Tags:** vpc, cidr, subnetting, aws-networking, ip-addressing

## Description

This MCP server provides deterministic tools for designing AWS VPC network architectures. Use `get_vpc_layout` to generate non-overlapping subnet CIDR blocks, network addresses, and usable IP counts across multiple availability zones. You can also use `validate_subnet_integrity` to check for CIDR overlaps and `get_ip_summary` to analyze total VPC capacity and utilization. It ensures all subnets adhere to AWS reserved IP rules and fit within your specified VPC CIDR.

## Tools

### get_ip_summary
Provides a high-level summary of the capacity and usage of the VPC

### get_vpc_layout
Generates a complete, deterministic layout of all requested subnets within a given VPC CIDR

### validate_subnet_integrity
Verifies that a provided set of subnet CIDR blocks is mathematically sound and does not overlap

## Prompt Examples

**Prompt:** 
```
Generate a VPC layout for 10.0.0.0/16 with 3 availability zones, including public, private, and database subnets with 100 required IPs each.
```

**Response:** 
```
The VPC layout has been generated. Subnets are allocated sequentially: Public subnets in us-east-1a, 1b, and 1c, followed by Private and Database tiers. All subnets fit within 10.0.0.0/16.
```

**Prompt:** 
```
Check if these CIDR blocks overlap: ['10.0.1.0/24', '10.0.1.128/25']
```

**Response:** 
```
The CIDR blocks overlap. The range 10.0.1.128/25 is contained within 10.0.1.0/24.
```

**Prompt:** 
```
What is the total usable IP count for a 10.0.0.0/24 VPC with one /26 subnet?
```

**Response:** 
```
A /26 subnet has 64 total addresses. After subtracting the 5 AWS reserved IPs, there are 59 usable host IPs available.
```

## Frequently Asked Questions

**How does the tool handle AWS reserved IP addresses?**
The `get_vpc_layout` tool automatically subtracts 5 reserved IP addresses (network, VPC router, DNS, future use, and broadcast) from the total addresses in each subnet to provide an accurate usable IP count.

**Can I verify if my subnet ranges overlap?**
Yes, you can use the `validate_subnet_integrity` tool by providing a list of CIDR blocks to check for mathematical validity and overlapping ranges.

**How do I check the total capacity of my VPC?**
You can use `get_ip_summary` with your VPC CIDR and the list of subnets generated by `get_vpc_layout` to see total addresses, consumed space, and utilization ratios.
