# Email

Email verification for agents: normalize, syntax validate, domain/MX checks (Linux dig, hard timeout), disposable-domain and role-mailbox detection. Never sends email; never SMTP-probes mailboxes.

**Service id:** `email`  
**Version:** `0.1.0`  
**Status:** `available`

## Authentication

MCP endpoint: `https://mcp.glc-rag.hu/mcp` (streamable HTTP)

**Agents (recommended):** self-register with `account_type=agent` to get an
auto-approved token — see [https://mcp.glc-rag.hu/guide/agent](https://mcp.glc-rag.hu/guide/agent).

Or register as a human on the public site (all listed services are auto-approved),
wait for system-admin approval, then create a token.

```http
Authorization: Bearer mcp_...
```

Cursor `mcp.json` example:

```json
{
  "mcpServers": {
    "email": {
      "url": "https://mcp.glc-rag.hu/mcp",
      "headers": {
        "Authorization": "Bearer mcp_YOUR_TOKEN"
      }
    }
  }
}
```

## Tools

### `email_normalize`

Normalize email (lowercase, IDNA domain). Optional Gmail dot/+ strip flags.

**Input schema:**

```json
{
  "type": "object",
  "properties": {
    "email": {
      "type": "string",
      "description": "Email address to inspect"
    },
    "gmail_dots": {
      "type": "boolean",
      "default": false
    },
    "strip_plus": {
      "type": "boolean",
      "default": false
    }
  },
  "required": [
    "email"
  ],
  "additionalProperties": false
}
```

**Examples:**

```json
{
  "email": "Info@Example.COM"
}
```

### `email_validate`

Syntax/sanity validation only (no DNS).

**Input schema:**

```json
{
  "type": "object",
  "properties": {
    "email": {
      "type": "string",
      "description": "Email address to inspect"
    }
  },
  "required": [
    "email"
  ],
  "additionalProperties": false
}
```

**Examples:**

```json
{
  "email": "user@example.com"
}
```

```json
{
  "email": "not-an-email"
}
```

### `email_domain_check`

Domain label/IDN check; optional A/AAAA resolve via dig.

**Input schema:**

```json
{
  "type": "object",
  "properties": {
    "email": {
      "type": "string",
      "description": "Email address to inspect"
    },
    "domain": {
      "type": "string",
      "description": "Domain only (if email omitted)"
    },
    "resolve_a": {
      "type": "boolean",
      "default": false
    },
    "timeout_ms": {
      "type": "integer",
      "minimum": 500,
      "maximum": 5000,
      "default": 2000
    }
  },
  "additionalProperties": false
}
```

**Examples:**

```json
{
  "email": "a@example.com"
}
```

```json
{
  "domain": "example.com",
  "resolve_a": true
}
```

### `email_mx_check`

MX lookup via Linux dig (A/AAAA fallback). No SMTP.

**Input schema:**

```json
{
  "type": "object",
  "properties": {
    "email": {
      "type": "string",
      "description": "Email address to inspect"
    },
    "domain": {
      "type": "string"
    },
    "timeout_ms": {
      "type": "integer",
      "minimum": 500,
      "maximum": 5000,
      "default": 2000
    }
  },
  "additionalProperties": false
}
```

**Examples:**

```json
{
  "email": "user@gmail.com"
}
```

### `email_disposable_check`

Check local disposable/temp email domain list.

**Input schema:**

```json
{
  "type": "object",
  "properties": {
    "email": {
      "type": "string",
      "description": "Email address to inspect"
    }
  },
  "required": [
    "email"
  ],
  "additionalProperties": false
}
```

**Examples:**

```json
{
  "email": "x@mailinator.com"
}
```

### `email_role_detect`

Detect role/shared local-parts (admin, noreply, support, …).

**Input schema:**

```json
{
  "type": "object",
  "properties": {
    "email": {
      "type": "string",
      "description": "Email address to inspect"
    }
  },
  "required": [
    "email"
  ],
  "additionalProperties": false
}
```

**Examples:**

```json
{
  "email": "admin@example.com"
}
```

### `email_status`

Email service health: dig path, list sizes, DNS limits.

**Input schema:**

```json
{
  "type": "object",
  "properties": {},
  "additionalProperties": false
}
```

**Examples:**

```json
{}
```

## Usage notes

Typical flow: email_normalize → email_validate → email_domain_check → email_mx_check → email_disposable_check → email_role_detect. DNS tools use dig off the event loop (max concurrent + timeout) so web/MCP stay responsive. Credits apply per successful tool call; email_status is free.

## Errors / limits

Invalid email shape → is_error or valid=false. dig missing / DNS timeout → ok=false with errors[]. Never blocks the platform event loop.

## Agent discovery

- Agent registration: `https://mcp.glc-rag.hu/guide/agent`
- Markdown: `https://mcp.glc-rag.hu/guide/email.md`
- Index: `https://mcp.glc-rag.hu/llms.txt`
- MCP resource: `docs://email`
