Email MCP Server
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
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
Configure SMTP (see next section), then run:
Run tests:
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:
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:
| 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
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:
| Client | Config file path | Top-level key | Notes |
|--------|-----------------|---------------|-------|
| Claude Desktop | ~/Library/Application Support/Claude/claude_desktop_config.json | mcpServers | Windows: %APPDATA%\Claude\... |
| Cursor | ~/.cursor/mcp.json | mcpServers | Or .cursor/mcp.json (project) |
| VS Code | .vscode/mcp.json | servers | Add "type": "stdio" inside the server entry |
| Windsurf | ~/.codeium/windsurf/mcp_config.json | mcpServers | |
| Zed | ~/.config/zed/settings.json | context_servers | |
Streamable HTTP (any client)
Start the server with uv run python -m email_mcp_server.server --http, then:
| Client | Config |
|--------|--------|
| Claude Code | claude mcp add --transport http email-server http://localhost:8000/mcp |
| Claude Desktop | { "type": "http", "url": "http://localhost:8000/mcp" } |
| Cursor | { "url": "http://localhost:8000/mcp" } |
| VS Code | { "type": "http", "url": "http://localhost:8000/mcp" } |