gmail-drive
MCP Server that connects Claude AI to Gmail & Google Drive for intelligent email management, file organization, and productivity analytics. Transform your inbox chaos into an AI-powered productivity system.
claude mcp add --transport stdio smitpatel-31-gmail-drive-mcp-server node path/to/server.js \ --env REDIRECT_URI="http://localhost:8080/oauth2callback" \ --env OAUTH2_SCOPES="https://www.googleapis.com/auth/gmail.modify https://www.googleapis.com/auth/calendar https://www.googleapis.com/auth/drive" \ --env GOOGLE_CLIENT_ID="Your Google OAuth client ID" \ --env GOOGLE_CLIENT_SECRET="Your Google OAuth client secret" \ --env OAUTH2_CALLBACK_PORT="8080"
How to use
This MCP server integrates Gmail, Google Calendar, and Google Drive capabilities into Claude, enabling natural-language driven workflows that manage emails, calendar events, and drive files. You can trigger actions such as sending emails, creating calendar events with Meet links, and generating or organizing documents in Drive, all as part of multi-step automations. The server acts as the brain that discovers appropriate tools, authenticates with Google services, coordinates the service calls, and returns concise results to Claude for user-facing responses.
To use it, authorize the MCP server with Google OAuth2 for the Gmail, Calendar, and Drive scopes. Once authenticated, invoke tool calls from Claude like create_meeting, send_email, create_document, or project_setup to perform composite workflows (e.g., “Create a meeting at 2 PM, invite the team, and generate a notes doc.”). The MCP server handles token management, API requests, and formatting of responses so Claude can present a clear summary and next steps to users.
How to install
Prerequisites:
- Node.js 18+ installed on your machine or server
- Access to Google Cloud Console to create OAuth2 credentials for Gmail, Calendar, and Drive APIs
- Network access to Google APIs from your runtime environment
Installation steps:
-
Clone the repository: git clone https://github.com/your-org/gmail-drive-mcp-server.git cd gmail-drive-mcp-server
-
Install dependencies: npm install
-
Create Google OAuth2 credentials:
- Create OAuth 2.0 Client IDs for Web application
- Set Redirect URI to http://localhost:8080/oauth2callback (or your deployed host)
- Note the Client ID and Client Secret
-
Configure environment variables:
- Set GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET with the credentials obtained above
- Optionally adjust OAUTH2_CALLBACK_PORT if not using 8080
-
Run the server: npm run start
or if using a direct node start script
node path/to/server.js
-
Visit the authorization URL produced by the server to grant access to Gmail, Calendar, and Drive.
-
In Claude, start using the MCP-enabled capabilities via the configured server name (gmail-drive).
Additional notes
Tips:
- Ensure OAuth scopes include Gmail, Calendar, and Drive to enable full workflow capabilities.
- If you encounter rate limits or authentication errors, verify that refresh tokens are being stored securely and that the redirect URI exactly matches what’s configured in Google Cloud Console.
- Use project_setup workflows to initialize common structures (meeting + notes doc + invites) in a single command.
- Monitor logs for tool discovery messages from Claude to understand which tool handlers (Email Tools, Calendar Tools, Drive Tools) are being invoked.
- For production, consider deploying behind a reverse proxy and securing the OAuth callback endpoint with TLS.
- If you need to adjust capabilities, modify the Tool Handlers mappings (EmailTools, CalendarTools, DriveTools, WorkflowTools) and their associated schemas as needed.
Related MCP Servers
zen
Selfhosted notes app. Single golang binary, notes stored as markdown within SQLite, full-text search, very low resource usage
MCP -Deepseek_R1
A Model Context Protocol (MCP) server implementation connecting Claude Desktop with DeepSeek's language models (R1/V3)
mcp-fhir
A Model Context Protocol implementation for FHIR
mcp
Inkdrop Model Context Protocol Server
mcp-appium-gestures
This is a Model Context Protocol (MCP) server providing resources and tools for Appium mobile gestures using Actions API..
dubco -npm
The (Unofficial) dubco-mcp-server enables AI assistants to manage Dub.co short links via the Model Context Protocol. It provides three MCP tools: create_link for generating new short URLs, update_link for modifying existing links, and delete_link for removing short links.