Get the FREE Ultimate OpenClaw Setup Guide →

mcp -email

mcp-server demo about send email by golang

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio cocainecong-mcp-server-email docker run -i cocainecong/mcp-server-email:latest \
  --env SMTP_HOST="SMTP server hostname" \
  --env SMTP_PASS="SMTP password" \
  --env SMTP_PORT="SMTP server port" \
  --env SMTP_USER="SMTP username" \
  --env FROM_ADDRESS="Default from email address"

How to use

This MCP server is a Go-based utility that enables sending emails through the MCP protocol. It exposes a minimal set of MCP-compatible operations to request email deliveries, leveraging a configured SMTP backend. To use it, connect with an MCP client and issue commands to submit email requests including recipient, subject, and body. The server uses the SMTP settings you provide via environment variables to perform the actual delivery, so ensure your SMTP host, port, and credentials are correct. Typical use involves creating a mail payload containing recipient addresses, subject lines, and message bodies, and invoking the send operation exposed by the MCP interface. The server can be run in isolation (e.g., via Docker) and can be integrated into a larger MCP workflow where email notifications are part of automated tasks.

How to install

Prerequisites:

  • Docker installed on the host
  • Network access to the SMTP server you will use for sending emails

Installation steps:

  1. Pull and run the MCP email server image locally:
# Run container (adjust environment variables as needed)
docker run -d --name mcp-server-email \
  -e SMTP_HOST=smtp.example.com \
  -e SMTP_PORT=587 \
  -e SMTP_USER=your-username \
  -e SMTP_PASS=your-password \
  -e FROM_ADDRESS=noreply@example.com \
  -p 8080:8080 \
  cocainecong/mcp-server-email:latest
  1. Verify the server is running and reachable via its MCP interface. Adjust port mappings if your MCP client expects a different port.

  2. (Optional) Stop and remove the container when needed:

docker stop mcp-server-email
docker rm mcp-server-email

Note: If you prefer not to run via Docker, you can build the Go project from source and run the binary directly, then expose the MCP endpoint according to the project’s instructions.

Additional notes

Environment variables:

  • SMTP_HOST: required, hostname of the SMTP server
  • SMTP_PORT: required, port for SMTP (e.g., 587 or 465)
  • SMTP_USER: optional if your SMTP server allows anonymous sends
  • SMTP_PASS: optional if your SMTP server uses basic auth
  • FROM_ADDRESS: required, default sender email address

Tips:

  • Ensure the SMTP credentials have permission to send emails for the domain you use as FROM.
  • If your SMTP requires TLS, ensure the port and security settings match (TLS/SSL).
  • Open firewall rules to allow outbound SMTP if running behind a restrictive network.
  • Check MCP client compatibility with the server version when upgrading the image.

Related MCP Servers

Sponsor this space

Reach thousands of developers