IP Address Utilities

Ip In Network

Validates whether an IP address falls within a specified network range using CIDR notation. Access via MCP in Cursor or Windsurf for subnet validation in networking scripts, or call GET /v1/ip/in-network with ip and network parameters. Returns boolean true/false — essential for firewall rules, access control, and network segmentation logic.

API Endpoint

GET /v1/ip/in-network

Code Examples

curl "https://tinyfn.io/v1/ip/in-network" \
  -H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/ip/in-network', {
  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/in-network',
    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 check if an IP is in a subnet using CIDR notation?

Pass the IP address and network in CIDR format (e.g., 192.168.1.0/24). Returns true if the IP falls within that subnet range.

What IP address formats does the network checker support?

Supports both IPv4 and IPv6 addresses with standard CIDR notation for network ranges.

Can I use this MCP tool for firewall rule validation in Claude Code?

Yes, ideal for validating access control rules, subnet membership, and network security policies in AI-assisted development workflows.

What happens if I provide an invalid IP or network format?

The tool returns an error for malformed IP addresses or invalid CIDR notation. Always validate input format first.

How do I check multiple IPs against the same network efficiently?

Make separate API calls for each IP. The deterministic nature ensures consistent results across multiple validation checks.

Try Ip In Network Now

Get your free API key and start using Ip In Network in seconds.

Get Free API Key