IP Address Utilities

Supernet Calculator

Computes the smallest supernet (CIDR block) that encompasses all provided IP networks. Access via MCP in Cursor or Windsurf, or REST at `/v1/ip/supernet`. Pass multiple networks as parameters — returns the minimal encompassing CIDR. Essential for network consolidation, routing optimization, and subnet planning tasks.

API Endpoint

GET /v1/ip/supernet

Code Examples

curl "https://tinyfn.io/v1/ip/supernet" \
  -H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/ip/supernet', {
  headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests

response = requests.get('https://tinyfn.io/v1/ip/supernet',
    headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)

Use via MCP

Add to your AI agent

Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's ip address tools:

{
  "mcpServers": {
    "tinyfn-ip": {
      "url": "https://tinyfn.io/mcp/ip",
      "headers": {
        "X-API-Key": "YOUR_API_KEY"
      }
    }
  }
}

Learn more about MCP setup →

FAQ

How do I find the supernet containing multiple IP networks?

Call the supernet endpoint with your networks as parameters. It calculates the smallest CIDR block that contains all input networks, useful for route aggregation and network planning.

What happens if I pass overlapping or adjacent subnets?

The calculator finds the minimal supernet regardless of overlap. Adjacent subnets like 192.168.0.0/24 and 192.168.1.0/24 would return 192.168.0.0/23.

Can MCP agents use this for automated network design?

Yes, AI agents in Cursor or Cline can call this tool to optimize network architectures, consolidate routing tables, or design efficient subnet hierarchies.

Does it work with IPv6 networks?

The tool handles both IPv4 and IPv6 CIDR blocks, computing supernets for modern dual-stack network environments.

What's the difference between supernet and subnet calculation?

Supernet finds the larger network containing smaller ones (aggregation), while subnet divides a network into smaller blocks (segmentation). This tool does aggregation.

Try Supernet Calculator Now

Get your free API key and start using Supernet Calculator in seconds.

Get Free API Key