
An AI receptionist platform with an MCP server for accessing business calls, contacts and appointments from AI assistants.

Java MCP server that sends email through SMTP providers and exposes a send-email MCP tool over STDIO, SSE, and Streamable HTTP transports.
SMTP MCP Server for sending email from MCP clients is cataloged as an MCP server attributed to rayenmalouche. Java MCP server that sends email through SMTP providers and exposes a send-email MCP tool over STDIO, SSE, and Streamable HTTP transports. It is categorized under communication social. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.
Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.
Catalog license label: Not specified. Check the source repository's current license and terms before using, modifying or distributing this software.
Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.
No reviewed records to display. This does not establish that upstream lacks this capability.
No reviewed records to display. This does not establish that upstream lacks this capability.
No reviewed records to display. This does not establish that upstream lacks this capability.
Email delivery is not connected. This page does not collect email addresses or create subscriptions.
Browse the registry for current listings instead.
Reviews for SMTP MCP Server for sending email from MCP clients are not available yet
Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.
It supports STDIO, Server-Sent Events (SSE), and Streamable HTTP.
It is pre-configured for Gmail SMTP and also documents configuration for Outlook, Yahoo, and custom SMTP servers.
README.md · 41f315142980 · Fetched 2026-11-13 12:05:51 UTC
Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.
Showing the last retrieved documentation snapshot; check the source for current changes.
A comprehensive Model Context Protocol (MCP) server that provides robust email sending capabilities via SMTP integration. This server supports multiple transport protocols (STDIO, SSE, and Streamable HTTP) and exposes email functionality through both MCP tools and REST endpoints, making it ideal for integrating email capabilities into AI applications, automation workflows, and testing environments.
send-email tool for MCP clients┌─────────────────┐ ┌──────────────────┐ ┌─────────────────┐
│ MCP Client │ │ MCP Server │ │ SMTP Server │
│ (Claude, etc.) │◄───┤ (This Project) │────►│ (Gmail, etc.) │
└─────────────────┘ └──────────────────┘ └─────────────────┘
│
┌────▼────┐
│ REST API│
│ Testing │
└─────────┘
The application consists of:
git clone https://github.com/RayenMalouche/Java-MCP-Server-For-SMTP-Mailing.git
cd Java-MCP-Server-For-SMTP-Mailing
Edit the SMTP configuration in Application.java:
// SMTP Configuration - Update these values
private static final String SMTP_USERNAME = "your-email@gmail.com";
private static final String SMTP_PASSWORD = "your-app-password";
private static final String SMTP_HOST = "smtp.gmail.com";
private static final int SMTP_PORT = 587;
private static final boolean SMTP_TLS_ENABLED = true;
private static final boolean SMTP_SSL_ENABLED = false;
# Clean build
mvn clean compile
# Create JAR file
mvn clean package -DskipTests
# Build with tests (optional)
mvn clean package
SMTP_PASSWORD fieldprivate static final String SMTP_HOST = "smtp-mail.outlook.com";
private static final int SMTP_PORT = 587;
private static final boolean SMTP_TLS_ENABLED = true;
private static final String SMTP_HOST = "smtp.mail.yahoo.com";
private static final int SMTP_PORT = 587;
private static final boolean SMTP_TLS_ENABLED = true;
private static final String SMTP_HOST = "your-smtp-server.com";
private static final int SMTP_PORT = 25; // or 465/587
private static final boolean SMTP_TLS_ENABLED = true;
Before using the server, identify these paths on your system:
Windows: Right-click folder → Properties → Location
Example: C:\Users\YourName\Documents\Java-MCP-Server-For-SMTP-Mailing
macOS/Linux:
cd /path/to/project && pwd
# Example: /home/username/Java-MCP-Server-For-SMTP-Mailing
Windows:
where java
# Example: C:\Program Files\Common Files\Oracle\Java\javapath\java.exe
macOS/Linux:
which java
# Example: /usr/bin/java or /opt/homebrew/bin/java
Windows:
echo %JAVA_HOME%
# Example: C:\Program Files\Java\jdk-21
macOS/Linux:
echo $JAVA_HOME
# Example: /usr/lib/jvm/java-21-openjdk
# From inside your project directory:
# 1. Start the server
java -jar target/RayenMalouche-0.0.1-SNAPSHOT.jar --stdio
# 2. In another terminal, run the inspector
npx @modelcontextprotocol/inspector java -jar "<FULL_PATH_TO_PROJECT>/target/RayenMalouche-0.0.1-SNAPSHOT.jar" --stdio
Windows Configuration (%APPDATA%\Claude\config.json):
{
"mcpServers": {
"smtp-email-server": {
"command": "<JAVA_EXECUTABLE_PATH>",
"args": [
"-jar",
"<FULL_PATH_TO_PROJECT>\\target\\RayenMalouche-0.0.1-SNAPSHOT.jar",
"--stdio"
],
"env": {
"JAVA_HOME": "<JAVA_HOME_PATH>"
}
}
}
}
macOS/Linux Configuration (~/Library/Application Support/Claude/config.json or ~/.config/Claude/config.json):
{
"mcpServers": {
"smtp-email-server": {
"command": "<JAVA_EXECUTABLE_PATH>",
"args": [
"-jar",
"<FULL_PATH_TO_PROJECT>/target/RayenMalouche-0.0.1-SNAPSHOT.jar",
"--stdio"
],
"env": {
"JAVA_HOME": "<JAVA_HOME_PATH>"
}
}
}
}
Note: The env section is optional but recommended for consistency.
java -jar target/RayenMalouche-0.0.1-SNAPSHOT.jar --sse
npx @modelcontextprotocol/inspector java -jar "<FULL_PATH_TO_PROJECT>/target/RayenMalouche-0.0.1-SNAPSHOT.jar" --sse
Connect your MCP client to: http://localhost:45450/sse
java -jar target/RayenMalouche-0.0.1-SNAPSHOT.jar --streamable-http
npx @modelcontextprotocol/inspector java -jar "<FULL_PATH_TO_PROJECT>/target/RayenMalouche-0.0.1-SNAPSHOT.jar" --streamable-http
curl -X POST http://localhost:45450/api/test-email \
-H "Content-Type: application/json" \
-d '{
"to": "test@example.com",
"subject": "Test Email from MCP Server",
"body": "This is a test email sent via the MCP SMTP server!",
"cc": "optional-cc@example.com",
"bcc": "optional-bcc@example.com"
}'
curl http://localhost:45450/api/health
http://localhost:45450POST /api/test-email (Email sending)GET /api/health (Health check)After setting up Claude Desktop integration, you can test by asking Claude:
"Send an email to john@example.com with the subject 'Meeting Reminder' and body 'Don't forget about our meeting tomorrow at 2 PM.'"
Claude will use the MCP tool to send the email through your configured SMTP server.
Parameters:
to (required): Recipient email addresssubject (required): Email subject linebody (required): Email body contentcc (optional): CC email addressbcc (optional): BCC email addressExample Usage in MCP Client:
{
"tool": "send-email",
"parameters": {
"to": "recipient@example.com",
"subject": "Hello from MCP",
"body": "This email was sent via Model Context Protocol!",
"cc": "manager@example.com"
}
}
Send an email via REST API.
Request Body:
{
"to": "recipient@example.com",
"subject": "Email Subject",
"body": "Email body content",
"cc": "optional-cc@example.com",
"bcc": "optional-bcc@example.com"
}
Success Response (200 OK):
{
"status": "success",
"message": "Email sent successfully",
"details": {
"to": "recipient@example.com",
"subject": "Email Subject",
"cc": "optional-cc@example.com",
"bcc": "optional-bcc@example.com"
}
}
Error Response (500 Internal Server Error):
{
"status": "error",
"message": "Failed to send email: [error details]",
"errorType": "AuthenticationFailedException"
}
Check server health status.
Response (200 OK):
{
"status": "UP",
"timestamp": "2025-08-29T10:30:00Z",
"smtp": {
"status": "UP",
"host": "smtp.gmail.com",
"port": 587
}
}
| Transport | Use Case | Connection | Pros | Cons |
|---|---|---|---|---|
| STDIO | Claude Desktop, Direct integration | Process pipes | Simple, Direct, Efficient | Requires process management |
| SSE | Web applications, Real-time | HTTP/SSE | Real-time updates, Web-friendly | More complex setup |
| Streamable HTTP | Testing, REST clients | HTTP/JSON | Easy testing, Standard HTTP | Less efficient for real-time |
| Endpoint | Method | Description |
|---|---|---|
/message | POST | MCP protocol endpoint (Streamable HTTP) |
/sse | GET | Server-Sent Events endpoint |
/api/test-email | POST | REST endpoint for sending emails |
/api/health | GET/POST | Health check endpoint |
This server is part of a comprehensive MCP ecosystem:
// The dataset assistant sends completion emails like:
{
"to": "data-scientist@company.com",
"subject": "Dataset Generation Complete - 150 samples created",
"body": "Your requested dataset has been generated successfully. Total samples: 150. Processing time: 45 seconds. Dataset available at: /datasets/company-solutions-2025-08-29.json"
}
// Performance test results notification:
{
"to": "devops@company.com",
"subject": "MCP Performance Test Results - Dataset Assistant",
"body": "Performance test completed. Average response time: 12.5s. Success rate: 95%. Total cost: $0.45. Full report attached."
}
Symptoms: Email sending fails with authentication error
Solutions:
Application.javaDebug Steps:
# Enable detailed JavaMail debug logging
java -Dmail.debug=true -jar target/RayenMalouche-0.0.1-SNAPSHOT.jar --stdio
Symptoms: Cannot connect to SMTP server
Solutions:
Network Test:
# Test SMTP server connectivity
telnet smtp.gmail.com 587
Symptoms: Server fails to start with port binding error
Solutions:
Application.javaCheck Port Usage:
# Windows
netstat -ano | findstr 45450
# macOS/Linux
lsof -i :45450
Symptoms: Inspector cannot connect to MCP server
Solutions:
--stdio, --sse, --streamable-http)Symptoms: Claude doesn't recognize the email tool
Solutions:
config.json file location and syntaxConfiguration Validation:
# Test Java path
"<JAVA_EXECUTABLE_PATH>" -version
# Test JAR file
"<JAVA_EXECUTABLE_PATH>" -jar "<FULL_PATH_TO_PROJECT>/target/RayenMalouche-0.0.1-SNAPSHOT.jar" --stdio
Enable comprehensive logging:
# Full debug mode with JavaMail debugging
java -Dmail.debug=true -Dlogging.level.com.mcp=DEBUG -jar target/RayenMalouche-0.0.1-SNAPSHOT.jar --stdio
# Check server status
curl http://localhost:45450/api/health
# Expected response
{
"status": "UP",
"smtp": {
"status": "UP",
"host": "smtp.gmail.com",
"port": 587
}
}
# Monitor real-time logs
java -jar target/RayenMalouche-0.0.1-SNAPSHOT.jar --stdio | tee server.log
# Search for errors
grep -i error server.log
grep -i exception server.log
Gmail and other providers have rate limits:
Implement client-side rate limiting for production use.
export SMTP_USERNAME=your-email@gmail.com
export SMTP_PASSWORD=your-app-password
// Example environment variable usage
private static final String SMTP_USERNAME = System.getenv("SMTP_USERNAME");
private static final String SMTP_PASSWORD = System.getenv("SMTP_PASSWORD");
We welcome contributions! Here's how to get started:
git clone https://github.com/yourusername/Java-MCP-Server-For-SMTP-Mailing.git
git checkout -b feature/amazing-feature
# Run all tests
mvn test
# Run with different transports
mvn test -Dtest.transport=stdio
mvn test -Dtest.transport=sse
mvn test -Dtest.transport=http
This project uses Spring Boot and other open-source libraries. Please refer to individual dependency licenses for more information.
For issues and questions:
Made with ❤️ for the MCP ecosystem
This server bridges the gap between AI applications and email communication, enabling powerful automation workflows and seamless user notifications.
Claim this server with your GitHub account to request manual ownership verification.
Link to the catalog listing for SMTP MCP Server for sending email from MCP clients from your README. This badge does not certify ownership, compatibility or security.
[](https://awesome-mcp.com/servers/java-mcp-server-for-smtp-mailing)Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.
Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.
No reviewed package or image identity; download statistics are not listed yet.
Alternative and complementary servers in the same category

An AI receptionist platform with an MCP server for accessing business calls, contacts and appointments from AI assistants.
Pidgeon provides an MCP server and an email inbox API that gives AI agents their own addresses for sending, awaiting, and replying to email.

A Telegram CLI with background sync that can run an optional MCP server for a personal account using MTProto, not the bot API.