- Home
- MCP servers
- IMAP
IMAP
- python
45
GitHub Stars
python
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"non-dirty-imap-mcp": {
"command": "uv",
"args": [
"run",
"imap_mcp.server",
"--config",
"config.yaml"
]
}
}
}You can run an MCP server that connects to an IMAP provider to browse, search, and manage your emails while learning your preferences over time. This server exposes a structured way for an MCP client to perform email-related actions, such as listing messages, reading content, composing replies, and organizing messages, all through a standardized MCP interface.
How to use
To operate the IMAP MCP Server, start it with your configuration and connect an MCP client to issue email-related commands. You can browse folders and messages, read message bodies (including text and HTML), draft replies, move or flag messages, and perform basic searches across folders. The server is designed to work with Claude or any MCP-compatible assistant, letting your assistant act as a smart email helper that adapts to your preferences.
How to install
Prerequisites: you need Python 3.8 or higher and an IMAP-enabled email account. You will also use uv to install and run Python-based MCP components.
Install uv if you have not already:
curl -LsSf https://astral.sh/uv/install.sh | sh
How to install
Clone the project, create a virtual environment, and install development dependencies. Run the following steps exactly as shown:
git clone https://github.com/non-dirty/imap-mcp.git
cd imap-mcp
uv venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
uv pip install -e ".[dev]"
How to use the server with a client
Prepare a configuration file for your IMAP account, including host, port, and OAuth2 credentials if you use Gmail. Then start the MCP server using uv with your config file.
Start the MCP server with the following command (provide your path to the config file):
uv run imap_mcp.server --config config.yaml
Starting in development mode
If you want debugging output during development, run the server in development mode.
uv run imap_mcp.server --dev