Get the FREE Ultimate OpenClaw Setup Guide →

email

一个让AI轻松接管邮箱的MCP服务,基于 Model Context Protocol (MCP) 构建,支持在 MCP-X,Claude Desktop 等 MCP 客户端中使用。

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio timecyber-email-mcp npx mcp-email \
  --env EMAIL_TYPE="auto" \
  --env EMAIL_USER="your-email@domain.com" \
  --env EMAIL_PASSWORD="your-password-or-auth-code"

How to use

This MCP server provides a universal email automation layer that lets MCP clients control and send emails through supported providers. You can configure the server to auto-detect your email provider, or explicitly specify a provider via the environment variable EMAIL_TYPE. Core tools exposed by the MCP interface include sending emails (send_email), listing or retrieving recent emails (get_recent_emails), fetching detailed email content (get_email_content), and auto-configuring accounts (setup_email_account). Additional helpers let you discover supported providers (list_supported_providers), manually configure servers (configure_email_server), and test connectivity (test_email_connection). Use these tools to build workflows in MCP clients such as MCP-X or Claude Desktop to perform complex email tasks programmatically, including HTML or plain-text content, CC/BCC, attachments, and Base64 content.

To use, set up the MCP client to connect to the universal-email MCP server as shown in the example configuration, supply your email credentials, and choose a configuration method (automatic provider detection or explicit provider). Then invoke the actions via MCP requests in your client, e.g., send an email with recipients and subject, or request a list of recent messages and fetch their contents. The server supports multiple providers and dynamic runtime configuration for flexibility across different environments.

How to install

Prerequisites:

  • Node.js 16.x or higher
  • npm (comes with Node.js)
  • An email account and appropriate application passwords/authorization codes as required by your provider

Installation options:

  1. Global installation (recommended for quick start)
npm install -g mcp-email

Usage in MCP client:

# In MCP-X or similar clients, configure the MCP server (see mcp_config example)
  1. Local installation (for development or embedded usage)
npm install mcp-email
  1. From source (advanced users)
git clone https://github.com/TimeCyber/email-mcp.git
cd email-mcp
npm install

After installation, configure your MCP client with the provided configuration example and start using the MCP server via the client that supports MCP protocol.

Additional notes

Tips and common considerations:

  • Ensure EMAIL_USER and EMAIL_PASSWORD (or app-specific password) are kept secure and not checked into version control.
  • For enterprise 邮件 providers, set EMAIL_TYPE to the correct provider (e.g., exmail, nettease-enterprise) to avoid autodetection issues.
  • If you encounter authentication errors, confirm that SMTP/IMAP/POP3 services are enabled in the provider settings and that you are using a valid authorization code or app password.
  • The server supports dynamic runtime configuration, so you can switch providers or update credentials without redeploying the server.
  • When testing, use the test_email_connection or test-auto-config scripts provided in the repository to diagnose provider compatibility and credential validity.

Related MCP Servers

Sponsor this space

Reach thousands of developers