EE

egyptianego17/email-mcp-server

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

28 stars 11 forks 품질 69 트렌드 11MIT

A simple mcp server that lets your AI agent send emails and attach files through SMTP.

개요

An MCP (Model Context Protocol) server that lets your AI assistant send emails via SMTP. - — Send a quick email (text or HTML); accepts optional smtp_config - — Full control: CC/BCC, attachments; accepts optional smtp_config - — Verify your SMTP settings before sending; accepts optional smtp_config Configure SMTP (see next section), then run: You can configure SMTP credentials in two ways — use one or both. Copy the example and fill in your credentials: Alternatively, pass them via the client's env block (see Client Configuration below). Pass smtp_config directly in any tool call — environment variables are ignored for that call: Use the generic example below and adjust the top-level key and config file path for your client:

README

원문 README의 일부입니다. 원문 보기.

Email MCP Server

An MCP (Model Context Protocol) server that lets your AI assistant send emails via SMTP.

Features

  • send_simple_email — Send a quick email (text or HTML); accepts optional smtp_config
  • send_custom_email — Full control: CC/BCC, attachments; accepts optional smtp_config
  • test_smtp_connection — Verify your SMTP settings before sending; accepts optional smtp_config

Quick Start

# Install uv if you don't have it
curl -LsSf https://astral.sh/uv/install.sh | sh

cd email-mcp-server
uv sync --extra dev

Configure SMTP (see next section), then run:

# stdio transport (for MCP clients)
uv run python -m email_mcp_server.server

# Streamable HTTP transport (port 8000)
uv run python -m email_mcp_server.server --http

Run tests:

uv run pytest

SMTP Configuration

You can configure SMTP credentials in two ways — use one or both.

Option A: Environment variables

Copy the example and fill in your credentials:

cp env.example .env
# Required
SMTP_HOST=smtp.gmail.com
[email protected]
SMTP_PASS=your-app-password
[email protected]

# Optional (defaults shown)
# SMTP_PORT=587
# SMTP_SECURE=false

Alternatively, pass them via the client’s env block (see Client Configuration below).

Option B: Per-call payload

Pass smtp_config directly in any tool call — environment variables are ignored for that call:

{
  "smtp_config": {
    "host": "smtp.gmail.com",
    "port": 587,
    "secure": false,
    "username": "[email protected]",
    "password": "your-app-password",
    "from_email": "[email protected]"
  }
}
Field Type Description
host string SMTP server hostname
port integer SMTP server port (usually 587)
secure boolean Use SSL/TLS (false for STARTTLS)
username string Auth username
password string Auth password
from_email string Sender email address

Client Configuration

Claude Code

# stdio
claude mcp add email-server -- uv --directory /absolute/path/to/email-mcp-server run python -m email_mcp_server.server

# streamable HTTP (start the server first with --http)
claude mcp add --transport http email-server http://localhost:8000/mcp

JSON-based clients (Claude Desktop, Cursor, VS Code, Windsurf, Zed)

Use the generic example below and adjust the top-level key and config file path for your client:

{
  "": {
    "email-server": {
      "command": "uv",
      "args": ["--directory", "/absolute/path/to/email-mcp-server", "run", "python", "-m", "email_mcp_server.server"],
      "env": {
        "SMTP_HOST": "smtp.gmail.com",
        "SMTP_PORT": "587",
        "SMTP_SECURE": "false",
        "SMTP_USER": "[email protected]",
        "SMTP_FROM": "[email protected]",
        "SMTP_PASS": "your-app-password"
      }
    }
  }
}
GitHub에서 전체 README 보기

설치

This server does not publish a one-line install command.

Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →