$npx -y skills add LessieAI/lessie-skill --skill lessie-emailSend, manage, and automate emails across multiple providers (Gmail, Outlook, Official Email) via MCP. Use this skill whenever the user wants to send emails, check inbox, manage email threads, create bulk email campaigns, manage drafts, or check email accounts and quotas. Trigger
| 1 | # Lessie Email — Multi-Provider Email Management |
| 2 | |
| 3 | ## Setup |
| 4 | |
| 5 | Add the Lessie Email MCP server to your MCP config (Claude Code `~/.claude.json`, Cursor `~/.cursor/mcp.json`, Codex `~/.codex/config.toml`, etc.): |
| 6 | |
| 7 | ```json |
| 8 | { |
| 9 | "mcpServers": { |
| 10 | "lessie-email-mcp": { |
| 11 | "command": "npx", |
| 12 | "args": ["-y", "@lessie/mcp-server"], |
| 13 | "env": { |
| 14 | "LESSIE_REMOTE_MCP_URL": "https://app.lessie.ai/email-api/mcp-public/mcp" |
| 15 | } |
| 16 | } |
| 17 | } |
| 18 | } |
| 19 | ``` |
| 20 | |
| 21 | ### Uninstall |
| 22 | |
| 23 | Remove the `"lessie-email"` entry from your MCP config and run `rm -rf ~/.lessie/`. |
| 24 | |
| 25 | ## Version check |
| 26 | |
| 27 | Run this check once at the start of each session. Non-blocking — if any command fails, skip silently. |
| 28 | |
| 29 | 1. Read current local version from this file's metadata `version` field above. |
| 30 | 2. Fetch remote version: |
| 31 | ```bash |
| 32 | curl -sf --max-time 5 https://raw.githubusercontent.com/LessieAI/lessie-skill/main/lessie-email/SKILL.md | head -5 | grep 'version:' | head -1 | awk '{print $2}' |
| 33 | ``` |
| 34 | 3. If the remote version is newer → tell the user: |
| 35 | > ⬆️ A newer version of lessie-email skill is available ({current} → {remote}). Run this command to update: |
| 36 | > ``` |
| 37 | > npx skills add LessieAI/lessie-skill -y -g |
| 38 | > ``` |
| 39 | 4. If versions match or check fails → skip, say nothing. |
| 40 | |
| 41 | ## Authorization |
| 42 | |
| 43 | 1. **Directly call `use_lessie`** to perform the desired action — skip authorization if already connected. |
| 44 | 2. **If `use_lessie` fails** (e.g., returns "not authorized" or "remote MCP server not connected") → call `authorize` to start the OAuth flow: |
| 45 | - `authorize` returns an authorization URL. Tell the user you need to open a browser for Lessie login/registration, and open it using the appropriate system command: |
| 46 | - macOS: `open "<url>"` |
| 47 | - Linux: `xdg-open "<url>"` |
| 48 | - Windows: `start "<url>"` |
| 49 | - Tell the user the browser has been opened and they need to complete login/registration. |
| 50 | - After the user confirms, call `authorize` again to verify the connection. |
| 51 | - If authorization fails (timeout, denied, port conflict), follow the diagnostic hints returned by `authorize` and retry. |
| 52 | 3. **After authorization succeeds** → retry the original `use_lessie` call. |
| 53 | |
| 54 | ### Troubleshooting: Authorization repeatedly fails |
| 55 | |
| 56 | **Root cause**: stale `lessie-mcp-server` processes from old sessions occupy the callback port (19836), forcing port fallback and corrupting OAuth client state. |
| 57 | |
| 58 | **Fix** — kill stale processes and clear storage, then re-authorize: |
| 59 | |
| 60 | ```bash |
| 61 | ps aux | grep 'lessie-mcp-server' | grep -v grep | awk '{print $2}' | xargs kill 2>/dev/null |
| 62 | rm -rf ~/.lessie/ |
| 63 | lsof -i :19836 | grep LISTEN # should return nothing |
| 64 | ``` |
| 65 | |
| 66 | Always inform the user before opening the browser — never silently redirect. |
| 67 | |
| 68 | ## Quick start |
| 69 | |
| 70 | After setup, try: |
| 71 | |
| 72 | - "Show me my email accounts and unread counts" |
| 73 | - "Send an email from alice@company.com to bob@example.com about the Q2 report" |
| 74 | - "List my recent email threads" |
| 75 | - "Create a bulk email campaign to these 50 contacts" |
| 76 | - "Draft an email to the engineering team about the sprint review" |
| 77 | - "Mark all emails in this thread as read" |
| 78 | |
| 79 | ## Tools overview |
| 80 | |
| 81 | ### Email Accounts |
| 82 | |
| 83 | | Tool | When to use | |
| 84 | |------|-------------| |
| 85 | | `list_email_accounts_with_unread` | View all linked email accounts with unread counts | |
| 86 | |
| 87 | ### Email Operations |
| 88 | |
| 89 | | Tool | When to use | |
| 90 | |------|-------------| |
| 91 | | `send_email` | Send an email (supports HTML, CC/BCC, attachments, replies) | |
| 92 | | `get_email_detail` | View full email details (content, delivery status, read status) | |
| 93 | | `list_sent_emails` | Browse sent emails with cursor pagination | |
| 94 | | `get_email_quota` | Check daily sending quota for a specific email address | |
| 95 | | `delete_email` | Soft-delete an email | |
| 96 | | `set_email_read_status` | Mark an email as read or unread | |
| 97 | |
| 98 | ### Thread Management |
| 99 | |
| 100 | | Tool | When to use | |
| 101 | |------|-------------| |
| 102 | | `list_threads` | Browse email conversations (all/read/unread filtering) | |
| 103 | | `get_thread_messages` | View all messages in a conversation thread | |
| 104 | | `delete_thread` | Soft-delete an entire conversation thread | |
| 105 | | `set_thread_read_status` | Mark all emails in a thread as read or unread | |
| 106 | |
| 107 | ### Drafts |
| 108 | |
| 109 | | Tool | When to use | |
| 110 | |------|-------------| |
| 111 | | `create_draft` | Create a new email draft | |
| 112 | | `update_draft` | Update an existing draft (subject, content, recipients, etc.) | |
| 113 | | `delete_draft` | Delete a draft | |
| 114 | | `list_drafts` | Browse drafts with cursor pagination | |
| 115 | |
| 116 | ### Bulk Email Tasks |
| 117 | |
| 118 | | Tool | When to use | |
| 119 | |------| |