Manage Gmail end-to-end: search, read, send, draft, label, and organize threads. Automate workflow…
This MCP server manages Gmail end-to-end, covering search, read, send, draft, label, and thread organization. It is designed to automate Gmail workflow tasks using model context protocol tooling, based on the repository’s provided server name, description, and excerpt content.
🛠️ Key Features
Search Gmail
Read messages
Send messages
Create drafts
Apply labels
Organize threads
🚀 Use Cases
Automate Gmail search and retrieval
Generate and manage email drafts
Apply labels to categorize conversations
Manage outbound email sending workflows
Maintain organized thread views
⚡ Developer Benefits
Consolidates common Gmail operations (search/read/send/draft/label/thread organization) under one server
⚠️ Limitations
The provided source data does not specify authentication details, supported Gmail scopes, tool names, or tool counts.
A Model Context Protocol (MCP) server implementation for the Gmail API, providing a standardized interface for email management, sending, and retrieval.
image
Features
Complete Gmail API coverage including messages, threads, labels, drafts, and settings
Support for sending, drafting, and managing emails
Label management with customizable colors and visibility settings
Thread operations for conversation management
Settings management including vacation responder, IMAP/POP, and language settings
History tracking for mailbox changes
Secure OAuth2 authentication using Google Cloud credentials
Prerequisites
Dependencies
For simplest installation, install Node.js 18+. If you would like to build locally, you will also need to install pnpm.
Google Workspace Setup
To run this MCP server, you will need to set up a Google API Client for your organization, with each user running a script to retrieve their own OAuth refresh token.
Go to Credentials and create an OAuth 2.0 Client ID. Choose "Desktop app" for the client type.
Download and save the OAuth keys JSON as ~/.gmail-mcp/gcp-oauth.keys.json. ⚠️ NOTE: to create ~/.gmail-mcp/ through MacOS's Finder app you need to enable hidden files first.
(Optional) For remote server installation (ex. using Smithery CLI), note the CLIENT_ID and CLIENT_SECRET from this file.
Client OAuth (once per user)
Have the user copy ~/.gmail-mcp/gcp-oauth.keys.json to their computer at the same path.
Run npx @shinzolabs/gmail-mcp auth.
A browser window will open where the user may select a profile, review the requested scopes, and approve.
(Optional) For remote server installation, note the file path mentioned in the success message (~/.gmail-mcp/credentials.json by default). The user's REFRESH_TOKEN will be found here.
Client Configuration
There are several options to configure your MCP client with the server. For hosted/remote server setup, use Smithery's CLI with a Smithery API Key. For local installation, use npx or build from source. Each of these options is explained below.
Smithery Remote Server (Recommended)
To add a remote server to your MCP client config.json, run the following command from Smithery CLI:
list_forwarding_addresses: List forwarding addresses
get_forwarding_address: Get a specific forwarding address
create_forwarding_address: Create a forwarding address
delete_forwarding_address: Delete a forwarding address
Send-As Settings
list_send_as: List send-as aliases
get_send_as: Get a specific send-as alias
create_send_as: Create a send-as alias
update_send_as: Update a send-as alias
patch_send_as: Partial update of a send-as alias
verify_send_as: Send verification email
delete_send_as: Delete a send-as alias
S/MIME Settings
list_smime_info: List S/MIME configurations
get_smime_info: Get a specific S/MIME config
insert_smime_info: Upload a new S/MIME config
set_default_smime_info: Set default S/MIME config
delete_smime_info: Delete an S/MIME config
Contributing
Contributions are welcomed and encouraged! Please read CONTRIBUTING.md for guidelines on issues, contributions, and contact information.
Data Collection and Privacy
Shinzo Labs collects limited anonymous telemetry from this server to help improve our products and services. No personally identifiable information is collected as part of this process. Please review the Privacy Policy for more details on the types of data collected and how to opt-out of this telemetry.
License
MIT
Install
Remote endpoint
Streamable HTTP
Hosted server - connect over the network, no local install.