MCP Servers

A collection of Model Context Protocol servers, templates, tools and more.

N
Nexus Email MCP Server

An MCP (Model Context Protocol) server for 163 email that provides tools for reading, searching, analyzing, and sending emails via SMTP and IMAP.

Created 3/5/2026
Updated about 3 hours ago
Repository documentation and setup instructions

163 Email MCP Server

An MCP (Model Context Protocol) server for 163 email that provides tools for reading, searching, analyzing, and sending emails via SMTP and IMAP.

Features

  • List emails: List emails in a mailbox with optional search criteria
  • Get email: Get full content of a specific email including body and attachments info
  • Search emails: Search emails with various criteria (subject, sender, date, unread status, etc.)
  • Email statistics: Get mailbox statistics (total count, unread count, etc.)
  • Send email: Send text emails with attachments
  • Mark as read/unread: Change email read status

Configuration

The server uses the following configuration (hardcoded in main.py):

EMAIL_ACCOUNT = "your 163 email"
SMTP_PASSWORD = "your smtp password"
SMTP_SERVER = "smtp.163.com"
SMTP_PORT = 465
IMAP_SERVER = "imap.163.com"
IMAP_PORT = 993

Installation

  1. Install uv if not already installed.

  2. Install dependencies:

    uv sync
    

Usage

Running the server

uv run main.py

The server will start and communicate via stdin/stdout following the MCP protocol.

Tools Available

  1. list_emails

    • Parameters: mailbox (default: "INBOX"), limit (default: 20), search_criteria (optional IMAP criteria)
    • Returns: List of email summaries
  2. get_email

    • Parameters: email_id, mailbox (default: "INBOX")
    • Returns: Full email content including body and attachments info
  3. search_emails

    • Parameters: mailbox, subject, sender, date_from, date_to, unread_only, has_attachments, limit
    • Returns: List of matching email summaries
  4. get_email_statistics

    • Parameters: mailbox (default: "INBOX"), days (default: 30)
    • Returns: Mailbox statistics
  5. send_email

    • Parameters: to, subject, body, cc, bcc, attachments (list of file paths)
    • Returns: Success status
  6. mark_as_read

    • Parameters: email_id, mailbox (default: "INBOX")
    • Returns: Success status
  7. mark_as_unread

    • Parameters: email_id, mailbox (default: "INBOX")
    • Returns: Success status

Example Usage with Claude Desktop

Add the server to your Claude Desktop configuration (claude_desktop_config.json):

{
  "mcpServers": {
    "163-email": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/nexus-email-mcp-server",
        "run",
        "main.py"
      ]
    }
  }
}

Windows Attachment Support

The server supports attaching common Windows file formats:

  • Images: .jpg, .png, .gif, .bmp, etc.
  • Documents: .doc, .docx, .pdf, .txt, .xlsx, .pptx, etc.
  • Archives: .zip, .rar, .7z, etc.
  • Videos: .mp4, .avi, .mov, etc.
  • Any other file type is supported as binary attachment.

Security Notes

  • Email credentials are hardcoded in the source code. For production use, consider using environment variables or a configuration file.
  • The server requires SMTP and IMAP access to your 163 email account.
  • Ensure you're using an app-specific password if 2FA is enabled on your account.

Troubleshooting

  1. Connection errors: Verify your SMTP/IMAP settings and password.
  2. Authentication failed: Ensure you're using the correct SMTP authorization password (not your account password).
  3. Attachment issues: Check file paths exist and are readable.
  4. IMAP search issues: Some IMAP servers may have specific search syntax requirements.

License

MIT License

Quick Setup
Installation guide for this server

Install Package (if required)

uvx nexus-email-mcp-server

Cursor configuration (mcp.json)

{ "mcpServers": { "nextonexus-nexus-email-mcp-server": { "command": "uvx", "args": [ "nexus-email-mcp-server" ] } } }