
Customer Reminder MCP
Enables automated customer reminder management by integrating with Google Sheets to read customer data and sending scheduled email reminders based on due dates. Supports personalized email templates, intelligent scheduling, and duplicate prevention with Gmail SMTP integration.
README
Customer Reminder MCP
A Model Context Protocol (MCP) server that helps business owners manage and automatically send customer reminders via email. This system integrates with Google Sheets to read customer data and sends scheduled reminders based on due dates.
Features
🚀 Google Sheets Integration
- Connect to Google Sheets to read customer reminder data
- Support for multiple date formats (YYYY-MM-DD, MM/DD/YYYY, DD/MM/YYYY)
- Automatic data validation and error handling
📧 Email Reminders
- Send personalized email reminders to customers
- Customizable message templates with dynamic placeholders
- Support for Gmail SMTP with app passwords
⏰ Intelligent Scheduling
- APScheduler-based background processing
- Configurable interval checking (minutes, hours, days)
- Prevents duplicate reminder sends with tracking system
- Immediate execution or scheduled background service
🔌 Model Context Protocol (MCP) Integration
- Full MCP server implementation
- Tools for checking reminders, sending reminders, and retrieving data
- Resources for accessing customer reminders and sent reminder history
- Test mode to verify sheet connection and server status
Project Structure
reminder-mcp/
├── reminder_app.py # Main application with all classes and logic
├── mcp_reminder_server.py # MCP server implementation
├── reminder_app.log # Application logs
├── reminder_jobs.sqlite # APScheduler job storage
├── credentials.json # Google Sheets service account credentials
├── .env # Environment variables (create this)
├── requirements.txt # Python dependencies
├── mcp_config.json # MCP server configuration
└── README.md # This file
Prerequisites
- Python 3.8+ installed
- Google Sheets API credentials (service account JSON file)
- Gmail account with app password enabled
- Google Sheet with customer reminder data
Setup Instructions
1. Install Dependencies
pip install -r requirements.txt
Or install individually:
pip install python-dotenv gspread oauth2client apscheduler
2. Set up Google Sheets API Credentials
-
Copy the provided example file:
cp credentials.example.json credentials.json
-
Replace the placeholder values in
credentials.json
with your actual Google service account credentials. -
SECURITY WARNING: Never commit your
credentials.json
file to version control or share it publicly!
3. Create Environment File
-
Copy the provided example file:
cp .env.example .env
-
Edit the
.env
file and update with your actual values:
# Email Configuration (Gmail)
EMAIL_HOST=smtp.gmail.com
EMAIL_PORT=587
EMAIL_USERNAME=your_email@gmail.com
EMAIL_PASSWORD=your_app_password
# Google Sheets Configuration
GOOGLE_CREDENTIALS_FILE=credentials.json
GOOGLE_SPREADSHEET_NAME=Customer_reminder
# Scheduler Configuration
DEFAULT_INTERVAL_MINUTES=6
4. Test Your Configuration
Test your connection to Google Sheets and verify the setup:
python mcp_reminder_server.py --test
This will verify your connection and display the available MCP tools and resources.
3. Setup Google Sheets API
- Go to Google Cloud Console
- Create a new project or select existing
- Enable Google Sheets API
- Create service account credentials:
- Navigate to "IAM & Admin" > "Service Accounts"
- Click "Create Service Account"
- Provide a name and description
- For role, select a minimal role like "Viewer" or create a custom role with specific permissions
- Create a key for the service account:
- Select your new service account
- Go to the "Keys" tab
- Click "Add Key" > "Create new key"
- Choose JSON format
- Download the JSON credentials file and save it as
credentials.json
in your project directory - Share your Google Sheet with the service account email address (limited to "Viewer" or "Editor" as needed)
- IMPORTANT: Keep your credentials secure:
- Never commit this file to version control
- Restrict access to the credentials file on your local system
- Consider encrypting the file when not in use
4. Prepare Your Google Sheet
Create a Google Sheet with these columns:
customer_name
- Customer's full namecustomer_email
- Customer's email addressdue_date
- When reminder is due (YYYY-MM-DD format)message_template
- Custom message (use {customer_name} and {due_date} placeholders)reminder_type
- Set to "email"
Example:
customer_name | customer_email | due_date | message_template | reminder_type |
---|---|---|---|---|
John Doe | john@example.com | 2025-08-15 | Hi {customer_name}! Your appointment is on {due_date}. |
Usage
Run Once (Immediate)
python reminder_app.py
# or
python reminder_app.py --run-once
Start Scheduler (Background Service)
# Default 6-minute intervals
python reminder_app.py --schedule
# Custom intervals
python reminder_app.py --schedule 10 # Every 10 minutes
python reminder_app.py --schedule 30 # Every 30 minutes
python reminder_app.py --schedule 1 # Every 1 minute (testing)
Run MCP Server
# Normal operation - starts the MCP server for integration with applications
python mcp_reminder_server.py
# Test mode - verifies Google Sheets connection and shows available tools
python mcp_reminder_server.py --test
Help
python reminder_app.py --help
How It Works
- Data Source: Reads customer data from Google Sheets
- Date Checking: Identifies reminders due today or overdue
- Duplicate Prevention: Tracks sent reminders to prevent duplicates
- Email Sending: Sends personalized emails via SMTP
- Scheduling: Runs automatically at specified intervals
- Logging: Provides detailed console output for monitoring
- MCP Integration: Exposes functionality via Model Context Protocol
Scheduler Settings
- DEFAULT_INTERVAL_MINUTES: Default check interval (default: 6)
MCP Server Tools
The MCP server exposes the following tools:
- send_reminder: Sends a single reminder to a customer
- check_due_reminders: Checks for and sends all due reminders
- get_customer_reminders: Retrieves customer reminder data
- get_sent_reminders: Retrieves history of sent reminders
- get_sheet_status: Checks connection status with Google Sheets
MCP Server Resources
- reminders://customer-reminders: Customer reminder data
- reminders://sent-reminders: History of sent reminders
Troubleshooting
Common Issues
Gmail Authentication Error (535)
- Ensure 2-Step Verification is enabled
- Use app password, not regular password
- Check username/password in .env file
Google Sheets Not Found
- Verify spreadsheet name matches exactly
- Ensure service account has access to the sheet
- Check credentials.json file exists
No Reminders Found
- Verify date format in Google Sheet (YYYY-MM-DD)
- Check if reminders are due (today or overdue)
- Ensure required columns exist with correct names
Development
Testing
Use short intervals for testing:
python reminder_app.py --schedule 1 # Check every minute
Test the MCP server functionality:
python mcp_reminder_server.py --test
This will show:
- Available tools and resources
- Example tool calls
- Google Sheets connection status
- Current reminders in the system
Adding Features
The modular design allows easy extension:
- Add new reminder types (SMS, etc.)
- Integrate with different data sources
- Add web dashboard
- Implement advanced scheduling
- Create new MCP tools and resources
License
This project is part of the Model Context Protocol ecosystem and is designed for business automation and customer relationship management for Preshify.
Security Best Practices
Protecting Sensitive Information
-
Never commit credentials to version control
- Both
credentials.json
and.env
files contain sensitive information - Always keep these files in your
.gitignore
- Use example files (provided) to show the structure without exposing real data
- Both
-
Regularly rotate credentials
- Periodically generate new Google service account keys
- Update your Gmail app password regularly
- Revoke unused or potentially compromised credentials
-
Limit permissions
- Your Google service account should have minimal required permissions
- Share your Google Sheet with the service account email using the most restrictive permissions necessary
-
Monitor for unauthorized access
- Regularly check the Google Cloud Console for unusual activity
- Review application logs for unexpected behavior
- Be alert to unplanned or unexpected emails being sent
Data Handling Recommendations
-
Minimize data retention
- Only store the customer data you need
- Consider implementing a data retention policy
- Regularly clean up old reminder data
-
Implement logging best practices
- Don't log sensitive customer information
- Use log rotation to prevent log files from growing too large
- Regularly review logs for security issues
Support
For issues, questions, or feature requests, please create an issue in the repository.
推荐服务器

Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。