Email Management MCP Server
Enables users to connect to their email inbox via IMAP to search, filter, and summarize emails based on criteria like subject, date, and sender. Supports marking emails as read and provides customizable email summarization with various prompt options.
README
Email Management
This project is designed to summarize emails using a custom IMAP client to connect to the user's email inbox and retrieve relevant messages based on specified criteria.
Features
- Connects to an IMAP server to fetch emails.
- Can filter emails by:
- Subject
- Date range
- Sender email address
- Mailbox (default is 'INBOX')
Debug
- Stdio: If you run this server in STDIO mode, all logs are saved in
server.logfile, in the location where you run the command. You can change this, setting theDEBUG_LOG_FILEenvironment variable to a custom path (absolute path). - Docker: this mode use STDIO mode, so all logs are saved in
server.logfile, in the location where you run the command. You can change this, setting theDEBUG_LOG_FILEenvironment variable to a custom path (absolute path). - Stream: If you run this server in stream mode, all logs are printed to the console.
Available Tools
search-emails: Get emails from the user's inbox.mark-emails-as-read: Mark specified emails as read.
Usage
Command (NPM)
- Install dependencies
pnpm install -g @cardor/email-summarizer - Add the configuration to your app client.
"email-summarizer": {
"type": "stdio", // Maybe your client MCP require specific type, like 'stdio'
"command": "cardor-email-summarizer",
"env": {
// Your email address.
"EMAIL_USERNAME": "<your-email>",
// Your email app password.
"EMAIL_PASSWORD": "<your-app-password>",
// The port for the IMAP server (default is 993).
"EMAIL_PORT": "993",
// The type of email client: gmail, outlook, yahoo, etc (default is 'gmail').
"EMAIL_CLIENT_TYPE": "gmail",
// Custom prompt for summarization. Must include `{{emails}}` to insert the email content.
"EMAIL_PROMPT": "Summarize the following emails: {{emails}}",
// You can also use a file path to load the prompt content. You must use absolute path.
// The file types supported are: .txt, .md, .json or .pdf.
// "EMAIL_PROMPT": "file://Absolute/Path/To/Prompt.txt"
// Also you can define a URL to load the prompt content. The URL must return a text content.
// The file types supported are: .txt, .md, .json or .pdf.
// "EMAIL_PROMPT": "https://example.com/path/to/prompt.txt"
}
}
Command (With Docker)
- Clone the repository
git clone <repository-url> - Build the Docker image
pnpm run docker:build - Add the configuration to your app client.
"email-dock": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"EMAIL_USERNAME=<your-email>",
"-e",
"EMAIL_PASSWORD=<your-app-password>",
"-e",
"EMAIL_PORT=993",
"-e",
"EMAIL_CLIENT_TYPE=gmail",
"-e",
// Custom prompt for summarization. Must include `{{emails}}` to insert the email content.
// As above, you can use a file path or a URL.
"EMAIL_PROMPT=Summarize the following emails: {{emails}}",
"email-summarizer",
]
}
Stream HTTP requests
You can also use the HTTP API to interact with the email summarizer. The API expects the following headers:
- Clone the repository
git clone <repository-url> - Install dependencies
pnpm install - Build the MCP
pnpm run build - Start the MCP
pnpm run start - Use the MCP serve to
http://localhost:5555/mcp
- Send in headers:
email-username: Your email address.email-password: Your email app password.email-port: The port for the IMAP server (default is 993).email-client-type: The type of email client (default is 'gmail').email-prompt: Custom prompt for summarization (default is 'Summarize the following emails: {{emails}}'). Must include{{emails}}to insert the email content. As above, you can use a file path or a URL.
Future work
I'll be working on:
- [x] Allow execute action as marking emails as read, deleting, etc.
- [x] Allow override default prompt for the summarization.
- [ ] Adding more filters and options for email retrieval.
- [ ] Allow fetch whole body information of the email (text, HTML, attachments, etc.).
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。