Metadata-Version: 2.5
Name: mcpproducts-mail
Version: 0.1.0
Summary: MailMCP — read, search and DRAFT email for agents over IMAP (never sends)
Requires-Python: >=3.10
Requires-Dist: mcp>=1.2.0
Description-Content-Type: text/markdown

# MailMCP 📬

**Read, search, and draft email from any AI agent — over standard IMAP. Local, free, private.**

Works with Gmail, Outlook, Fastmail, or any IMAP server. **Never sends**: drafts are written
to your Drafts folder; a human always presses Send.

## Setup

1. Enable IMAP for your account. Gmail: turn on 2FA, create an **App Password**
   (myaccount.google.com → Security → App passwords).
2. Add the server with credentials in the env block:

**Claude Desktop** (`claude_desktop_config.json`):
```json
{
  "mcpServers": {
    "mail": {
      "command": "uvx",
      "args": ["--from", "git+https://github.com/mkorayemai-web/mail-mcp", "mail-mcp"],
      "env": {
        "IMAP_HOST": "imap.gmail.com",
        "IMAP_USER": "you@gmail.com",
        "IMAP_PASS": "your-app-password"
      }
    }
  }
}
```

## Tools

| Tool | Tier | What it does |
|---|---|---|
| `list_recent` | free | Latest headers from any folder |
| `search_emails` | free | IMAP search: FROM/TO/SUBJECT/BODY + since-days |
| `read_email` | free | Full message body + attachment names |
| `draft_email` | free | Create a draft (never sends) |
| `move_email` | free | Move message to another folder (archive/junk) |
| `cloud_digest` | cloud | Summarised daily inbox brief (needs `MPX_API_KEY`) |

## Example prompts

- "Any email from Stripe this week?" → `search_emails`
- "Draft a reply to John agreeing to Thursday" → `draft_email`
- "Archive everything from notifications@twitter" → `search_emails` + `move_email`

## License

MIT
