
egyptianego17/email-mcp-server
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
AIエージェントが電子メールを送信し、SMTPを介してファイルを添付できるシンプルなmcpサーバー.
概要
MCP (Model Context Protocol) サーバーで、AI アシスタントが SMTP 経由でメールを送信できるようにします。 - — クイックメール(テキストまたはHTML);オプションのsmtp configを受け付けます。 - 完全な制御: CC/BCC、添付ファイル。オプションのsmtp configを受け入れる - SMTP設定を送る前に確認します。オプションのsmtp configを受け入れる SMTP の設定(次のセクションを参照)、次に実行します。 2つの方法でSMTP資格情報を設定できます。 例をコピーして、資格情報を入力してください。 あるいは、クライアントの env ブロックを経由して渡します(下記のクライアント設定を参照)。 smtp configを直接任意のツールコールで渡します。環境変数は、その呼び出しに対して無視されます。 以下の一般的な例を使用して、クライアントのトップレベルのキーとコンフィグファイルパスを調整します
概要(AI 翻訳)
MCP (Model Context Protocol) サーバーで、AI アシスタントが SMTP 経由でメールを送信できるようにします。
##特徴
-[send_simple_email - クイックメール(テキストまたはHTML)を送信し、オプション[[[T1]を受け入れる
-[send_custom_email - 完全な制御:CC/BCC、添付ファイル;オプションを受け入れる[smtp_config]
-[test_smtp_connection — SMTP の設定を送る前に確認します。オプション [smtp_config を受け付けます。
クイックスタート
SMTP の設定(次のセクションを参照)、次に実行します。
テストを実行する:
SMTP の設定
2つの方法でSMTP資格情報を設定できます。
Option A: 環境変数
例をコピーして、資格情報を入力してください。
あるいは、クライアントの [env] ブロック (下のクライアント設定を参照) で渡します。
##Option B: ペイロード
smtp_config を任意のツールコールで直接渡す — 環境変数は、その呼び出しに対して無視されます。
| フィールド | 種類 | 仕様 |
お問い合わせ
| [[T8] | 文字列 | SMTP サーバー ホスト名 |
| [port | 整数 | SMTP サーバーポート(通常[[[T10]) |
| 【[T11] | ブーリアン | SSL/TLS([false)をSTARTTLSにご使用ください |
| [[T13] | 文字列 | Auth ユーザー名 |
| [[T14] | 文字列 | Auth パスワード |
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
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 optionalsmtp_configsend_custom_email— Full control: CC/BCC, attachments; accepts optionalsmtp_configtest_smtp_connection— Verify your SMTP settings before sending; accepts optionalsmtp_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"
}
}
}
}
インストール
This server does not publish a one-line install command.
Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →