
Gmail
Manage your emails effortlessly with a standardized interface for drafting, sending, retrieving, and organizing messages. Streamline your email workflow with complete Gmail API coverage, including label and thread management.
shinzo-labs
Tools
list_forwarding_addresses
Lists the forwarding addresses for the specified account
delete_send_as
Deletes the specified send-as alias
remove_delegate
Removes the specified delegate
get_send_as
Gets the specified send-as alias
list_send_as
Lists the send-as aliases for the specified account
get_delegate
Gets the specified delegate
list_delegates
Lists the delegates for the specified account
create_send_as
Creates a custom send-as alias
update_pop
Updates POP settings
get_thread
Get a specific thread by ID
create_draft
Create a draft email in Gmail. Note the mechanics of the raw parameter.
delete_draft
Delete a draft
get_draft
Get a specific draft by ID
list_drafts
List drafts in the user's mailbox
send_draft
Send an existing draft
update_draft
Replace a draft's content. Note the mechanics of the threadId and raw parameters.
create_label
Create a new label
delete_label
Delete a label
get_label
Get a specific label by ID
list_labels
List all labels in the user's mailbox
patch_label
Patch an existing label (partial update)
delete_forwarding_address
Deletes the specified forwarding address
update_label
Update an existing label
batch_delete_messages
Delete multiple messages
batch_modify_messages
Modify the labels on multiple messages
delete_message
Immediately and permanently delete a message
get_message
Get a specific message by ID with format options
list_messages
List messages in the user's mailbox with optional filtering
modify_message
Modify the labels on a message
update_vacation
Update vacation responder settings
send_message
Send an email message to specified recipients. Note the mechanics of the raw parameter.
trash_message
Move a message to the trash
untrash_message
Remove a message from the trash
get_attachment
Get a message attachment
delete_thread
Delete a thread
get_forwarding_address
Gets the specified forwarding address
list_threads
List threads in the user's mailbox
modify_thread
Modify the labels applied to a thread
trash_thread
Move a thread to the trash
untrash_thread
Remove a thread from the trash
get_auto_forwarding
Gets auto-forwarding settings
get_imap
Gets IMAP settings
get_language
Gets language settings
get_pop
Gets POP settings
get_vacation
Get vacation responder settings
update_auto_forwarding
Updates automatic forwarding settings
update_imap
Updates IMAP settings
update_language
Updates language settings
add_delegate
Adds a delegate to the specified account
create_filter
Creates a filter
delete_filter
Deletes a filter
get_filter
Gets a filter
list_filters
Lists the message filters of a Gmail user
create_forwarding_address
Creates a forwarding address
patch_send_as
Patches the specified send-as alias
update_send_as
Updates a send-as alias
verify_send_as
Sends a verification email to the specified send-as alias
delete_smime_info
Deletes the specified S/MIME config for the specified send-as alias
get_smime_info
Gets the specified S/MIME config for the specified send-as alias
insert_smime_info
Insert (upload) the given S/MIME config for the specified send-as alias
list_smime_info
Lists S/MIME configs for the specified send-as alias
set_default_smime_info
Sets the default S/MIME config for the specified send-as alias
get_profile
Get the current user's Gmail profile
watch_mailbox
Watch for changes to the user's mailbox
stop_mail_watch
Stop receiving push notifications for the given user mailbox
README
Gmail MCP
A Model Context Protocol (MCP) implementation for the Gmail API, providing a standardized interface for email management, sending, and retrieval.
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 your Google Cloud credentials
Installation
⚠️ <strong>NOTE:</strong> Due to the large number of endpoints available on this server, it is recommended that you install and setup Heimdall to limit the number of endpoints exposed to your client applications.
To use this MCP, you'll need to set up authentication with Gmail:
- Go to the Google Cloud Console
- Create a new project or select an existing one
- Enable the Gmail API for your project
- Go to Credentials and create an OAuth 2.0 Client ID
- Choose "Desktop app" as the application type (Warning: if you don't choose this type the server will not be able to parse the keys from your JSON file)
- Download the client credentials JSON file
- Save the downloaded credentials file to
~/.gmail-mcp/gcp-oauth.keys.json
NPX (Recommended)
Add the following to your MCP client config.json
(~/.heimdall/config.json
if using Heimdall):
{
"mcpServers": {
"gmail": {
"command": "npx",
"args": [
"@shinzolabs/gmail-mcp"
]
}
}
}
Manual Download
- Download the repo:
git clone https://github.com/shinzo-labs/gmail-mcp.git
- Install packages and build (inside cloned repo):
pnpm i && pnpm run build
- Add the following to your MCP client
config.json
(~/.heimdall/config.json
if using Heimdall):
{
"mcpServers": {
"gmail": {
"command": "node",
"args": [
"/path/to/gmail-mcp/dist/index.js"
]
}
}
}
Smithery
To install for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @shinzo-labs/gmail-mcp --client claude
Authentication
Automated (recommended)
This MCP provides an automated authentication flow:
-
First, acquire OAuth credentials and download the JSON file.
-
Rename the JSON file to
gcp-oauth.keys.json
and copy it to$HOME/.gmail-mcp/
, or wherever you've set it inMCP_CONFIG_DIR
. -
Run the authentication command:
# If using npx
npx @shinzolabs/gmail-mcp auth
# If in the project directory
pnpm i && pnpm run build && pnpm run auth
- A browser window will automatically open to the Google OAuth consent screen
- After granting access, you can close the browser window
- The tokens will be automatically saved to
$HOME/.gmail-mcp/credentials.json
The MCP will automatically:
- Manage token refresh
- Save credentials to disk
- Handle the OAuth callback
- Open the authentication URL in your default browser
Note: by default this server uses port 3000
to listen for the OAuth response. You can set AUTH_SERVER_PORT
to something else if you are running another service on 3000
.
You can customize the config location by setting MCP_CONFIG_DIR
before running the command (optional):
export MCP_CONFIG_DIR=/custom/path/to/directory/
Manual (suggested for Docker usage)
If you wish, you may also provide credentials directly through the environment variables:
export CLIENT_ID=your-id
export CLIENT_SECRET=your-secret
export REFRESH_TOKEN=your-refresh-token
Supported Endpoints
User Management
get_profile
: Get the current user's Gmail profilestop_mail_watch
: Stop receiving push notificationswatch_mailbox
: Set up push notifications for mailbox changes
Message Management
Managing Messages
list_messages
: List messages with optional filteringget_message
: Get a specific messageget_attachment
: Get a message attachmentmodify_message
: Modify message labelssend_message
: Send an email message to specified recipientsdelete_message
: Permanently delete a messagetrash_message
: Move message to trashuntrash_message
: Remove message from trashbatch_modify_messages
: Modify multiple messagesbatch_delete_messages
: Delete multiple messages
Label Management
list_labels
: List all labelsget_label
: Get a specific labelcreate_label
: Create a new labelupdate_label
: Update a labelpatch_label
: Partial update of a labeldelete_label
: Delete a label
Thread Management
list_threads
: List email threadsget_thread
: Get a specific threadmodify_thread
: Modify thread labelstrash_thread
: Move thread to trashuntrash_thread
: Remove thread from trashdelete_thread
: Delete a thread
Draft Management
list_drafts
: List drafts in the user's mailboxget_draft
: Get a specific draft by IDcreate_draft
: Create a draft email in Gmailupdate_draft
: Replace a draft's contentdelete_draft
: Delete a draftsend_draft
: Send an existing draft
Settings Management
Auto-Forwarding
get_auto_forwarding
: Get auto-forwarding settingsupdate_auto_forwarding
: Update auto-forwarding settings
IMAP Settings
get_imap
: Get IMAP settingsupdate_imap
: Update IMAP settings
POP Settings
get_pop
: Get POP settingsupdate_pop
: Update POP settings
Vacation Responder
get_vacation
: Get vacation responder settingsupdate_vacation
: Update vacation responder
Language Settings
get_language
: Get language settingsupdate_language
: Update language settings
Delegates
list_delegates
: List account delegatesget_delegate
: Get a specific delegateadd_delegate
: Add a delegateremove_delegate
: Remove a delegate
Filters
list_filters
: List email filtersget_filter
: Get a specific filtercreate_filter
: Create a new filterdelete_filter
: Delete a filter
Forwarding Addresses
list_forwarding_addresses
: List forwarding addressesget_forwarding_address
: Get a specific forwarding addresscreate_forwarding_address
: Create a forwarding addressdelete_forwarding_address
: Delete a forwarding address
Send-As Settings
list_send_as
: List send-as aliasesget_send_as
: Get a specific send-as aliascreate_send_as
: Create a send-as aliasupdate_send_as
: Update a send-as aliaspatch_send_as
: Partial update of a send-as aliasverify_send_as
: Send verification emaildelete_send_as
: Delete a send-as alias
S/MIME Settings
list_smime_info
: List S/MIME configurationsget_smime_info
: Get a specific S/MIME configinsert_smime_info
: Upload a new S/MIME configset_default_smime_info
: Set default S/MIME configdelete_smime_info
: Delete an S/MIME config
Contributing
Contributions are welcomed and encouraged. Contact austin@shinzolabs.com with any questions, comments or concerns.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
MCP Package Docs Server
Facilitates LLMs to efficiently access and fetch structured documentation for packages in Go, Python, and NPM, enhancing software development with multi-language support and performance optimization.
Claude Code MCP
An implementation of Claude Code as a Model Context Protocol server that enables using Claude's software engineering capabilities (code generation, editing, reviewing, and file operations) through the standardized MCP interface.
@kazuph/mcp-taskmanager
Model Context Protocol server for Task Management. This allows Claude Desktop (or any MCP client) to manage and execute tasks in a queue-based system.
Linear MCP Server
Enables interaction with Linear's API for managing issues, teams, and projects programmatically through the Model Context Protocol.
mermaid-mcp-server
A Model Context Protocol (MCP) server that converts Mermaid diagrams to PNG images.
Jira-Context-MCP
MCP server to provide Jira Tickets information to AI coding agents like Cursor

Linear MCP Server
A Model Context Protocol server that integrates with Linear's issue tracking system, allowing LLMs to create, update, search, and comment on Linear issues through natural language interactions.

Sequential Thinking MCP Server
This server facilitates structured problem-solving by breaking down complex issues into sequential steps, supporting revisions, and enabling multiple solution paths through full MCP integration.