send_emailLABSCO SUMMARY
On a personal Gmail account, expect to re-authenticate weekly.
The refresh-token lifetime is set by the OAuth consent screen, not by this project: Internal on a Workspace account never expires, External in Testing mode expires after 7 days. Recovery is deleting token.json and re-running the auth command. Most of the defences ship off and are switched on in the config file — the exception is the attachment denylist, which is active by default and refuses to attach ~/.ssh/, ~/.aws/, id_rsa, .env or token.json.
What it is
A comprehensive Gmail server — send, reply, forward, drafts, search, read, attachments, trash, labels, filters, signature and vacation responder — built with the assumption that the thing calling it might be compromised.
What you get
- Send and reply:
send_email,reply_to_message,forward_message, pluspreview_send_emailandconfirm_send_emailfor a two-step flow - Drafts:
create_draft,list_drafts,update_draft,send_draft,delete_draft - Read:
get_profile,get_message,search_threads,get_thread, withget_message_attachmentsanddownload_attachment - Organise: labels (
create_label,label_message,label_threadand their inverses), filters (list_filters,create_filter,delete_filter), and trash and untrash for both messages and threads - Settings:
get_signature/update_signatureandget_vacation_responder/set_vacation_responder - A tamper-evident audit log, on by default: every write, send, modify and download appends a JSON line chained by SHA-256, with rotation, startup verification and an
mcp-gmail-manager-verify-logCLI
Requirements
The PyPI package mcp-gmail-manager, version 0.3.5, installed with pipx and registered as claude mcp add gmail-manager -- mcp-gmail-manager. Python 3.10 or higher. You supply a Google Cloud project with the Gmail API enabled and a Desktop-type OAuth client; save the downloaded JSON as credentials.json in the config directory and run mcp-gmail-manager-auth, which binds localhost:8765 and prints an authorisation URL — on a headless host, forward that port over SSH first. Scopes requested are gmail.modify and gmail.settings.basic only. GMAIL_MCP_CONFIG_DIR, GMAIL_MCP_CREDENTIALS and GMAIL_MCP_TOKEN override the paths.
Setup effort
One command plus credentials — pipx install mcp-gmail-manager, then supply credentials
USE CASES
Letting an agent send mail you can prove it sent
Every send appends a hash-chained line to the audit log, and the bundled CLI verifies the chain has not been edited.
Stopping a compromised model from mailing a stranger
Enable the recipient allowlist so outbound operations are checked against your domains and addresses first.
Requiring a human beat before anything leaves
Turn on send confirmation: direct sending is disabled and every message goes preview first, then confirm by id.
Cleaning up an inbox with labels and filters
Search threads, apply labels in bulk and create the filter that keeps it that way.
Running personal and work accounts side by side
Register the server once per account with its own config directory, so credentials, tokens and logs stay separate.
35 tools
Listed in project docs. Your client may show a different list.
preview_send_emailconfirm_send_emailreply_to_messageforward_messagecreate_draftlist_draftssend_draftupdate_draftdelete_draftget_profileget_messagesearch_threadsget_threadget_message_attachmentsdownload_attachmenttrash_messageuntrash_messagetrash_threaduntrash_threadlist_labelscreate_labelupdate_labeldelete_labellabel_messageunlabel_messagelabel_threadunlabel_threadlist_filterscreate_filterdelete_filterget_signatureupdate_signatureget_vacation_responderset_vacation_responderBEFORE YOU INSTALL
What to know first
Tools you get
35 tools named in the project's documentation.
Requires
- pipx on PATH
- Python ≥ 3.10
Where it runs
The documented client runs the server on your machine.
INSTALLATION
Connect your client
Server setup
pipx install mcp-gmail-managerMCP Clients
Claude Code
claude mcp add gmail-manager -- mcp-gmail-manager