npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@adam-gfam/imap-server

v0.1.4

Published

IMAP/SMTP MCP Server - email operations via Model Context Protocol

Readme

Simple IMAP MCP Server

A Node.js IMAP/SMTP MCP server that provides email operations via the Model Context Protocol.

Quick Start

# Install and run locally
npm install @adam-gfam/imap-server

# OR run without installing
npx -y @adam-gfam/imap-server

Configuration

Copy .env.example to .env and fill in your IMAP/SMTP credentials. See the full Configuration Guide for details.

Usage

Once the server is running, it exposes the following tools, resources, and prompts via the MCP protocol.

Transport Modes

| Mode | Use Case | Configuration | |------|----------|---------------| | stdio | Claude Desktop, CLI tools, local agents | Default, no config needed | | Streamable HTTP | Remote LLM clients, web dashboards | MCP_TRANSPORT=http, HTTP_PORT=3000 |

IMAP Tools

  • list_folders — List all IMAP mailboxes/folders. Parameters: folder_pattern, include_subfolders.
  • search_emails — Search emails by criteria (folder, from, to, subject, date, keyword, unread_only). Paginated results.
  • fetch_email — Fetch full email content including headers, body, and attachments by UID.
  • get_email_body — Fast body-only fetch (text and/or HTML) for a given UID.
  • get_email_headers — Minimal-bandwidth header fetch without downloading the body.
  • mark_as_read — Toggle read/unread status via IMAP FLAGS.
  • move_email — Move an email to a different IMAP folder (creates destination if needed).
  • delete_email — Delete an email (moves to Trash).
  • create_folder — Create a new IMAP mailbox folder (supports hierarchy like "Work/Projects").
  • list_unread — Quick listing of unread messages with pagination.

SMTP Tools

  • send_email — Send an email with text or HTML body. Supports to, subject, body, html, from, cc, bcc.
  • send_email_with_attachment — Send an email with file attachments ([{ name, content (base64), content_type }]).
  • list_drafts — List draft emails in the Drafts folder.
  • save_as_draft — Save an email as a draft (plain text or HTML).
  • delete_draft — Delete a draft email by UID.

MCP Resources

| Resource | Description | URI Template | |----------|-------------|-------------| | email_body | Parsed email body text | email://<folder>/<uid>/body | | email_headers | Email headers | email://<folder>/<uid>/headers |

MCP Prompts

| Prompt | Description | Arguments | |--------|-------------|-----------| | search_emails | "Help me search my emails" | query, date_range, folder | | compose_reply | "Draft a reply to this email" | email_uid, tone | | organize_inbox | "Help me organize my inbox" | criteria, folder |

Documentation

All project documentation is hosted in the Simple IMAP MCP Project collective:

Contributing

All future design and technical documents must be created directly in the Nextcloud collective, not locally. The collective is the single source of truth for all project documentation.

Tech Stack

  • MCP Server: @modelcontextprotocol/server v2
  • IMAP: imapflow v1.7
  • SMTP: nodemailer v9
  • MIME Parser: mailparser v3.9
  • Schema: zod v4
  • Env: dotenv v17