Validates whether a string is a properly formatted IPv4 or IPv6 address. Use via MCP in Cursor or Windsurf for instant validation, or call GET /v1/ip/validate with your IP string. Returns true/false with validation details. Perfect for form validation, network configuration checks, or preprocessing user input before network operations.
curl "https://tinyfn.io/v1/ip/validate" \
-H "X-API-Key: YOUR_API_KEY"
const response = await fetch('https://tinyfn.io/v1/ip/validate', {
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/validate',
headers={'X-API-Key': 'YOUR_API_KEY'})
data = response.json()
print(data)
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"
}
}
}
}
Call the validate_ip tool with your IP string parameter. It returns a boolean result plus validation details for both IPv4 and IPv6 formats.
Yes, it validates both IPv4 (like 192.168.1.1) and IPv6 (like 2001:db8::1) addresses according to their respective RFC specifications.
Returns false with specific error details explaining why the format is invalid, such as out-of-range octets or malformed segments.
Yes, validation checks format correctness regardless of whether the IP is public, private, reserved, or loopback.
Send GET request to /v1/ip/validate with the IP string as a query parameter. Returns JSON with validation status and details.