MCP Email Server
@Shy2593666979
About MCP Email Server
一个基于 MCP (Model Context Protocol) 的邮件服务,支持 LLM 发送带附件的电子邮件及在指定目录中搜索文件。提供安全的 SMTP 传输、多收件人支持和附件模式匹配搜索功能,适用于 Gmail、Outlook、Yahoo、QQ 邮箱和网易 126 邮箱等主流邮箱服务。
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"mcp-server-email": {
"command": "python",
"args": [
"-m",
"mcp_email_server",
"(--dir",
"/path/to/attachment/directory)"
]
}
}
}Tools
2Sends emails based on the provided subject, body, and receiver.
Searches for files in a specified directory that match a given pattern.
Overview
What is MCP Email Server?
The MCP Email Server is a Model Context Protocol server that enables LLMs to compose and send emails and search for attachments in specified directories using SMTP.
How to use MCP Email Server?
Install dependencies (pydantic, python-dotenv), create an email.json file with SMTP server configurations, set the SENDER and PASSWORD environment variables, and run the server with python -m mcp_email_server --dir /path/to/attachment/directory. Configure it in Claude.app by adding the server details to the MCP servers settings.
Key features of MCP Email Server
- Send emails with multiple recipients and attachments
- Search for files in directories using pattern matching
- Secure email transmission via SMTP
- Supports common file types for attachments (documents, archives, text, images)
- Provides both tools and prompts for email and attachment operations
Use cases of MCP Email Server
- An LLM assistant sending an email with attachments on behalf of a user
- Automating email notifications by composing and sending messages from within a conversation
- Searching a local directory for files that match a pattern before attaching them to an email
- Integrating email capability into a Claude-based workflow without leaving the chat
FAQ from MCP Email Server
What dependencies are required?
The server requires pydantic and python-dotenv packages. Install them via pip.
How do I configure email credentials?
Set the SENDER environment variable to your email address and PASSWORD to your SMTP password or app-specific password. For Gmail and similar services, an app‑specific password may be required.
What file types are supported for attachments?
The server supports 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), and other files like md.
How do I set up the SMTP server?
Create an email.json file in the server directory with an array of objects, each containing domain (e.g., @gmail.com), server (e.g., smtp.gmail.com), and port (typically 587).
Are there any security considerations?
You should use an app‑specific password for email accounts that require it. The server also restricts attachment file types to a limited list for security reasons.
Frequently asked questions
What dependencies are required?
The server requires `pydantic` and `python-dotenv` packages. Install them via pip.
How do I configure email credentials?
Set the `SENDER` environment variable to your email address and `PASSWORD` to your SMTP password or app-specific password. For Gmail and similar services, an app‑specific password may be required.
What file types are supported for attachments?
The server supports 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), and other files like md.
How do I set up the SMTP server?
Create an `email.json` file in the server directory with an array of objects, each containing `domain` (e.g., `@gmail.com`), `server` (e.g., `smtp.gmail.com`), and `port` (typically 587).
Are there any security considerations?
You should use an app‑specific password for email accounts that require it. The server also restricts attachment file types to a limited list for security reasons.
Basic information
More Communication MCP servers
飞书MCP服务器
sdd330MCP server provides feishu related operations
MCP-Discord
barryyip0625Implement Discord MCP server enabling AI assistants to interact with the Discord platform.
Twilio MCP Monorepo
twilio-labsMonorepo providing 1) OpenAPI to MCP Tool generator 2) Exposing all of Twilio's API as MCP Tools
Mattermost MCP Server
pvevMattermost MCP server to enable Claude to interact with Mattermost Workspaces
Discord MCP Server
hanwegMCP server for discord bot
Comments