GitHub Stars
59
User Rating
Not Rated
Favorites
0
Views
24
Forks
32
Issues
3
Installation
Difficulty
IntermediateEstimated Time
10-20 minutes
Requirements
Python 3.6以上Gmail APIの有効化Installation
Installation
Prerequisites
Please specify required software and versions:Python: 3.6 or higher
Gmail API: Enabled
Installation Steps
1. Clone Repository
bash
git clone https://github.com/jasonsum/gmail-mcp-server
cd gmail-mcp-server
2. Install Dependencies
bash
pip install -r requirements.txt
3. Gmail API Setup
Set up the Gmail API and obtain the OAuth client ID. Refer to the README for steps.4. Start Server
bash
python server.py --creds-file-path /path/to/your/client_creds.json --token-path /path/to/your/app_tokens.json
Troubleshooting
Common Issues
Issue: Server won't start Solution: Check Python version and reinstall dependencies. Issue: Authentication error occurs Solution: Recheck OAuth settings and ensure the correct file paths are specified.Configuration
Configuration
Basic Configuration
Gmail API Setup
You need to specify the OAuth client ID JSON file. Start the server as follows:bash
python server.py --creds-file-path /path/to/your/client_creds.json --token-path /path/to/your/app_tokens.json
Advanced Configuration
Security Settings
Store OAuth keys in a secure location with appropriate access permissions.
Manage the token file path securely.
Performance Tuning
Adjust timeout and retry settings as needed.
Examples
Examples
Basic Usage
Example for Sending Email
python
import requests
response = requests.post('http://localhost:5000/send-email', json={
'recipient_id': 'example@example.com',
'subject': 'Test Email',
'message': 'This is a test email.'
})
print(response.json())
Retrieving Unread Emails
python
response = requests.get('http://localhost:5000/get-unread-emails')
print(response.json())
Use Cases
Using the send-email tool to send an email to a specific recipient.
Utilizing the trash-email tool to delete unwanted emails from the inbox.
Retrieving a list of unread emails to prioritize important messages.
Reading a specific email and replying after confirming its content.
Opening an email in a browser to review detailed content.
Additional Resources
Author Information
Product-focused data scientist obsessed with prototyping, operationalizing, and scaling Generative AI and Machine Learning in the cloud.
SnowflakeChicago, IL
3
Followers
5
Repositories
0
Gists
0
Total Contributions
Related MCPs
LangBot
13398
🤩 Easy-to-use global IM bot platform designed for the LLM era / 简单易用的大模型即时通信机器人开发平台 ⚡️ Bots for QQ / QQ频道 / Discord / WeChat(微信)/ Telegram / 飞书 / 钉钉 / Slack 🧩 Integrated with ChatGPT(GPT)、DeepSeek、Dify、n8n、Claude、Google Gemini、xAI、PPIO、Ollama、阿里云百炼、SiliconFlow、Qwen、Moonshot(Kimi K2)、SillyTraven、MCP、WeClone etc. LLM & Agent & RAG