Validation Utilities

Validate Email

Checks email address validity using RFC-compliant validation rules. Access via MCP in Cursor or Windsurf, or GET /v1/validate/email REST endpoint. Returns boolean validity plus detailed feedback on syntax errors. Handles complex cases like internationalized domains and quoted local parts that basic regex patterns miss.

API Endpoint

GET /v1/validate/email

Code Examples

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

response = requests.get('https://tinyfn.io/v1/validate/email',
    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 validation tools:

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

Learn more about MCP setup →

FAQ

How does email validation work with MCP tools?

MCP tools like Cursor and Claude Code can call this validator directly during code execution. Returns structured validation results that AI agents can use to provide specific feedback or continue processing valid addresses.

What email formats does this validator accept?

Supports full RFC 5322 specification including quoted local parts, internationalized domains, and complex syntax. Goes beyond simple regex to handle edge cases like 'user@[192.168.1.1]' and '[email protected]'.

Does email validation check if the address actually exists?

No, this performs syntax validation only. It verifies the email format is structurally correct but doesn't ping mail servers or check deliverability.

What's returned when an email fails validation?

Returns validity boolean plus specific error details like 'invalid character in local part' or 'missing @ symbol'. Helps developers provide meaningful user feedback instead of generic 'invalid email' messages.

How does this compare to JavaScript email validation?

More comprehensive than typical regex patterns. Handles RFC edge cases that break simple validation, processes internationalized domains correctly, and provides deterministic results across different environments.

Try Validate Email Now

Get your free API key and start using Validate Email in seconds.

Get Free API Key