gmail-mcp-server
Allows reading unread emails and creating draft replies in Gmail.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Gmail MCP Server
An MCP server that allows Claude Desktop to read unread emails and create draft replies in Gmail.
Features
get_unread_emails: Fetches unread emails with sender, subject, body, message ID, and thread ID
create_draft_reply: Creates properly threaded draft replies
Related MCP server: MCP Gmail Server
Requirements
Python 3.14+
Gmail account
Google Cloud Console access
Setup
1. Install Dependencies
# Create virtual environment
python3 -m venv venv
# Activate it
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt2. Gmail API Configuration
Go to Google Cloud Console
Go to "APIs and services" → "Credentials" → "Create Credentials" → "OAuth client ID"
Choose "Desktop app" as application type
Download the credentials and save as
credentials.jsonin the root directoryAdd test user with your Gmail address under "Audience"
3. First Run - Authentication
python server.pyThis will open a browser for OAuth authentication. token.json will be created in the root directory.
4. Configure Claude Desktop
Edit your Claude Desktop config file:
Mac: ~/Library/Application Support/Claude/claude_desktop_config.json
Add:
{
"mcpServers": {
"gmail": {
"command": "/absolute/path/to/python",
"args": ["/absolute/path/to/server.py"]
}
}
}This configuration tells Claude Desktop how to connect to your Gmail MCP server:
mcpServers - Root object containing all MCP server configurations
gmail - Unique name for this server (you can choose any name)
command - Path to the Python executable that will run the server
args - Arguments passed to the command (the server script path)
What you need to replace:
/absolute/path/to/python- Full path to your Python interpreter/absolute/path/to/server.py- Full path to your server.py file
Restart Claude Desktop.
OAuth Scopes
gmail.readonly- Read emailsgmail.compose- Create drafts
Project Structure
server.py- MCP server implementationgmail_client.py- Gmail API wrappercredentials.json- OAuth credentials (not in git)token.json- OAuth token (auto-generated, not in git)
Troubleshooting
Authentication fails: Delete
token.jsonand runpython server.pyagainClaude can't connect: Check the absolute path in config file
Usage Examples
Get unread emails - Claude
Unread emails - Gmail
Create draft email - Claude
Draft email - Gmail
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Connect any mailbox to Claude, ChatGPT & AI: read, send, reply, schedule & search emails.
Connect any IMAP/SMTP mailbox to Claude & ChatGPT: search, read, sort, draft. Sends only with OK.
Your mailboxes in ChatGPT and Claude: Gmail, iCloud, Fastmail, any IMAP. Passwords stay yours.
Manage Gmail end-to-end: search, read, send, draft, label, and organize threads. Automate workflow…
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceIntegrates Gmail with Claude Desktop to fetch unread emails, generate AI-powered draft replies with customizable tone and style guides, and manage your inbox through natural language commands.MIT
- FlicenseBqualityDmaintenanceEnables users to read unread emails and create drafts in Gmail via the Model Context Protocol. It leverages Google OAuth 2.0 for secure authentication and integrates with tools like Claude Desktop for natural language email management.2-
- AlicenseNot gradedqualityDmaintenanceEnables AI-powered inbox management with natural language commands through Claude Desktop. Supports sending, reading, searching, organizing emails, and managing labels using Gmail API with automatic authentication.8MIT
- FlicenseNot gradedqualityDmaintenanceEnables Claude to read unread emails and create draft replies in Gmail with proper threading.-