pylos-mcp is a locally running email MCP server for connecting Gmail, Outlook, Microsoft 365, iCloud, or any IMAP mailbox to Claude and other MCP clients, letting the assistant read emails, summarize long email threads, or draft replies.
Purpose and main capabilities:
- Reading emails and threads: get_thread lists the conversation a given email belongs to (including its replies and replies that quote it, covering its own folder, INBOX, and Sent), then get_email reads each one individually with warnings attached.
- Search and flagging: search_emails supports filtering and pagination by free text, sender, recipient, subject, start and end dates, unread status, and flagged status; once manage is enabled, set_flags can mark emails as read, unread, or flagged.
- Drafting and sending: create_draft and send_email support in_reply_to to reply within a thread; quote_original can quote the original text below a reply (only when all recipients were already on the original email), and QUOTE_FORMAT=original quotes in the original format. Sending is off by default; once enabled, SEND_ALLOWLIST must still specify recipients, and SEND_CONFIRM=true shows a confirmation before each send.
- Attachments: get_attachment saves files to DOWNLOAD_DIR without reading their contents into the conversation; drafts and sent emails can only attach files already in the mailbox, specified by folder, uid, and part, and do not accept disk paths.
- Security warnings: six detectors annotate get_email results for hidden text, instruction patterns, encoded blocks, sender mismatch, mixed scripts, and DMARC failures; warning lines are worded by the server itself and do not quote the triggering content.
- Multiple accounts: ACCOUNTS can name up to 10 accounts, with each account's settings suffixed by __ plus the uppercased account name; each tool requires an account to be specified and only lists accounts with the corresponding capability.
Usage:
- Runs locally via npx and requires Node.js 22 or later.
- Claude Desktop can download pylos-mcp.mcpb, open it, and fill in the form; the Claude Code plugin collects settings via a form and stores them in the system credential store; CursoClients such as r and VS Code use JSON configuration entries (VS Code's .vscode/mcp.json uses the servers key).
- You can use EMAIL_PASSWORD_CMD to run a command that outputs the password, avoiding the password entering shell history or configuration files.
- Outlook and Microsoft 365 use PROVIDER=outlook with no password set; on the first email read, the browser opens the Microsoft sign-in page.
- After changing the configuration, the client must be fully restarted, because tools are only registered at startup.
- You can use --demo to start a sample inbox that does not read user settings, does not connect to a mail server, and requires no sign-in.
Use cases:
- Let the assistant answer "what do I need to handle today," summarize long email threads, and draft replies that have been long overdue.
- Provide the assistant with email context in a locally controlled environment while keeping switches for high-risk operations such as sending, moving, and deleting.
Limitations:
- Sending is off by default; once enabled, SEND_ALLOWLIST must be configured, otherwise sending is refused. SEND_CONFIRM requires the client to support MCP elicitation; Claude Desktop currently does not display this confirmation dialog.
- There is no bcc field; disk files cannot be attached; Sieve filter rules cannot be written (Sieve access is read-only); deletion only moves to Trash, with no permanent deletion.
- Raw HTML does not enter the model; the body is taken from the plain-text part or converted to text; invisible characters used to hide instructions are stripped.
- The email body is at most 64 kB (including quotes).
- Email content read by the assistant is sent to the AI client used and the model provider; if emails must never reach the model provider, this is not suitable.
- Fencing and warnings can only reduce, not eliminate, prompt injection risk; if there are network-enabled tools in the same client, they may still constitute an outbound channel.
- Organizations may require administrator approval for third-party apps or enabling SMTP AUTH.
- With multiple accounts, the Claude Desktop installer supports only one account; multiple accounts require JSON configuration.
- The server collects no data and communicates only with the mail server and Outlook's Microsoft sign-in service; it stores the refresh token for Microsoft sign-in.