EM

Email

Created 6 months ago

A Model Context Protocol server that provides email functionality.

development email MCP server documentation

What is Email?

This server enables users to send emails through various email providers, including Gmail, Outlook, Yahoo, Sina, Sohu, 126, 163, and QQ Mail. It also supports attaching files from specified directories, making it easy to upload attachments along with the email content.

Documentation

MCP Email Server

Features

  • Send emails with multiple recipients
  • Support for email attachments
  • Search for files in directories based on pattern matching
  • Secure email transmission using SMTP

Available Tools

  • send_email
  • search_attachments

Installation# Using pip

Install the required dependencies:

pip install pydantic python-dotenv

Email Configuration

An email.json file with SMTP server configurations:

[
  { "domain": "@gmail.com", "server": "smtp.gmail.com", "port": 587 },
  { "domain": "@outlook.com", "server": "smtp.office365.com", "port": 587 },
  { "domain": "@yahoo.com", "server": "smtp.mail.yahoo.com", "port": 587 }
]

Usage# Running the Server

Start the MCP Email Server with:

python -m mcp_email_server (--dir /path/to/attachment/directory)

Configure for Claude.app

Add to your Claude settings:\n\n#### Conda

{
  "mcpServers": {
    "email": {
      "command": "D:\\conda\\envs\\mcp\\python.exe",
      "args": [
        "C:\\Users\\YourUserName\\Desktop\\servers\\src\\email\\src\\mcp_server_email",
        "--dir",
        "C:\\Users\\YourUserName\\Desktop"
      ],
      "env": {
        "SENDER": "[email protected]",
        "PASSWORD": "tuogk......."
      }
    }
  }
}
```\n\n#### UV
```json
{
  "mcpServers": {
    "email": {
      "command": "uv",
      "args": [
        "~\\servers\\src\\email\\src\\mcp_server_email",
        "--dir",
        "C:\\Users\\YourUserName\\Desktop"
      ],
      "env": {
        "SENDER": "[email protected]",
        "PASSWORD": "tuogk......."
      }
    }
  }
}

Security Notes

  • For Gmail and other services, you may need to use an app-specific password
  • The server supports a limited set of attachment file types for security reasons

Supported File Types

  • 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
  • Other: md

Example Usage# Sending an Email

{
  "receiver": ["[email protected]"],
  "subject": "Test Email from MCP Server",
  "body": "This is a test email sent via the MCP Email Server.",
  "attachments": ["document.pdf", "image.jpg"]
}

Searching for Attachments

{
  "pattern": "report"
}

Contributing

We encourage contributions to help expand and improve the MCP Email Server. Whether you want to add new tools, enhance existing functionality, or improve documentation, your input is valuable.

Server Config

{
  "mcpServers": {
    "email-server": {
      "command": "npx",
      "args": [
        "email"
      ]
    }
  }
}

Links & Status

Repository: github.com
Hosted: No
Global: No
Official: No

Project Info

Hosted Featured
Created At: May 23, 2025
Updated At: Aug 07, 2025
Author: Shy2593666979
Category: community
License: MIT License
Tags:
development email MCP