# SMTP [Health: Active]

**Category:** 💬 Communication  
**Repository:** https://github.com/ni-c/smtp-mcp  
**GitHub Stars:** 0  
**npm Downloads (last month):** 1046  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/smtp

## Description
MCP server that sends mail over SMTP, gated behind an allowlist and a human confirmation

## Tools
Capabilities this server exposes over MCP:

- **get_server_info** — The endpoint, the fixed sender, the allowlist, the limits, and whether sending is on at all.
- **validate_recipients** — Which addresses this server may write to, and why the others are refused. No connection made.
- **preview_mail** — Builds exactly the message `send_mail` would build and shows it. Runs every check a send runs.
- **test_connection** — Connects, negotiates TLS, authenticates, disconnects. Sends nothing; at most once every 10 s.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "smtp": {
    "command": "npx",
    "args": ["-y","@ni-c/smtp-mcp"],
    "env": {
      "SMTP_HOST": "",
      "SMTP_USER": "",
      "SMTP_PASSWORD": "",
      "SMTP_FROM": ""
    }
  }
}
```

**Requires environment variables:** `SMTP_HOST`, `SMTP_USER`, `SMTP_PASSWORD`, `SMTP_FROM` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What SMTP MCP server does

SMTP MCP server gives an MCP client a controlled path to submit email through an SMTP server. It uses one configured sender and does not expose a `from` parameter to the model. The server can be used for outbound messages, while its controls constrain who may receive them and how much can be sent.

Sending is disabled unless `SMTP_ALLOW_SEND=true`. When enabled, `SMTP_ALLOWED_RECIPIENTS` defines the permitted recipients using individual addresses, domains such as `@example.net`, or `*` for unrestricted addressing. To, Cc, and Bcc recipients are checked before an SMTP connection is opened.

Each message requires human approval through MCP elicitation. The approval request presents the recipients, subject, and Bcc values on separate labelled lines. Configured recipient, message-size, attachment-size, and hourly-send limits are also applied.

## How it works

The server connects to an SMTP submission service using the configured host, port, credentials, and TLS mode. Supported TLS modes are `starttls`, `implicit`, and `none`; STARTTLS is required rather than opportunistic when that mode is selected. The `test_connection` tool connects, negotiates TLS, authenticates, and disconnects without sending a message, with a ten-second minimum interval between tests.

Before sending, recipient validation and message construction checks can be run independently. `preview_mail` builds the same message that `send_mail` would build and displays it without delivery. The configured reply-to address, signature, attachment directory, attachment type allowlist, and size ceilings affect message composition when used.

## Setup and configuration

Use Node.js 24 or newer and an SMTP account permitted to send through a submission server, commonly on port 587 or 465. Providers with two-factor authentication may require an app-specific password.

Required connection settings are `SMTP_HOST`, `SMTP_USER`, `SMTP_PASSWORD`, and `SMTP_FROM`. Set `SMTP_REPLY_TO` to direct replies elsewhere. `SMTP_TLS` defaults to `starttls`; `SMTP_PORT` selects the SMTP port and otherwise follows the documented port defaults for the TLS mode.

To register sending tools, set `SMTP_ALLOW_SEND=true` and provide `SMTP_ALLOWED_RECIPIENTS`. The default limits allow 10 distinct recipients per message, 20 sends per sliding hour, a 10 MiB composed-message maximum, and a 5 MiB maximum for each attachment. These values can be changed with the corresponding limit variables.

Attachments require `SMTP_ATTACHMENT_DIR`; unset, attachments are unavailable. `SMTP_ATTACHMENT_TYPES` controls permitted content types. `SMTP_AUDIT_LOG` adds an audit file alongside stderr output, and `SMTP_SIGNATURE` appends text after the standard signature delimiter.

## Tools and capabilities

- `get_server_info` reports the SMTP endpoint, fixed sender, recipient allowlist, limits, and whether sending is enabled.
- `validate_recipients` checks which addresses are permitted without opening an SMTP connection.
- `preview_mail` constructs and displays the message that sending would produce while running send checks.
- `test_connection` verifies TLS negotiation and authentication without delivering mail.
- `send_mail` submits an approved message through the configured SMTP server.

## Limitations and notes

The sender is fixed by `SMTP_FROM`, and recipients outside the allowlist are rejected before connection setup. A wildcard recipient rule is available through `SMTP_ALLOWED_RECIPIENTS=*`, but it removes the address restriction. Sending remains unavailable until explicitly enabled.

Avoid `SMTP_TLS=none` for credentials or message delivery over an untrusted network. For self-signed certificates, the configuration guidance favors using a proper internal certificate authority over disabling certificate verification with an insecure TLS setting. Attachment availability and accepted types depend on the attachment directory and content-type configuration.

_Full upstream README: https://allmcps.com/mcp/smtp/readme_

