theshivamlko/email_dart_mcp_server_example
3.1
If you are the rightful owner of email_dart_mcp_server_example and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
A Dart-based example server for handling email operations using MCP (Mail Client Protocol).
Email Dart MCP Server Example
A Dart-based example server for handling email operations using MCP (Model Context Protocol).
Features
- Send emails
- MCP protocol support
- Example server implementation
Create Test Email
- I used Ethereal a fake SMTP service or use can use your own SMTP Email and Password.
Getting Started
-
Clone the repository:
git clone https://github.com/yourusername/email_dart_mcp_server_example.git cd email_dart_mcp_server_example -
Install dependencies:
dart pub get
Configuration
- Configure email settings in the appropriate configuration file or environment variables. Replace values as needed.
final smtpServer = SmtpServer(
'smtp.ethereal.email',
username: 'username',
password: 'password',
port: 587,
);
final message = Message()
..from = Address('from-email', 'MCP Server')
..recipients.add(to)
..subject = subject
..text = content;
How to use MCP Server
Cursor IDE
- Go to IDE MCP and Integration Settings
- Add this JSON, change file path acc. to ur system
{
"mcpServers": {
"Dart MCP Server": {
"command": "dart",
"args": [
"run",
"C:\\Users\\Navoki\\AndroidStudioProjects\\email_dart_mcp_server_example\\bin\\email_dart_mcp_server_example.dart"
]
}
}
}
- Send prompt
Test and send email with dummy content and subject to abc@abc.com
MCP Inspector
- Run this command in Terminal to launch MCP Inspector
npx @modelcontextprotocol/inspector - Command:
dart - Arguments:
run "C:\Users\Navoki\AndroidStudioProjects\mcp_flutter_dart_example\mcp_server_dart_example\bin\mcp_server_dart_example.dart" - Click 'Connect'
Project Structure
bin/- Main entry point for the serverlib/- Core library code
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
License
This project is licensed under the MIT License.