@jihyunlab/mcp-mailer
v1.0.4
Published
JihyunLab MCP Mailer.
Readme
@jihyunlab/mcp-mailer
@jihyunlab/mcp-mailer is an MCP (Model Context Protocol) server that enables Claude to send emails via any SMTP server. It supports plain text and HTML bodies, CC/BCC recipients, and can load body content from local files.
Requirements
| Variable | Required | Description |
| :-------------- | :------- | :-------------------------------------------------------------- |
| SMTP_HOST | Yes | SMTP server hostname (e.g. smtp.gmail.com) |
| SMTP_USER | Yes | SMTP authentication username |
| SMTP_PASSWORD | Yes | SMTP authentication password |
| SMTP_PORT | No | SMTP port number (default: 587) |
| SMTP_SECURE | No | Use TLS — set to true for port 465 (default: false) |
| SMTP_FROM | No | Default sender address. Falls back to SMTP_USER when omitted. |
Registration
Claude Code (CLI)
Register mcp-mailer with Claude Code using the claude mcp add command.
claude mcp add mcp-mailer \
-s user \
-e SMTP_HOST=your-smtp-host \
-e [email protected] \
-e SMTP_PASSWORD=yourpassword \
-- npx -y @jihyunlab/mcp-mailerClaude Desktop App
Open the Claude desktop app settings and edit your claude_desktop_config.json to add the following entry:
{
"mcpServers": {
"mcp-mailer": {
"command": "npx",
"args": ["-y", "@jihyunlab/mcp-mailer"],
"env": {
"SMTP_HOST": "your-smtp-host",
"SMTP_USER": "[email protected]",
"SMTP_PASSWORD": "yourpassword"
}
}
}
}After saving, restart the Claude desktop app.
Usage
Once registered, ask Claude to send an email in natural language.
Send a plain text email
Send an email to [email protected] with the subject "Hello" and body "Hi Alice, how are you?"Send an HTML email
Send an HTML email to [email protected] with the subject "Newsletter" and the HTML body "<h1>Hello!</h1><p>Welcome to our newsletter.</p>"Send with CC and BCC
Send an email to [email protected], CC [email protected], BCC [email protected], subject "Meeting", body "Please find the agenda attached."Send using a local file as the body
Send an email to [email protected] with the subject "Report" and use the file at /Users/me/report.txt as the body.Tool Reference
send_mail
Sends an email via the configured SMTP server.
| Parameter | Required | Type | Description |
| :------------- | :------- | :----- | :--------------------------------------------------------------------- |
| to | Yes | string | Recipient address. Use comma-separated values for multiple recipients. |
| subject | Yes | string | Subject line of the email. |
| from | No | string | Sender address. Falls back to SMTP_FROM, then SMTP_USER. |
| cc | No | string | CC recipients. Use comma-separated values for multiple recipients. |
| bcc | No | string | BCC recipients. Use comma-separated values for multiple recipients. |
| text | No | string | Plain text body. |
| textFilePath | No | string | Absolute path to a local .txt file to use as the plain text body. |
| html | No | string | HTML body. Takes priority over plain text when both are supplied. |
| htmlFilePath | No | string | Absolute path to a local .html file to use as the HTML body. |
| attachments | No | array | Array of attachment objects. |
At least one of
text,textFilePath,html, orhtmlFilePathmust be provided.
Attachment Object
| Field | Type | Description |
| :------------ | :----- | :--------------------------------------------------------------------------- |
| filename | string | Name of the attached file. |
| path | string | Absolute path to the file to attach. |
| content | string | Plain text or base64 string content for the attachment. |
| contentType | string | Optional MIME type for the attachment (e.g. application/pdf). |
| cid | string | Optional Content-ID for embedding images in HTML bodies (e.g. logo). |
| encoding | string | Optional encoding for the content (e.g. base64). |
Send with attachments
Send an email to [email protected] with the subject "Files" and body "Here are the files." and attach /Users/me/document.pdf and /Users/me/image.png.Credits
Authored and maintained by JihyunLab <[email protected]>
License
Open source licensed as MIT.
