TSAI_EAG_v2_basic_email_agent_using_mcp_server_S4

Shankarganesh127/TSAI_EAG_v2_basic_email_agent_using_mcp_server_S4

3.2

If you are the rightful owner of TSAI_EAG_v2_basic_email_agent_using_mcp_server_S4 and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

EAG v2 Basic Email Agent is a simple MCP server that provides email sending capabilities using AI assistance.

Tools
1
Resources
0
Prompts
0

EAG v2 Basic Email Agent (S4)

A simple MCP (Model Context Protocol) server that provides email sending capabilities using AI assistance.

Features

  • Simple email sending via SMTP
  • AI-powered email composition using Google Gemini
  • Environment variable configuration
  • MCP server for tool integration

Project Structure

  • mcp_server.py - MCP server with email sending tool
  • talk2mcp.py - AI client that interacts with MCP tools
  • test_email.py - Test script demonstrating email functionality
  • main.py - Basic project entry point

Setup

The SMTP environment variables are already configured in the virtual environment:

  • SMTP_HOST=smtp.gmail.com
  • SMTP_PORT=587
  • SMTP_USER=****@gmail.com
  • SMTP_PASS=****
  • SMTP_FROM=****@gmail.com

For Gmail, ensure you have:

  • 2FA enabled on your Google account
  • An App Password generated (not your regular password)

Usage

  1. Start the MCP server:

    uv run python mcp_server.py
    
  2. In another terminal, run the AI client:

    uv run python talk2mcp.py
    
  3. Test email functionality:

    uv run python test_email.py
    

Email Tool

The MCP server provides a send_email tool with parameters:

  • to: Recipient email address
  • subject: Email subject
  • body: Email content

Technology Stack

  • Python 3.13+
  • FastMCP for MCP server
  • Google Gemini AI for intelligent email composition
  • SMTP for email delivery
  • python-dotenv for configuration