Atlas / MCP servers / non-dirty / Imap

ImapCAUTION

mcp/non-dirty/imap

IMAP Model Context Protocol server for interactive email processing

Verdict
CAUTION
Grade
B
Trust score
86 /100
Exposed tools
16 12r · 3w · 1d
Transport
—
License
—
Stars
58
01

Overview

From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.

A Model Context Protocol (MCP) server that enables AI assistants to check email, process messages, and learn user preferences through interaction.

Overview

This project implements an MCP server that interfaces with IMAP email servers to provide the following capabilities:

  • Email browsing and searching
  • Email organization (moving, tagging, marking)
  • Email composition and replies
  • Interactive email processing and learning user preferences
  • Automated email summarization and categorization
  • Support for multiple IMAP providers

The IMAP MCP server is designed to work with Claude or any other MCP-compatible assistant, allowing them to act as intelligent email assistants that learn your preferences over time.

Features

  • Email Authentication: Secure access to IMAP servers with various authentication methods
  • Email Browsing: List folders and messages with filtering options
  • Email Content: Read message contents including text, HTML, and attachments
  • Email Actions: Move, delete, mark as read/unread, flag messages
  • Email Composition: Draft and save replies to messages with proper formatting
  • Support for plain text and HTML replies
  • Reply-all functionality with CC support
  • Proper threading with In-Reply-To and References headers
  • Save drafts to appropriate folders
  • Search: Basic search capabilities across folders
  • Interaction Patterns: Structured patterns for processing emails and learning preferences (planned)
  • Learning Layer: Record and analyze user decisions to predict future actions (planned)

Current Project Structure

The project is currently organized as follows:

.
├── examples/              # Example configurations
│   └── config.yaml.example
├── imap_mcp/              # Source code
│   ├── __init__.py
│   ├── config.py          # Configuration handling
│   ├── imap_client.py     # IMAP client implementation
│   ├── models.py          # Data models
│   ├── resources.py     
Read from source at commit edff266c7580OBSERVED · 2026-10-08
02

Connect

Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.

claude-code
claude mcp add imap-mcp --env GMAIL_APP_PASSWORD=${GMAIL_APP_PASSWORD} --env GMAIL_CLIENT_SECRET=${GMAIL_CLIENT_SECRET} --env GMAIL_REFRESH_TOKEN=${GMAIL_REFRESH_TOKEN} --env IMAP_PASSWORD=${IMAP_PASSWORD} -- uvx imap-mcp
claude-desktop
{
  "mcpServers": {
    "imap-mcp": {
      "command": "uvx",
      "args": [
        "imap-mcp"
      ],
      "env": {
        "GMAIL_APP_PASSWORD": "${GMAIL_APP_PASSWORD}",
        "GMAIL_CLIENT_SECRET": "${GMAIL_CLIENT_SECRET}",
        "GMAIL_REFRESH_TOKEN": "${GMAIL_REFRESH_TOKEN}",
        "IMAP_PASSWORD": "${IMAP_PASSWORD}"
      }
    }
  }
}
03

Exposed tools (16)

12 read · 3 write · 1 destructive. Blast radius: 1 tool can delete or overwrite — an agent that can be talked into calling a tool can be talked into calling this one.

ToolRiskDescription
check_calendar_availability_toolreadChecks calendar availability for a given time slot.
create_taskwriteCreates a new task and saves it to a local file.
delete_emaildestructiveDelete email.
draft_meeting_reply_toolreadDrafts a meeting reply (accept/decline) based on calendar invite details and availability.
draft_reply_toolreadCreates a draft reply to an email and saves it to the drafts folder.
email_searchreadSearch for emails using a query string.
flag_emailreadFlag or unflag email.
identify_meeting_invite_toolreadIdentifies if an email is a meeting invite and extracts relevant details.
mark_as_readreadMark email as read.
mark_as_unreadreadMark email as unread.
move_emailwriteMove email to another folder.
process_emailreadProcess an email with specified action.
process_invite_email_toolreadProcesses a meeting invitation email: identifies invite, checks availability, drafts reply, saves draft.
process_meeting_invitewriteProcess a meeting invite email and create a draft reply.
search_emailsreadSearch for emails.
server_statusreadGet server status and configuration info.
04

Trust audit

CAUTIONgrade B · trust 86/100 Install with care. The audit found things worth knowing before you trust its output.

LayerWhat it checksResult
L0Provenance & inventoryPASS
L1Static analysis of the codeWARN
L2Instruction surface (what it tells the agent)PASS
L3Class-specific surfaceWARN
L4Behavioural (sandbox)SKIPPED

What the source does

Filesystem
declared (2 observation(s))
Network
declared (5 observation(s))
Shell
declared (1 observation(s))
Dependencies
pinned
Secrets in source
none-found

Findings (7)

MEDIUMInformation disclosure · disclose.log_secret · CWE-209, CWE-532
imap_mcp/app_password.py:67
print(f"  IMAP_PASSWORD={password}")
MEDIUMFilesystem / path · fs.system_paths · CWE-22, CWE-59
imap_mcp/config.py:138
Path("/etc/imap-mcp/config.yaml"),
MEDIUMFilesystem / path · mcp.destructive_tools · CWE-22, CWE-59
delete_email
Why it matters. 1 tool(s) can delete or overwrite
Fix. prefer a read-only mode or scoped tokens; the page states the blast radius
LOWInventory / provenance · inv.hidden_file · CWE-1104
.windsurfrules
.windsurfrules
Why it matters. hidden member outside the usual dotfiles
Fix. review its purpose
LOWInventory / provenance · inv.no_license · CWE-1104
Why it matters. no LICENSE file and no repo licence
Fix. add a licence
LOWPrompt injection · prompt.transfer_instruction · CWE-94, CWE-1427
CLAUDE.md:101
Integration tests verify that the IMAP MCP server works correctly with real email services. These tests require valid credentials and network connectivity to external services.
Why it matters. an instruction to move sensitive data to an outside destination
Fix. remove; a skill never needs the user's secrets off the machine
INFOSupply chain · prompt.pipe_to_shell · CWE-829, CWE-1357
README.md:69
curl -LsSf https://astral.sh/uv/install.sh | sh

Gates applied: no_behavioural_pass, no_license.

Audited 2026-10-08 · audit v0.4.1 · source sha edff266c7580full audit observations/trust-audit/mcp-server/non-dirty__imap.json · Report an issue / request a re-scan
05

Audit history

Every audit this server has had. A grade with a past is a grade somebody is still checking.

DateSourceVerdictGradeScoreChange
2026-10-08edff266c7580CAUTIONB86first audit
06

Questions

What is the Imap MCP server?

IMAP Model Context Protocol server for interactive email processing

What tools does Imap expose?

16 in total: 12 read-only, 3 that write, and 1 that can delete or overwrite (delete_email). Every one is listed on this page with its risk.

Is Imap safe to connect to an agent?

With care. The audit graded it B (86/100) and found 7 things worth knowing before you trust this server, listed below with the exact line each was found on. Separately from the audit: 1 of its tools can destroy data, so scope the token you give it to what you actually need.

What credentials does Imap need?

It reads GMAIL_APP_PASSWORD, GMAIL_CLIENT_SECRET, GMAIL_REFRESH_TOKEN and IMAP_PASSWORD from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.

How current is this page?

The grade is for one exact copy of the source (edff266c7580), read on 2026-10-08. The repository is watched and re-audited when it changes.

Advertisement