Extract network details from CIDR notation including IP range, subnet mask, broadcast address, and host count. Use via MCP in Cursor or Windsurf, or call GET /v1/network/cidr with your CIDR block. For example, 192.168.1.0/24 returns 254 usable hosts, netmask 255.255.255.0, and broadcast 192.168.1.255. Essential for network planning and subnet calculations.
curl "https://tinyfn.io/v1/network/cidr" \
-H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/network/cidr', {
headers: { 'X-API-Key': 'YOUR_API_KEY' }
});
const data = await response.json();
console.log(data);
import requests
response = requests.get('https://tinyfn.io/v1/network/cidr',
headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)
Connect your AI agent (Claude, Cursor, Windsurf, etc.) to TinyFn's network tools:
{
"mcpServers": {
"tinyfn-network": {
"url": "https://tinyfn.io/mcp/network",
"headers": {
"X-API-Key": "YOUR_API_KEY"
}
}
}
}
Returns network address, broadcast address, subnet mask, wildcard mask, total hosts, usable hosts, and IP range boundaries for any valid CIDR block.
Pass the CIDR notation (like 10.0.0.0/16) to the tool. It calculates all network parameters including the 65,534 usable host addresses in this example.
Yes, the tool handles both IPv4 and IPv6 CIDR blocks, calculating appropriate ranges and host counts for each protocol version.
Total hosts includes network and broadcast addresses. Usable hosts excludes these two reserved addresses, giving you the actual assignable IP count.
Agents can validate subnet sizes, calculate IP allocations, check for overlapping ranges, and generate network documentation with precise host counts and boundaries.