
Gmail
Connects to Gmail with enterprise-level controls and OAuth authentication. Lets you read, send, and manage emails programmatically while maintaining security governance.
Integrates Gmail functionality, enabling email search, message retrieval, and attachment downloads via Google Apps Script.
What it does
- Read and search Gmail messages
- Send emails with attachments
- Manage labels and folders
- Access contact information
- Filter messages by date and sender
- Handle OAuth authentication flow
Best for
About Gmail
Gmail is a community-built MCP server published by kazuph that provides AI assistants with tools and capabilities via the Model Context Protocol. Integrate Gmail API to search Gmail inbox for unread mail, retrieve messages, and download attachments using Google Apps It is categorized under productivity, communication.
How to install
You can install Gmail in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport.
License
Gmail is released under the MIT license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.
MCP Gmail
Model Context Protocol server for Gmail integration. This allows Claude Desktop (or any MCP client) to interact with your Gmail account through Google Apps Script.
Quick Start (For Users)
Prerequisites
- Node.js 18+ (install via
brew install node) - Gmail account
- Google Apps Script deployment
- Claude Desktop (install from https://claude.ai/desktop)
Configuration
- Deploy the Google Apps Script
- Visit Google Apps Script and create a new project
- Copy the entire contents of
code.gsand paste it into the script editor - Click on "Deploy" > "New deployment"
- Select "Web app" as the deployment type
- Configure the following settings:
- Execute as: Me
- Who has access: Anyone
- Click "Deploy"
- When prompted, review and authorize the app to access your Gmail account
- Copy the deployment URL and generate a random API key for security
Note: The script requires Gmail access permissions. When you first deploy and run the script, Google will ask you to review and grant these permissions. Make sure to:
-
Click "Review Permissions"
-
Select your Google account
-
Click "Advanced" if you see a warning
-
Click "Go to [Your Project Name] (unsafe)"
-
Click "Allow" to grant the necessary Gmail permissions
-
Open your Claude Desktop configuration file at:
~/Library/Application Support/Claude/claude_desktop_config.json
You can find this through the Claude Desktop menu:
-
Open Claude Desktop
-
Click Claude on the Mac menu bar
-
Click "Settings"
-
Click "Developer"
-
Add the following to your configuration:
{
"tools": {
"gmail": {
"command": "npx",
"args": ["-y", "@kazuph/mcp-gmail-gas"],
"env": {
"GAS_ENDPOINT": "YOUR_DEPLOYMENT_URL",
"VALID_API_KEY": "YOUR_API_KEY"
}
}
}
}
Note: Replace YOUR_DEPLOYMENT_URL and YOUR_API_KEY with your actual values.
For Developers
Prerequisites
- Node.js 18+ (install via
brew install node) - Gmail account
- Google Apps Script
- Claude Desktop (install from https://claude.ai/desktop)
- tsx (install via
npm install -g tsx)
Installation
git clone https://github.com/kazuph/mcp-gmail-gas.git
cd mcp-gmail-gas
npm install
npm run build
Development Configuration
-
Make sure Claude Desktop is installed and running.
-
Install tsx globally if you haven't:
npm install -g tsx
# or
pnpm add -g tsx
- Modify your Claude Desktop config located at:
~/Library/Application Support/Claude/claude_desktop_config.json
Add the following to your MCP client's configuration:
{
"tools": {
"gmail": {
"args": ["tsx", "/path/to/mcp-gmail-gas/index.ts"],
"env": {
"GAS_ENDPOINT": "YOUR_DEPLOYMENT_URL",
"VALID_API_KEY": "YOUR_API_KEY"
}
}
}
}
Available Tools
gmail_search_messages: Search for emails using Gmail search query syntax (e.g., "subject:Meeting newer_than:1d")gmail_get_message: Get the full content and details of a specific emailgmail_download_attachment: Download an attachment from a specific email
Security Note
Always keep your VALID_API_KEY secret and never commit it to version control. This key helps ensure that only authorized clients can access your Gmail through the Google Apps Script deployment.
Alternatives
Related Skills
Browse all skillsGoogle Workspace CLI for Gmail, Calendar, Drive, Contacts, Sheets, and Docs.
Manage Gmail - send, read, search emails, manage labels and drafts. Use when user wants to interact with their Gmail account for email operations.
Automate and control Unity Editor with 500+ commands, real-time WebSocket communication, and SQLite integration for efficient game development.
World-class data science skill for statistical modeling, experimentation, causal inference, and advanced analytics. Expertise in Python (NumPy, Pandas, Scikit-learn), R, SQL, statistical methods, A/B testing, time series, and business intelligence. Includes experiment design, feature engineering, model evaluation, and stakeholder communication. Use when designing experiments, building predictive models, performing causal analysis, or driving data-driven decisions.
A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill whenever asked to write some sort of internal communications (status reports, leadership updates, 3P updates, company newsletters, FAQs, incident reports, project updates, etc.).
Create professional research posters in LaTeX using beamerposter, tikzposter, or baposter. Support for conference presentations, academic posters, and scientific communication. Includes layout design, color schemes, multi-column formats, figure integration, and poster-specific best practices for visual communication.