Validates whether an IP address falls within a specified CIDR range using precise network calculations. Access via MCP in Cursor or Windsurf for AI-driven network analysis, or call GET /v1/network/ip-in-range directly. Returns boolean true/false with subnet details. Essential for firewall rules, access control, and network segmentation tasks.
curl "https://tinyfn.io/v1/network/ip-in-range" \
-H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/network/ip-in-range', {
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/ip-in-range',
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"
}
}
}
}
Pass the IP and CIDR as parameters to get a boolean result. The tool performs bitwise subnet calculations to determine membership accurately.
Yes, it supports both IPv4 and IPv6 CIDR notation. IPv6 example: checking if 2001:db8::1 falls within 2001:db8::/32.
The tool validates CIDR syntax and returns an error for malformed ranges like missing subnet masks or invalid IP formats.
AI agents in Cursor or Cline can validate IP addresses against whitelist ranges, check firewall rule coverage, or audit network access patterns.
Yes, it correctly identifies all addresses within the CIDR range, including network (.0) and broadcast (.255) addresses for standard subnets.