- Home
- MCP servers
- IMAP
IMAP
- typescript
9
GitHub Stars
typescript
Language
4 months ago
First Indexed
3 weeks 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": {
"dominik1001-imap-mcp": {
"command": "npx",
"args": [
"imap-mcp"
],
"env": {
"IMAP_HOST": "<IMAP host>",
"IMAP_PORT": "<IMAP port>",
"IMAP_USE_SSL": "<true or false>",
"IMAP_PASSWORD": "<IMAP password>",
"IMAP_USERNAME": "<IMAP username>"
}
}
}
}The IMAP Model Context Protocol (MCP) server exposes IMAP operations as tools you can call from AI assistants. It lets you connect to any IMAP-compatible email service and create draft emails directly in your server’s Drafts folder, enabling automated email composition and workflow tasks through MCP-enabled clients.
How to use
You interact with this MCP server through an MCP client. Configure a local (stdio) server entry to run the MCP agent, then issue tool calls from your AI assistant to perform IMAP actions. The primary available tool is create-draft, which saves a draft email to your IMAP server.
Typical usage involves starting the MCP server locally and then invoking the create-draft tool from your AI assistant with the recipient, subject, and body. The draft will be saved to your server’s drafts folder (usually INBOX.Drafts or Drafts, depending on your provider). If you want to specify the sender, pass from in the tool parameters; otherwise the server uses your IMAP username.
How to install
Prerequisites: Node.js and npm (or your preferred Node toolchain). You will compile TypeScript to JavaScript and run the resulting distribution.
# 1) Install dependencies if needed (project may provide a package.json)
npm install
# 2) Compile TypeScript to JavaScript
npx tsc
# 3) Run the MCP server
node dist/index.js
Configuration and environment variables
Configure the MCP server with your IMAP credentials. The following environment variables are used to connect to your IMAP server.
{
"mcpServers": {
"imap": {
"command": "npx",
"args": [
"imap-mcp"
],
"env": {
"IMAP_HOST": "<IMAP host>",
"IMAP_PORT": "<IMAP port>",
"IMAP_USERNAME": "<IMAP username>",
"IMAP_PASSWORD": "<IMAP password>",
"IMAP_USE_SSL": "<true or false>"
}
}
}
}
Environment variables you’ll need
The server relies on the following variables to establish a secure IMAP connection.
- IMAP_HOST — IMAP host name or IP address
- IMAP_PORT — IMAP port number
- IMAP_USERNAME — IMAP account username
- IMAP_PASSWORD — IMAP account password
- IMAP_USE_SSL — whether to use SSL (true/false)
Available tools
create-draft
Creates a draft email message and saves it to the IMAP server's drafts folder. Requires to, subject, and body. Optional from to override the sender.