MCP Connector

Create Email Drafts via IMAP

MCP server for creating email drafts on any IMAP-compatible mail server, including Gmail and Outlook.

Works with gmailoutlook

Maintainer of this project? Claim this page to edit the listing.


90
Spark score
out of 100
Updated Jun 2025
Version 0.1.0
Models
universal

Add 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

01

Create email drafts with specified recipients, subjects, and bodies.

02

Save drafts automatically to the drafts folder on IMAP servers like Gmail or Outlook.

03

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

create-draft

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

📧 An IMAP Model Context Protocol (MCP) server to expose IMAP operations as tools for AI assistants.

MIT License
code style: prettier
MCP Compatible
semantic-release: angular

✨ 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

  1. Compile TypeScript to JavaScript:
npx tsc
  1. 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 address
  • subject (string, required): The email subject line
  • body (string, required): The email body content
  • from (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.