Google Workspace MCP Server
Comprehensive integration with Google Workspace services (Gmail, Calendar, Sheets, Docs, Drive) plus local storage for job tracking and a personal memory system for storing user preferences, behaviors, and goals.
README
Google Workspace MCP Server
A comprehensive Model Context Protocol (MCP) server for Google Workspace integration with Claude Desktop. Provides 109 tools for Gmail, Calendar, Sheets, Docs, Drive, plus local storage and personal memory system.
Features
- Gmail: Read, send, reply, forward emails, manage drafts and labels
- Google Calendar: List, create, update, delete events
- Google Sheets: Create, read, write spreadsheets with formatting
- Google Docs: Create and edit documents with formatting
- Google Drive: Upload, download, share files and folders
- Local Storage: Profile, job applications, contacts, skills, tasks
- Memory System: Personal preferences, behaviors, goals, patterns
Setup Guide
Prerequisites
- Python 3.10 or higher
- Claude Desktop installed
- Google Cloud project with APIs enabled
Step 1: Clone or Download
git clone <repository-url>
cd google-mcp-server
Step 2: Install Dependencies
pip install -r requirements.txt
Required packages:
mcp>=0.9.0google-api-python-client>=2.100.0google-auth-httplib2>=0.2.0google-auth-oauthlib>=1.2.0python-dotenv>=1.0.0requests>=2.31.0
Step 3: Set Up Google Cloud Project
- Go to Google Cloud Console
- Create a new project (or select existing)
- Enable the following APIs:
- Gmail API
- Google Calendar API
- Google Sheets API
- Google Docs API
- Google Drive API
- Go to APIs & Services > Credentials
- Click Create Credentials > OAuth client ID
- Select Desktop app as application type
- Download the JSON file
- Rename it to
credentials.jsonand place in thegoogle-mcp-serverfolder
Step 4: Authenticate with Google
Run the authentication script:
cd google-mcp-server
python src/google_auth.py
This will:
- Open a browser window for Google sign-in
- Ask you to authorize the app
- Create a
tokens.jsonfile with your access tokens
Step 5: Set Up Database Folder (Optional)
Create a centralized database folder for all your data:
mkdir -p ~/Documents/pbdb/mcp
mkdir -p ~/Documents/pbdb/analytics
mkdir -p ~/Documents/pbdb/exports
mkdir -p ~/Documents/pbdb/backups
The MCP server stores data in:
~/Documents/pbdb/mcp/local_data.db- Job tracking, contacts, skills~/Documents/pbdb/mcp/personal_memory.db- Personal memory system
Step 6: Configure Claude Desktop
-
Find your Claude Desktop config file:
- Windows:
%APPDATA%\Claude\claude_desktop_config.json - macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
- Windows:
-
Add the MCP server configuration:
{
"mcpServers": {
"google-workspace": {
"command": "python",
"args": [
"C:/path/to/google-mcp-server/src/mcp_server.py"
],
"env": {},
"cwd": "C:/path/to/google-mcp-server"
}
}
}
Windows Example:
{
"mcpServers": {
"google-workspace": {
"command": "C:\\Users\\YourName\\miniconda3\\python.exe",
"args": [
"C:\\Users\\YourName\\google-mcp-server\\src\\mcp_server.py"
],
"env": {},
"cwd": "C:\\Users\\YourName\\google-mcp-server"
}
}
}
macOS/Linux Example:
{
"mcpServers": {
"google-workspace": {
"command": "/usr/bin/python3",
"args": [
"/home/username/google-mcp-server/src/mcp_server.py"
],
"env": {},
"cwd": "/home/username/google-mcp-server"
}
}
}
Step 7: Restart Claude Desktop
Close and reopen Claude Desktop. The MCP server will initialize automatically.
Step 8: Verify Installation
In Claude Desktop, try these commands:
- "Show my recent emails"
- "What events do I have on my calendar?"
- "List my Google Drive files"
- "What do you know about me?"
Available Tools (109 Total)
Gmail (21 tools)
| Tool | Description |
|---|---|
list_emails |
List emails from inbox |
get_email_detail |
Get full email content |
send_email |
Send a new email |
search_emails |
Search emails with query |
create_draft |
Create a draft email |
list_drafts |
List all drafts |
update_draft |
Update a draft |
send_draft |
Send a draft |
delete_draft |
Delete a draft |
reply_to_email |
Reply to an email |
forward_email |
Forward an email |
add_label |
Add label to email |
remove_label |
Remove label from email |
list_labels |
List all labels |
mark_as_read |
Mark email as read |
mark_as_unread |
Mark email as unread |
trash_email |
Move to trash |
archive_email |
Archive email |
create_followup_draft |
Create job follow-up draft |
create_thank_you_draft |
Create thank you draft |
Calendar (5 tools)
| Tool | Description |
|---|---|
list_calendar_events |
List upcoming events |
create_calendar_event |
Create a new event |
update_calendar_event |
Update an event |
delete_calendar_event |
Delete an event |
get_calendar_event |
Get event details |
Sheets (11 tools)
| Tool | Description |
|---|---|
create_spreadsheet |
Create new spreadsheet |
read_sheet |
Read data from sheet |
write_sheet |
Write data to sheet |
append_sheet |
Append rows to sheet |
get_sheet_info |
Get spreadsheet info |
create_sheet_tab |
Create new tab |
list_spreadsheets |
List all spreadsheets |
format_cells |
Format cells |
add_formula |
Add formula to cell |
share_spreadsheet |
Share spreadsheet |
create_job_tracker |
Create job tracker template |
Docs (12 tools)
| Tool | Description |
|---|---|
create_document |
Create new document |
read_document |
Read document content |
append_to_document |
Append text |
format_document_text |
Format text |
apply_paragraph_style |
Apply styles |
insert_table |
Insert table |
insert_bullet_list |
Insert bullet list |
insert_numbered_list |
Insert numbered list |
list_documents |
List all documents |
share_document |
Share document |
create_daily_report |
Create report template |
Drive (17 tools)
| Tool | Description |
|---|---|
list_files |
List files |
list_folders |
List folders |
create_folder |
Create folder |
upload_file |
Upload file |
download_file |
Download file |
move_file |
Move file |
copy_file |
Copy file |
delete_file |
Delete file |
search_files |
Search files |
share_file |
Share with user |
share_file_with_anyone |
Share with link |
get_file_metadata |
Get file info |
rename_file |
Rename file |
get_storage_quota |
Get storage info |
export_to_drive |
Export content |
Local Storage (21 tools)
| Tool | Description |
|---|---|
set_profile |
Set profile field |
get_profile |
Get profile |
get_full_profile |
Get complete profile |
add_job_application |
Add job application |
get_job_applications |
Get applications |
update_job_application |
Update application |
add_interview |
Add interview |
get_interviews |
Get interviews |
add_contact |
Add contact |
get_contacts |
Get contacts |
add_skill |
Add skill |
get_skills |
Get skills |
add_work_experience |
Add experience |
get_work_experience |
Get experience |
add_education |
Add education |
get_education |
Get education |
add_task |
Add task |
get_tasks |
Get tasks |
complete_task |
Complete task |
add_note |
Add note |
get_notes |
Get notes |
get_job_search_summary |
Get job stats |
Memory System (22 tools)
| Tool | Description |
|---|---|
save_about_me |
Save user info |
get_about_me |
Get user info |
remember |
Remember anything |
recall |
Recall memories |
add_behavior |
Store behavior pattern |
get_behaviors |
Get behaviors |
add_preference |
Store preference |
get_preferences |
Get preferences |
add_goal |
Store goal |
get_goals |
Get goals |
add_work_style |
Store work style |
get_work_style |
Get work style |
add_fact |
Store fact |
get_facts |
Get facts |
add_decision |
Log decision |
get_decisions |
Get decisions |
add_interaction |
Log interaction |
get_interactions |
Get interactions |
add_learning |
Store learning |
get_learnings |
Get learnings |
get_everything_about_user |
Get all user data |
search_memory |
Search memories |
Project Structure
google-mcp-server/
├── src/
│ ├── mcp_server.py # Main MCP server (109 tools)
│ ├── google_auth.py # OAuth authentication
│ ├── google_gmail.py # Gmail integration
│ ├── google_calendar.py # Calendar integration
│ ├── google_sheets.py # Sheets integration
│ ├── google_docs.py # Docs integration
│ ├── google_drive.py # Drive integration
│ ├── local_storage.py # SQLite local storage
│ └── memory_system.py # Personal memory system
├── credentials.json # OAuth credentials (create this)
├── tokens.json # Auth tokens (auto-generated)
├── config.json # Configuration
├── requirements.txt # Dependencies
└── README.md
Troubleshooting
Server not loading in Claude Desktop
- Check the path in
claude_desktop_config.json - Verify Python path is correct
- Check logs at
%APPDATA%\Claude\logs\mcp-server-google-workspace.log
Authentication errors
- Delete
tokens.jsonand re-authenticate - Verify
credentials.jsonis valid - Check that APIs are enabled in Google Cloud Console
Database errors
- Verify database folder exists at
~/Documents/pbdb/mcp/ - Check file permissions
- Delete
.dbfiles to reset (data will be lost)
License
MIT License
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。