Create Email Drafts via IMAP
MCP server for creating email drafts on any IMAP-compatible mail server, including Gmail and Outlook.
Maintainer of this project? Claim this page to edit the listing.
0.1.0Add to Favorites
Why it matters
Automate email draft creation by connecting to any IMAP-compatible mail server. This allows AI assistants to generate and save drafts directly to your inbox.
Outcomes
What it gets done
Create email drafts with specified recipients, subjects, and bodies.
Save drafts automatically to the drafts folder on IMAP servers like Gmail or Outlook.
Leverage secure environment variables for IMAP authentication.
Install
Add it to your toolbox
Run in your project directory:
curl -fsSL https://spark.entire.vc/get/vb-imap-mcp | bash Capabilities
Tools your agent gets
Creates an email draft and saves it to the drafts folder on the IMAP server
Overview
IMAP MCP Server
IMAP MCP Server creates email drafts and saves them to the drafts folder of any IMAP-compatible mail server via a single create-draft tool. Use it to have an assistant draft emails for review on your existing mail server; it doesn't send mail, read inbox content, or manage other folders.
What it does
IMAP MCP Server lets an AI assistant create email drafts and save them to the drafts folder of any IMAP-compatible mail server - Gmail, Outlook, or others. It authenticates using standard IMAP credentials passed via environment variables and automatically detects the drafts folder ('INBOX.Drafts' or 'Drafts' depending on the mail server's folder structure).
When to use - and when NOT to
Use this connector when you want an assistant to draft an email (recipient, subject, body) and have it saved directly to your mail server's drafts folder for you to review and send.
Do not use it if you need to send emails directly, read/search existing mail, or manage folders/labels - this connector's only capability is creating drafts. For sending mail or fuller inbox management, use a broader email connector instead.
Inputs and outputs
The create-draft tool takes a recipient, subject, and body, plus an optional from address (defaults to IMAP_USERNAME if omitted). The output is confirmation that the draft was saved to the server's drafts folder.
Capabilities
create-draft: creates an email draft and saves it to the IMAP server's drafts folder
How to install
npx imap-mcp
Configure your MCP client:
{
"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>"
}
}
}
}
Who it's for
Users who want an AI assistant to draft emails for review, saved directly to their existing mail server via IMAP.
Source README
imap-mcp
✨ Features
- Email Draft Creation: Create draft emails that are saved to your IMAP server's drafts folder
- IMAP Integration: Connect to any IMAP-compatible email server (Gmail, Outlook, etc.)
- Secure Authentication: Uses environment variables for secure credential management
- MCP Compatible: Works with Claude and other AI assistants that support the Model Context Protocol
- TypeScript: Full TypeScript support with proper type definitions
Setup
{
"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>"
}
}
}
}
Usage
- Compile TypeScript to JavaScript:
npx tsc
- Run the MCP server:
node dist/index.js
Available Tools
create-draft
Creates a draft email message and saves it to the IMAP server's drafts folder.
Parameters:
to(string, required): The recipient's email addresssubject(string, required): The email subject linebody(string, required): The email body contentfrom(string, optional): The sender's email address (defaults to IMAP_USERNAME)
Example:
{
"to": "recipient@example.com",
"subject": "Meeting Reminder",
"body": "Don't forget about our meeting tomorrow at 2 PM.",
"from": "sender@example.com"
}
The tool will attempt to save the draft to either "INBOX.Drafts" or "Drafts" folder, depending on your email server's folder structure.
FAQ
Common questions
Discussion
Questions & comments · 0
Sign In Sign in to leave a comment.