Google Tools MCP Server
README.md
# Google Tools MCP Server
## 🚀 **Business Value & Use Cases**
This MCP (Model Context Protocol) server is designed for **businesses that already have existing authentication systems** and want to seamlessly integrate Google Workspace capabilities into their AI agents and applications.
### **🎯 Perfect For:**
- **Enterprise AI Assistants** - Add Google Workspace functionality to existing AI chatbots
- **Business Automation** - Integrate Gmail, Drive, Docs, Tasks, and Calendar into workflow automation
- **Customer Support Systems** - Enable AI agents to manage emails, documents, and tasks
- **Productivity Applications** - Add Google Workspace tools to existing business applications
- **CRM Integration** - Connect Google services to existing customer relationship management systems
### **💼 Business Benefits:**
- **Zero Integration Overhead** - Works with existing OAuth systems
- **Unified Google Workspace Access** - Single interface for 5 Google services
- **AI-Ready Architecture** - Designed specifically for AI agent integration
- **Enterprise Security** - OAuth 2.0 with granular permission scopes
- **Rapid Deployment** - Get Google Workspace tools in your AI agent within hours
### **🔧 Technical Advantages:**
- **25+ Google Workspace Operations** - Complete coverage of Gmail, Drive, Docs, Tasks, Calendar
- **MCP Protocol Compliance** - Standard interface for AI agent integration
- **Modular Architecture** - Easy to extend and customize for business needs
- **Error Handling** - Robust error management for production environments
- **Documentation** - Comprehensive API documentation and examples
---
## OAuth Scopes
You can get the required scopes from the [Google OAuth 2.0 Playground](https://developers.google.com/oauthplayground/):
### **Essential Scopes (Minimum Required):**
```
https://www.googleapis.com/auth/gmail.modify
https://www.googleapis.com/auth/drive.readonly
https://www.googleapis.com/auth/calendar
```
### **Complete Scope List:**
#### **📧 Gmail API Scopes:**
- `https://www.googleapis.com/auth/gmail.modify` - Read, compose, send, and permanently delete messages
- `https://www.googleapis.com/auth/gmail.readonly` - Read-only access to Gmail messages and settings
- `https://www.googleapis.com/auth/gmail.send` - Send messages on behalf of the user
- `https://www.googleapis.com/auth/gmail.compose` - Compose and send messages
#### **📁 Google Drive API Scopes:**
- `https://www.googleapis.com/auth/drive` - Full access to Google Drive files
- `https://www.googleapis.com/auth/drive.readonly` - Read-only access to Google Drive files
- `https://www.googleapis.com/auth/drive.metadata` - Access to file metadata
#### **📅 Google Calendar API Scopes:**
- `https://www.googleapis.com/auth/calendar` - Full access to Google Calendar
- `https://www.googleapis.com/auth/calendar.readonly` - Read-only access to Google Calendar
- `https://www.googleapis.com/auth/calendar.events` - Access to calendar events
#### **📄 Google Docs API Scopes:**
- `https://www.googleapis.com/auth/documents` - Full access to Google Docs
- `https://www.googleapis.com/auth/documents.readonly` - Read-only access to Google Docs
#### **✅ Google Tasks API Scopes:**
- `https://www.googleapis.com/auth/tasks` - Full access to Google Tasks
- `https://www.googleapis.com/auth/tasks.readonly` - Read-only access to Google Tasks
### **OAuth 2.0 Playground Configuration:**
Copy this scope list for testing:
```
https://www.googleapis.com/auth/gmail.modify,https://www.googleapis.com/auth/drive.readonly,https://www.googleapis.com/auth/calendar,https://www.googleapis.com/auth/documents,https://www.googleapis.com/auth/tasks
```
## Available Tools
### **📧 Gmail Tools (gmail.py)**
- `search_gmail_messages` - Search messages with query syntax
- `list_gmail_messages` - List messages with filtering
- `list_gmail_labels` - List all Gmail labels
- `create_gmail_label` - Create new labels with colors
- `get_gmail_message_content` - Get full message content
- `send_gmail_message` - Send new messages
- `draft_gmail_message` - Create message drafts
### **📁 Google Drive Tools (gdrive.py)**
- `search_drive_files` - Search files with query syntax
- `get_drive_file_content` - Read file content (Office formats)
- `list_drive_items` - List folder contents
- `create_drive_file` - Create files or fetch from URLs
### **📅 Google Calendar Tools (gcalender.py)**
- `list_calendar_events` - List upcoming events
- `create_calendar_event` - Create new calendar events
### **📄 Google Docs Tools (docs_tools.py)**
#### **Core Functions:**
- `get_doc_content` - Extract document text
- `create_doc` - Create new documents
- `modify_doc_text` - Modify document text
#### **Extended Functions:**
- `search_docs` - Find documents by name
- `find_and_replace_doc` - Find and replace text
- `list_docs_in_folder` - List docs in folder
- `insert_doc_elements` - Add tables, lists, page breaks
- `export_doc_to_pdf` - Export document to PDF
#### **Complete Functions:**
- `insert_doc_image` - Insert images from Drive/URLs
- `update_doc_headers_footers` - Modify headers and footers
- `batch_update_doc` - Execute multiple operations
- `inspect_doc_structure` - Analyze document structure
- `create_table_with_data` - Create data tables
- `debug_table_structure` - Debug table issues
#### **Document Comments:**
- `read_document_comments` - Read document comments
- `reply_document_comments` - Reply to document comments
- `create_document_comments` - Create document comments
- `resolve_document_comments` - Resolve document comments
### **✅ Google Tasks Tools (tasks_tools.py)**
#### **Core Functions:**
- `list_tasks` - List tasks with filtering
- `get_task` - Retrieve task details
- `create_task` - Create tasks with hierarchy
- `update_task` - Modify task properties
#### **Extended Functions:**
- `delete_task` - Remove tasks
#### **Complete Functions:**
- `move_task` - Reposition tasks
- `clear_completed_tasks` - Hide completed tasks
#### **Task List Management:**
- `list_task_lists` - List task lists
- `get_task_list` - Get task list details
- `create_task_list` - Create task list
- `update_task_list` - Update task list
- `delete_task_list` - Delete task list
## 🔗 **Integration with Existing Business Systems**
### **For Businesses with Existing Authentication:**
This MCP server is designed to work seamlessly with your existing OAuth infrastructure:
- **Leverage Existing OAuth Tokens** - No need to rebuild authentication
- **Minimal Code Changes** - Drop-in integration with existing AI agents
- **Standard MCP Protocol** - Works with any MCP-compatible AI system
- **Scalable Architecture** - Handles multiple users and concurrent requests
### **Integration Examples:**
#### **Customer Support AI Agent:**
```python
# Your existing AI agent can now:
- Search customer emails in Gmail
- Create support tickets in Google Tasks
- Generate documentation in Google Docs
- Schedule follow-up meetings in Google Calendar
```
#### **Business Automation:**
```python
# Automate workflows with:
- Email processing and response
- Document generation and sharing
- Task assignment and tracking
- Calendar management and scheduling
```
#### **CRM Integration:**
```python
# Connect Google Workspace to your CRM:
- Sync customer communications
- Generate reports from Google Docs
- Track customer interactions
- Manage sales pipeline tasks
```
### **Quick Integration Steps:**
1. **Deploy the MCP Server** - Run on your infrastructure
2. **Configure OAuth** - Use your existing Google OAuth setup
3. **Connect AI Agent** - Point your AI agent to the MCP server
4. **Start Using** - Your AI agent now has Google Workspace capabilities
This server cannot be deployed
Maintenance
ActivityInactive
ResponsivenessNo issues