Get the FREE Ultimate OpenClaw Setup Guide →

email

This Python script implements an MCP (Model Context Protocol) server using the mcp library (FastMCP) that allows an LLM (like Claude) to interact with an email account using POP3 (for reading/deleting emails) and SMTP (for sending emails), both secured with TLS encryption.

How to use

The Email MCP server is a powerful Python script that implements the Model Context Protocol (MCP) using the FastMCP library. It enables interactions with an email account over POP3 for reading and deleting emails, as well as SMTP for sending emails, all secured with TLS encryption. Developers can leverage this server to build applications that need to automate email handling while ensuring secure communication.

Once connected to the Email MCP server, you can issue commands to read, delete, or send emails seamlessly. You may interact with this server using commands like READ, DELETE, and SEND, which allow you to manage your inbox and send outgoing messages. For optimal results, structure your queries to specify email criteria clearly, such as sender or subject, to streamline your email interactions.

How to install

Prerequisites

Before installing the Email MCP server, ensure you have Python 3.x installed on your machine. The mcp library (FastMCP) is also required, so you should have it set up prior to running the server.

Option A: Quick start with npx

If you prefer a quick start without local installation, you can run it using npx with the following command:

npx -y @package/name  

Option B: Global install alternative

To install the Email MCP server globally, clone the repository and install the dependencies:

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

Additional notes

For optimal configuration, ensure you set your email account credentials and server settings as environment variables to keep them secure. Common variables include EMAIL_USER, EMAIL_PASSWORD, SMTP_SERVER, and POP3_SERVER. Be mindful of the TLS requirements; misconfigured settings can lead to connection issues.

Related MCP Servers

Sponsor this space

Reach thousands of developers