@mcp-monorepo/mail
v1.2.0
Published
MCP server for mail tools (fetch, read, search, mark as seen).
Downloads
65
Readme
@mcp-monorepo/mail
MCP server for mail tools (fetch, read, search, mark as seen).
The Mail MCP package provides a set of tools for interacting with one or more email accounts using the IMAP protocol. It allows an AI agent to fetch recent emails, search through mailboxes, read specific messages, and mark emails as seen.
Key Features
- Multi-Account Connectivity: Connect to and manage multiple IMAP accounts simultaneously, configured via a single environment variable.
- Comprehensive Mail Search: Search across accounts by subject, sender, and even email body content.
- Content-Aware Reading: Intelligently reads email content, automatically converting HTML to plain text for clean, readable output.
- State Management: Includes a tool to mark emails as read (
mark-mails-as-seen), allowing the agent to manage the state of an inbox.
Usage
You can run this MCP server directly using npx for local testing:
npx @mcp-monorepo/mail@latestTo integrate this server with a compatible AI model (like Claude), provide the following MCP server configuration:
{
"mcpServers": {
"mail": {
"command": "npx",
"args": [
"-y",
"@mcp-monorepo/mail"
],
"env": {
"MAIL_ACCOUNTS": "<Your MAIL_ACCOUNTS Here>"
}
}
}
}Environment Variables
| Variable | Description | Default |
| :--- | :--- | :--- |
| MAIL_ACCOUNTS | A space-separated list of IMAP account credentials. Each entry must follow the format user:pass@host:port. | <required> |
Tools
fetch-latest-mails
Fetch Latest Mails - Query all mails from the past two days for all configured accounts. No parameters.
Input Schema
This tool has no defined input schema.
search-mails
Search Mails - Find mails by subject, body, or sender address across all configured accounts. At least one of searchString or fromContains must be set.
Input Schema
| Property | Type | Description |
| :--- | :--- | :--- |
| searchString | string | Substring to search in subject or body. |
| searchBody | boolean | If true, also search in mail body. |
| fromContains | string | Substring to search in sender address. |
read-mail
Read Mail Content - Reads the content and subject/title of specified mails. If only HTML is present, converts it to plain text.
Input Schema
| Property | Type | Description |
| :--- | :--- | :--- |
| username | string | |
| imapServer | string | |
| mailIds | array of string | |
mark-mails-as-seen
Mark Mails as Seen - Marks specified emails as seen/read in the INBOX. Requires username, IMAP server, and a list of mail UIDs.
Input Schema
| Property | Type | Description |
| :--- | :--- | :--- |
| username | string | Username for IMAP authentication |
| imapServer | string | IMAP server hostname |
| mailIds | array of string | List of mail UIDs to mark as seen |
Other MCP Servers
This monorepo contains several other MCP server packages available on npm. Each provides a distinct set of tools for use with the Model Context Protocol.
- @mcp-monorepo/confluence: MCP server for Confluence API tools
- @mcp-monorepo/file-browser: MCP server for file system browsing and manipulation (search, ls, tree, grep, open, write, move, mkdir)
- @mcp-monorepo/ics: MCP server for calendar tools using ICS/ical feeds
- @mcp-monorepo/jira: MCP server for Jira tools (JQL, issue management, etc.).
- @mcp-monorepo/location: MCP server for location-based tools using IP address lookup
- @mcp-monorepo/notion-query: MCP server for querying Notion data sources.
- @mcp-monorepo/npm: MCP server for npm command tools (run scripts, install packages, list scripts)
- @mcp-monorepo/slack: Slack MCP to access workspace without bot account or app
- @mcp-monorepo/weather: Weather MCP tools (geocoding, weather-by-coords) for ModelContextProtocol.
Recent Changes
Version 1.1.4
- fd22b00: Fixed yarn versioning during publish
Version 1.1.3
- Updated dependencies [7929a55]
Version 1.1.2
- 75e8973: migrate monorepo to yarn 4, update CI/husky/scripts and run-on-changed, add yarnrc and packageManager, switch internal deps to workspace:* and simplify bin fields
Authors
- The MCP Monorepo Team
License
This project is licensed under the AGPL-3.0-only License. See the LICENSE file for details.
