email-mcp-server

csogreen/email-mcp-server

3.2

If you are the rightful owner of email-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

A minimalistic MCP server designed to integrate email data and attachments into LLM contexts.

Tools
3
Resources
0
Prompts
0

email-mcp-server

A minimalistic MCP server for feeding LLM context with email data and attachments.

Overview

Some agent-building applications don’t directly integrate email polling, fetching, or processing. This project provides a plug-and-play server that:

  • Polls an inbox in real time and sends notifications to a webhook (trigger.py).
  • Exposes IMAP/SMTP access as MCP tools so an agent can list, fetch, and reply to emails.
  • Optionally processes image attachments via an external API and returns textual descriptions for downstream use.

Features

  • Real-time inbox monitoring (via IMAP IDLE).
  • MCP server exposing email operations (list-folders, get-messages, reply-to-email, etc.).
  • Attachment handling: plain JSON payloads for non-binary agents.
  • Externalised image description (vision API integration).

Installation

git clone https://github.com/your-org/email-mcp-server.git
cd email-mcp-server
pip install -r requirements.txt

Configuration

Set up a .env file with your credentials and options:

EMAIL_USER=your_email@example.com
EMAIL_PASS=your_password_or_app_password
IMAP_HOST=imap.gmail.com
WEBHOOK_URL=https://your-webhook-endpoint
IMAP_PROXY_API_KEY=some_random_token
LLM_ENDPOINT=https://your-llm-endpoint
LLM_API_KEY=your_llm_api_key

Usage

Run IMAP trigger (webhook notifier):

python trigger.py

Run MCP server:

python server.py

The MCP server will start on port 8001 and expose tools over SSE.

License

MIT. (róbta co chceta)