A community-driven registry for Claude, Cursor, Windsurf, Cline & more. Not affiliated with Anthropic.
Are you the author? Sign in to claim
MCP Server that connects Claude AI to Gmail & Google Drive for intelligent email management, file organization, and prod
Transform Claude into a Google Workspace powerhouse with this comprehensive MCP server integration.
Turn Claude into your personal productivity assistant that can:
---
config:
theme: default
---
graph TB
User[User<br/>Master's Student] --> Claude[🤖 Claude AI<br/>Chat Interface]
Claude <==> MCP[MCP Server<br/>The Brain<br/>Node.js + ES Modules]
MCP --> Auth[OAuth2 Auth<br/>Token Management<br/>Security Layer]
MCP --> Gmail[Gmail Service<br/>Email Operations]
MCP --> Calendar[Calendar Service<br/>Meeting Management]
MCP --> Drive[Drive Service<br/>File Operations]
MCP --> Meet[Meet Integration<br/>Video Conferencing]
Auth --> GoogleAuth[Google OAuth2<br/>Secure Authentication]
Gmail --> GmailAPI[Gmail API<br/>Google Servers]
Calendar --> CalendarAPI[Calendar API<br/>Google Servers]
Drive --> DriveAPI[Drive API<br/>Google Servers]
Meet --> MeetAPI[Meet API<br/>Google Servers]
Claude -.->|"Create meeting for 2 PM"| MCP
MCP -.->|"Tool Call: create_meeting"| Calendar
Calendar -.->|"API Request"| CalendarAPI
CalendarAPI -.->|"Meeting Created"| Calendar
Calendar -.->|"Success Response"| MCP
MCP -.->|"Meeting created successfully!"| Claude
classDef userStyle fill:#e1f5fe,stroke:#0277bd,stroke-width:2px
classDef claudeStyle fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
classDef mcpStyle fill:#e8f5e8,stroke:#2e7d32,stroke-width:3px
classDef serviceStyle fill:#fff3e0,stroke:#f57c00,stroke-width:2px
classDef apiStyle fill:#fce4ec,stroke:#c2185b,stroke-width:2px
classDef authStyle fill:#fff8e1,stroke:#f9a825,stroke-width:2px
class User userStyle
class Claude claudeStyle
class MCP mcpStyle
class Gmail,Calendar,Drive,Meet serviceStyle
class GmailAPI,CalendarAPI,DriveAPI,MeetAPI apiStyle
class Auth,GoogleAuth authStyle
---
config:
theme: redux-dark
---
sequenceDiagram
participant U as User
participant C as Claude
participant MCP as MCP Server
participant Auth as Auth Manager
participant Gmail as Gmail Service
participant Cal as Calendar Service
participant Drive as Drive Service
participant G as Google APIs
Note over U,G: Example: "Create team meeting and send invites"
U->>C: "Create a meeting for 2 PM today and invite the team"
C->>MCP: Tool Call: create_meeting_and_send
MCP->>Auth: Check authentication
Auth-->>MCP: Tokens valid
par Create Meeting
MCP->>Cal: Create calendar event
Cal->>G: POST /calendar/events
G-->>Cal: Event created with Meet link
Cal-->>MCP: Meeting details
and Send Invites
MCP->>Gmail: Send calendar invites
Gmail->>G: POST /gmail/send
G-->>Gmail: Emails sent
Gmail-->>MCP: Invites sent
and Create Document
MCP->>Drive: Create meeting notes doc
Drive->>G: POST /drive/files
G-->>Drive: Document created
Drive-->>MCP: Document ready
end
MCP->>MCP: Compile results
MCP-->>C: Success response with details
C-->>U: "Meeting created! Invites sent to team. Notes doc ready."
Note over U,G: Total time: ~10 seconds for complex workflow
---
config:
layout: dagre
theme: base
look: classic
---
flowchart LR
subgraph subGraph0["Core Components"]
Server["MCP Server<br>- Request Handler<br>- Tool Registry<br>- Response Formatter"]
Auth["Auth Manager<br>- OAuth2 Flow<br>- Token Management<br>- Security Layer"]
end
subgraph subGraph1["Service Layer"]
Gmail["Gmail Service<br>- Search emails<br>- Send emails<br>- Manage labels<br>- Email analysis"]
Calendar["Calendar Service<br>- Create events<br>- Schedule meetings<br>- Generate Meet links<br>- Timezone handling"]
Drive["Drive Service<br>- Create files<br>- Share documents<br>- Organize folders<br>- Manage permissions"]
Meet["Meet Integration<br>- Coordinate workflows<br>- Format invitations<br>- Send reminders<br>- Handle RSVPs"]
end
subgraph subGraph2["Tool Handlers"]
EmailTools["Email Tools<br>- search_emails<br>- send_email<br>- delete_email<br>- create_label"]
CalendarTools["Calendar Tools<br>- create_meeting<br>- schedule_event<br>- send_reminder<br>- list_meetings"]
DriveTools["Drive Tools<br>- create_file<br>- share_file<br>- organize_folder<br>- update_permissions"]
WorkflowTools["Workflow Tools<br>- create_and_send_meet<br>- project_setup<br>- bulk_operations<br>- smart_scheduling"]
end
subgraph subGraph3["Schema Definitions"]
Schemas["Tool Schemas<br>- Input validation<br>- Response formatting<br>- Error handling<br>- Type definitions"]
end
subgraph subGraph4["MCP Server (The Brain)"]
direction TB
subGraph0
subGraph1
subGraph2
subGraph3
end
subgraph subGraph5["External Services"]
GoogleAPIs["Google APIs<br>- Gmail API<br>- Calendar API<br>- Drive API<br>- OAuth2 API"]
end
subgraph subGraph6["Claude Integration"]
Claude["Claude AI<br>- Natural language<br>- Tool discovery<br>- Response parsing<br>- Context management"]
end
Server --> Auth & Gmail & Calendar & Drive & Meet
Gmail --> EmailTools & GoogleAPIs
Calendar --> CalendarTools & GoogleAPIs
Drive --> DriveTools & GoogleAPIs
Meet --> WorkflowTools
EmailTools --> Schemas
CalendarTools --> Schemas
DriveTools --> Schemas
WorkflowTools --> Schemas
Auth --> GoogleAPIs
Claude <--> Server
Server:::coreStyle
Auth:::coreStyle
Gmail:::serviceStyle
Calendar:::serviceStyle
Drive:::serviceStyle
Meet:::serviceStyle
EmailTools:::toolStyle
CalendarTools:::toolStyle
DriveTools:::toolStyle
WorkflowTools:::toolStyle
Schemas:::toolStyle
GoogleAPIs:::externalStyle
Claude:::claudeStyle
classDef coreStyle fill:#e8f5e8,stroke:#2e7d32,stroke-width:2px
classDef serviceStyle fill:#fff3e0,stroke:#f57c00,stroke-width:2px
classDef toolStyle fill:#e3f2fd,stroke:#1976d2,stroke-width:2px
classDef externalStyle fill:#fce4ec,stroke:#c2185b,stroke-width:2px
classDef claudeStyle fill:#f3e5f5,stroke:#7b1fa2,stroke-width:2px
git clone https://github.com/SmitPatel-31/gmail-drive-mcp-server
cd gmail-drive-mcp-server
npm install
Create Google Cloud Project
Enable Required APIs
- Gmail API
- Google Calendar API
- Google Drive API
Create OAuth2 Credentials
credentials.json# Run interactive authentication setup
node auth.js
# Follow the prompts to:
# 1. Visit the authorization URL
# 2. Grant permissions
# 3. Enter the authorization code
# 4. Tokens will be saved automatically
# Start the MCP server
npm start
### Step 5: Configure Claude
Add the MCP server to your Claude configuration:
```json
{
"mcpServers": {
"gmail-drive-server": {
"command": "node",
"args": ["path/to/your/server.js"],
"env": {}
}
}
}
| Tool | Description | Example |
|---|---|---|
search_emails | Search emails with Gmail queries | "Find emails from john@company.com about project" |
send_email | Send emails with attachments | "Send progress update to the team" |
delete_email | Delete specific emails | "Delete that spam email" |
archive_email | Archive emails | "Archive all newsletters" |
create_label | Create Gmail labels | "Create 'Important Projects' label" |
analyze_email_patterns | Email statistics and analytics | "Show my email patterns from last month" |
| Tool | Description | Example |
|---|---|---|
create_meeting | Schedule meetings with Meet links | "Create team meeting for 2 PM today" |
create_quick_meet | Instant meeting in 5 minutes | "Quick standup meeting with the team" |
create_instant_meet | Meeting starting in 2 minutes | "Emergency call right now" |
create_meeting_natural | Natural language scheduling | "6 PM to 8 PM today for study group" |
send_meet_reminder | Send meeting reminders | "Remind everyone about tomorrow's demo" |
list_upcoming_meetings | Show upcoming meetings | "What meetings do I have this week?" |
| Tool | Description | Example |
|---|---|---|
create_file | Create documents, sheets, slides | "Create project proposal document" |
update_file | Edit existing files | "Update the meeting notes" |
share_file | Share with permissions | "Share with edit access to the team" |
create_folder | Organize with folders | "Create Q4 Planning folder" |
move_file | Reorganize files | "Move all drafts to Final folder" |
search_drive_files | Find files quickly | "Find all files containing 'budget'" |
| Tool | Description | Example |
|---|---|---|
create_meet_and_send | Meeting + email automation | "Create client call and send professional invite" |
project_setup | Complete project initialization | "Set up new website project with all resources" |
bulk_email_management | Process multiple emails | "Organize my inbox and respond to urgent items" |
// Thesis defense preparation
"Set up my thesis defense for next Friday at 2 PM, invite my committee, create presentation template, and send preparation checklist"
// Group project coordination
"Create our capstone project workspace: weekly meeting, shared folder, task tracking document, and team communication setup"
// Research organization
"Organize my literature review: create categorized folders, move research papers, and set up citation tracking"
// Client meeting setup
"Schedule client presentation for Thursday 10 AM, create agenda document, invite stakeholders, and send professional confirmation"
// Team collaboration
"Set up sprint planning: create meeting, invite dev team, prepare backlog document, and schedule follow-up sessions"
// Event coordination
"Organize company hackathon: create event calendar, set up registration, prepare resource folders, and coordinate communications"
// Weekly planning
"Set up my weekly review meeting, create planning template, organize last week's documents, and prepare agenda"
// Travel coordination
"Plan conference trip: create itinerary, share with team, set up out-of-office, and coordinate coverage meetings"
credentials.json and token.json secureAuthentication Errors
# Clear tokens and re-authenticate
rm token.json
node auth.js
node test-auth.js
API Rate Limits
# Check quota usage in Google Cloud Console
# Implement exponential backoff (already included)
Permission Errors
# Verify API enablement
# Check OAuth2 scope configuration
# Confirm credentials.json format
| Code | Description | Solution |
|---|---|---|
AUTH_FAILED | Authentication issues | Re-run auth setup |
API_QUOTA_EXCEEDED | Rate limit reached | Wait and retry |
INVALID_PERMISSIONS | Scope issues | Check OAuth2 scopes |
NETWORK_ERROR | Connection problems | Check internet connection |
Create Service Method
// In appropriate service file
async newFeature(params) {
// Implementation
}
Define Tool Schema
// In tool-definations.js
{
name: 'new_feature',
description: 'What it does',
inputSchema: { /* schema */ }
}
Add Tool Handler
// In tool-handlers.js
async handleNewFeature(args) {
// Handle the tool call
}
Register Tool
// In server.js switch statement
case 'new_feature':
return await this.handleNewFeature(args);
We welcome contributions! Here's how to get started:
# Fork the repository
git clone https://github.com/your-username/gmail-drive-mcp-server
cd gmail-drive-mcp-server
# Create feature branch
git checkout -b feature/amazing-feature
# Install dependencies
npm install
This project is licensed under the MIT License - see the LICENSE file for details.
⭐ Star this repository if it helped you be more productive!
🔗 Share with friends who need workflow automation
🤝 Contribute to make it even better
Built with ❤️ by a productivity-obsessed master's student who got tired of manual workflows.
A Jetbrains IDE IntelliJ plugin aimed to provide coding agents the ability to leverage intelliJ's indexing of the codeba
Run Claude Code as an MCP server so any agent can delegate coding tasks to it
Browser automation using accessibility snapshots instead of screenshots