Purpose: mcp-server-email is a Model Context Protocol server that provides email-related capabilities for LLMs, enabling models to compose and send emails and to search for attachment files in a specified directory.
Main capabilities:
- Send emails: supports multiple recipients, allows filling in a subject and body, and optionally adding attachments.
- Attachment search: searches for files in a specified directory by matching filename patterns.
- Secure transmission: sends emails using SMTP.
- Attachment type restrictions: for security reasons, the server supports only a limited set of attachment file types.
Available tools:
- send_email: sends an email based on the provided subject, body, and recipients. Parameters include receiver (string array, required, list of recipient email addresses), body (string, required, email body), subject (string, required, email subject), attachments (string array or string, optional, attachment filenames).
- search_attachments: searches for files in a specified directory whose filenames match a given pattern. Parameters include pattern (string, required, text pattern used to match filenames).
Usage:
- Install the required dependencies.
- Prepare the email configuration: create an email.json file and write the SMTP server configuration into it.
- Start the MCP Email Server.
- Configure the server in a client such as Claude.app (add it to the Claude settings).
- For services such as Gmail, an app-specific password may be required.
Supported attachment file types:
- Documents: doc, docx, xls, xlsx, ppt, pptx, pdf
- Archives: zip, rar, 7z, tar, gz
- Text files: txt, log, csv, json, xml
- Images: jpg, jpeg, png, gif, bmp
Applicable scenarios: suitable for automated workflows that need to automatically send emails with attachments via an LLM, or let the model find attachments in a local directory before sending them; it can be used with mainstream email services such as Gmail, Outlook, Yahoo, QQ Mail, and NetEase 126 Mail.
Limitations: attachment types are subject to security restrictions, and only the file types listed above are supported; some email services require an app-specific password; the specific installation commands, configuration fields, and run commands are not fully provided in the materials. The project uses the MIT license, and contributions of new tools, feature improvements, or documentation enhancements via Pull Request are welcome.