Skip to main content
Glama
Karopatu

Email Management MCP Server

by Karopatu

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')

Related MCP server: mcp-imap-server

Debug

  • Stdio: If you run this server in STDIO mode, all logs are saved in server.log file, in the location where you run the command. You can change this, setting the DEBUG_LOG_FILE environment variable to a custom path (absolute path).

  • Docker: this mode use STDIO mode, so all logs are saved in server.log file, in the location where you run the command. You can change this, setting the DEBUG_LOG_FILE environment 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)

  1. Install dependencies pnpm install -g @cardor/email-summarizer

  2. 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)

  1. Clone the repository git clone <repository-url>

  2. Build the Docker image pnpm run docker:build

  3. 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:

  1. Clone the repository git clone <repository-url>

  2. Install dependencies pnpm install

  3. Build the MCP pnpm run build

  4. Start the MCP pnpm run start

  5. 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:

  • Allow execute action as marking emails as read, deleting, etc.

  • 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.).

Install Server
A
license - permissive license
B
quality
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    A
    quality
    F
    maintenance
    Enables AI assistants to read, search, compose, and send emails by connecting to any IMAP/SMTP provider. It supports comprehensive mailbox management, including draft handling and message deletion, directly through natural language.
    10
    188
    9
    MIT
  • F
    license
    -
    quality
    D
    maintenance
    Enables LLMs to read, search, and manage emails via IMAP with secure, read-only access to email accounts.
    6
  • F
    license
    A
    quality
    C
    maintenance
    Enables AI assistants to read recent emails and fetch full email content from an IMAP inbox, allowing natural language queries about email summaries.
    3
  • A
    license
    A
    quality
    D
    maintenance
    Enables LLM clients to read and search email via IMAP with tools for listing folders, searching messages, and fetching message content. It supports pagination, snippets, and thread context, and is designed for local AI workflows.
    10
    MIT

View all related MCP servers

Related MCP Connectors

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Karopatu/email-management-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server