Email_MCP
First MCP server which sends and reads emails from your inbox
claude mcp add --transport stdio shashwat051102-email_mcp python Email_MCP_Server.py \ --env EMAIL_ADDRESS="Your Gmail address" \ --env EMAIL_PASSWORD="Your Gmail App Password"
How to use
Email_MCP is a Python-based server built with FastMCP that provides a simple API for sending HTML emails via Gmail SMTP and listing recent emails from your Gmail inbox. It loads configuration from environment variables to keep credentials secure, and exposes its tools as MCP endpoints for easy integration into other applications. The core tools are send_email and list_recent_emails, which you can call through the MCP client just like other MCP endpoints. When running, the server reads EMAIL_ADDRESS and EMAIL_PASSWORD from the environment to authenticate with Gmail's SMTP/IMAP services, so you can securely send messages and preview inbox contents without embedding credentials in your code.
How to install
Prerequisites:\n- Python 3.8+ (recommended)\n- pip (comes with Python)\n- A Gmail account (with App Password if 2FA is enabled)\n\nStep-by-step:\n1) Clone or download the repository and navigate to the project folder.\n2) Create and populate the .env file (or set environment variables) with your Gmail credentials:\n\nEMAIL_ADDRESS=your_email@gmail.com\nEMAIL_PASSWORD=your_gmail_app_password\n\n3) Install dependencies:\nbash\npip install -r requirements.txt\n\n4) Start the server:\nbash\np python Email_MCP_Server.py\n\n5) The server will expose MCP endpoints (e.g., /send_email and /list_recent_emails) via FastMCP for programmatic access. You can configure your MCP client to connect to localhost:8000 (default) or another host/port as configured.\n
Additional notes
Tips and notes:\n- Use an App Password if your Gmail account has 2FA enabled.\n- Do not commit .env or credentials to version control.\n- Ensure network access to Gmail SMTP (port 465) and IMAP (port 993) if you run behind firewalls.\n- If you encounter authentication issues, double-check the EMAIL_ADDRESS and EMAIL_PASSWORD values and ensure less secure app access is permitted if not using OAuth2.\n- For production deployments, consider OAuth2-based access to Gmail rather than App Passwords for long-term security.\n
Related MCP Servers
MCP-Bridge
A middleware to provide an openAI compatible endpoint that can call MCP tools
mysql_mcp_server_pro
Model Context Protocol (MCP) server that supports secure interaction with MySQL databases and has anomaly analysis capabilities.更加牛逼!更加好用!不仅止于mysql的增删改查功能; 还包含了数据库异常分析能力;且便于开发者们进行个性化的工具扩展
mcp -odoo
A Model Context Protocol (MCP) server that enables AI assistants to securely interact with Odoo ERP systems through standardized resources and tools for data retrieval and manipulation.
mcp -starrocks
StarRocks MCP (Model Context Protocol) Server
mcp-flight-search
MCP Server implementation for the Model Context Protocol (MCP) enabling AI tool usage - Realtime Flight Search
asterisk
Asterisk Model Context Protocol (MCP) server.