gmail-mcp-multi-account
Provides tools for working with two personal Gmail accounts, including searching and reading emails, creating drafts with attachments and threaded replies, listing drafts, and sending drafts when explicitly requested.
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 (multi-account)
A small Model Context Protocol server that lets an AI assistant work with two personal Gmail accounts: search and read mail, create drafts (with attachments, threaded replies), list drafts, and send a draft on request.
Built for a job search: the assistant drafts tailored application emails with the right resume attached, and the human reviews and sends (or schedules) them.
Tools
Tool | What it does |
| Shows which address each account ( |
| Gmail search syntax, per account |
| Headers, plain-text body, attachment names |
| Draft with to/cc/bcc, attachments (local paths), optional reply threading. Nothing is sent. |
| Drafts in an account |
| Sends a draft. Intended only when the user explicitly asks. |
Related MCP server: gmail-mcp
Safety design
Least privilege: scopes are
gmail.readonly+gmail.compose. No delete, no label changes, no settings.Drafts first: the assistant creates drafts; the user reviews them in Gmail. Sending is a separate, explicit step.
Blocked domains: mailboxes and recipients in blocked domains (for example a work domain) are refused in code, both when signing in and when building or sending a message. Configure with
GMAIL_MCP_BLOCKED_DOMAINS="@work.com"or a git-ignoredblocked_domains.txt.Untrusted content: email bodies are returned as data; tool descriptions tell the model never to treat them as instructions.
Attachment limits: files are checked to exist and kept under ~20 MB per message.
Secrets stay local: OAuth client and tokens are git-ignored.
Setup
In Google Cloud Console: create a project, enable the Gmail API, configure the OAuth consent screen (External, Testing) and add both Gmail addresses as test users.
Create an OAuth client of type Desktop app, download the JSON and save it next to the script as
credentials.json.Install and sign in each account:
pip install -r requirements.txt
python gmail_mcp.py --login personal # pick the first Google account in the browser
python gmail_mcp.py --login second # pick the second one
python gmail_mcp.py --whoamiRegister with Claude Code (or any MCP client):
claude mcp add gmail-jobhunt -s user -- python /path/to/gmail_mcp.pyWhile the consent screen is in Testing, Google expires refresh tokens after 7 days; re-run --login when that happens.
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
Give AI agents their own email inboxes: list, read and send mail via scoped, revocable OAuth grants.
Multiple Gmail accounts, editable Google Sheets & Docs for AI agents. Deny-by-default access rules.
Search and triage all your mailboxes; draft replies and campaigns; send only as you allow.
Governed email for AI agents: a sandbox inbox to read and send from, human approval to go external.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with Gmail through OAuth2 authentication, allowing users to list, search, read emails, and create drafts with a safety-first design that prevents accidental sends by default.MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to read Gmail and create drafts securely with read-only access and query whitelisting.MIT
- AlicenseNot gradedqualityCmaintenanceEnables safe, multi-account Gmail and Microsoft 365 operations with explicit aliases, including searching, reading, drafting, archiving, labels/categories, and human-reviewed sending via a localhost approval window.MIT
- AlicenseNot gradedqualityCmaintenanceEnables an AI assistant to search and read multiple Hotmail/Outlook and Gmail accounts plus Google Drive and Calendar, and to create drafts, calendar events, and files without sending email. It supports local and remote operation with owner-only authentication and audit logging.MIT