gmail-mcp-multi
Allows managing multiple Gmail accounts, including searching, reading, sending, labeling, and deleting emails, with support for account aliases and batch operations.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@gmail-mcp-multisearch for unread emails in my work account"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
gmail-mcp-multi
A Gmail MCP server with native multi-account support. Manage multiple Gmail accounts from a single server instance.
Unlike other Gmail MCPs that require running separate server instances per account, this one lets you specify which account to use on each tool call—making it easy to manage personal and work inboxes from Claude Code, Cursor, or any MCP client.
Features
Multi-account support - Single server instance, unlimited Gmail accounts
Account aliases - Use friendly names like "work" or "personal" instead of email addresses
Full Gmail API - Search, read, send, label, and manage emails
Batch operations - Bulk modify or delete emails efficiently
Auto token refresh - Handles OAuth token refresh automatically
Related MCP server: gmail-mcp
Installation
npm install -g gmail-mcp-multiOr run directly with npx:
npx gmail-mcp-multiQuick Start
1. Set up Google Cloud OAuth
You'll need OAuth credentials from Google Cloud Console:
Go to Google Cloud Console
Create a new project (or use existing)
Enable the Gmail API
Create OAuth 2.0 credentials (Desktop app type)
Download the credentials JSON
2. Configure the MCP
Create ~/.gmail-mcp/oauth-keys.json with your OAuth credentials.
3. Add to your MCP client
Claude Code (~/.claude/settings.json):
{
"mcpServers": {
"gmail": {
"command": "npx",
"args": ["gmail-mcp-multi"]
}
}
}4. Authenticate accounts
Once the MCP is running, use the authenticate tool:
authenticate({ alias: "work", email: "you@company.com" })
authenticate({ alias: "personal", email: "you@gmail.com" })5. Use it!
search_emails({ account: "work", query: "in:inbox is:unread" })
search_emails({ account: "personal", query: "from:mom" })Tools
All tools that interact with Gmail require an account parameter (alias or email).
Account Management
Tool | Description |
| List all configured accounts and auth status |
| Add or re-authenticate an account |
Email Operations
Tool | Description |
| Search emails using Gmail query syntax |
| Get full content of an email by ID |
| Send a new email |
| Create a draft |
| Add/remove labels, mark read/unread |
| Trash or permanently delete |
| Bulk label operations |
| Bulk delete |
Label Management
Tool | Description |
| Get all labels for an account |
| Create a new label |
| Delete a label |
Configuration
Credentials are stored in ~/.gmail-mcp/:
~/.gmail-mcp/
├── config.json # Account aliases and settings
├── oauth-keys.json # Your Google OAuth app credentials
└── accounts/
├── work/
│ └── credentials.json
└── personal/
└── credentials.jsonDevelopment
git clone https://github.com/dmorrill/gmail-mcp-multi.git
cd gmail-mcp-multi
npm install
npm run build
npm run devContributing
Contributions welcome! Please see CONTRIBUTING.md for guidelines.
License
MIT
Available Tools
7 toolsauthenticateA
Add or re-authenticate a Gmail account. Opens browser for OAuth flow.
| Name | Required | Description | Default |
|---|---|---|---|
| alias | Yes | Friendly name for this account (e.g., 'work', 'personal') | |
| No | Email address for this account (used as login hint) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries full burden. It mentions 'Opens browser for OAuth flow,' which is a key behavioral trait. However, it omits details such as whether the call blocks, returns anything, or stores credentials. Adds value but incomplete.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two short sentences, no redundant wording, front-loaded with purpose. Highly concise and efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No output schema and no return value description. The description does not explain what happens after authentication (e.g., token stored) or that the browser interaction may be blocking. Sufficient for basic understanding but leaves gaps for agent usage.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with clear parameter descriptions. The tool description does not add further meaning beyond the schema (e.g., explaining how 'email' is used as a login hint). Baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states the tool adds or re-authenticates a Gmail account, distinguishing it from siblings focused on email operations (list, read, send, etc.). Verb+resource is specific.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit when-to-use or when-not-to-use information. While it is the only authentication tool among siblings, the description does not guide usage (e.g., 'Use before other email tools if account not yet authenticated'). Adequate but minimal.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_accountsA
List all configured Gmail accounts and their authentication status
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. It states a read-only operation (list), but does not disclose potential side effects, authorization requirements, or performance implications, which is adequate but not thorough for a simple tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence that front-loads the key action and resource, with no redundant words. It earns its place efficiently.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (no parameters, no output schema, no annotations), the description is minimal but sufficient. However, it lacks details about ordering, filtering, or interpretation of authentication status, leaving some context gaps for the agent.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, so the schema coverage is effectively 100%. The description adds meaningful context by specifying that the tool lists configured accounts and their authentication status, which goes beyond the empty schema. Baseline for zero parameters is 4.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb 'List' to indicate retrieval, identifies the resource 'configured Gmail accounts', and adds the detail 'authentication status', which clearly distinguishes it from sibling tools like list_labels or authenticate.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for checking accounts and their authentication status, but does not provide explicit guidance on when to use this tool versus alternatives or any prerequisites, leaving the agent to infer context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_labelsC
Get all labels for an account
| Name | Required | Description | Default |
|---|---|---|---|
| account | Yes | Account alias or email to use |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, and the description only states 'Get all labels', implying a read operation. It does not disclose any behavioral traits such as whether authentication is required, rate limits, or potential side effects. For a tool with no annotations, more transparency is needed.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence with no wasted words. It is appropriately concise for a simple tool, though it lacks any additional structure or examples.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema, no annotations, and only one parameter, the description should provide more context about authentication requirements or the nature of labels. It is incomplete for an agent to use confidently without inferring additional steps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% for the single parameter 'account', which already provides its meaning. The description adds 'for an account' but does not add additional meaning or context beyond the schema. Baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description 'Get all labels for an account' clearly states the action (get) and resource (labels) with scope (account). It distinguishes from sibling tools like list_accounts, which lists accounts, not labels, so the purpose is clear and non-confusing.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool vs alternatives. Sibling tools like authenticate, read_email, etc., have different purposes, but there is no explicit mention of prerequisites (like needing to authenticate first) or when not to use it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
modify_emailB
Modify email labels (add/remove labels, mark read/unread)
| Name | Required | Description | Default |
|---|---|---|---|
| account | Yes | Account alias or email to use | |
| messageId | Yes | The ID of the email message | |
| addLabelIds | No | Label IDs to add | |
| removeLabelIds | No | Label IDs to remove |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must disclose behavioral traits. It mentions modification actions but does not cover side effects, authentication requirements, rate limits, or whether the operation is destructive. This is insufficient for a mutation tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence with no filler. Every word is informative and there is no redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With four parameters, no output schema, and no annotations, the description is too brief. It does not explain what the tool returns, how labels relate to account configuration, or prerequisites for using label IDs. More context is needed for correct invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so baseline is 3. The description adds minimal extra meaning beyond the schema; it mentions 'mark read/unread' but there is no corresponding parameter. The parameter semantics are adequately covered by the schema itself.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool modifies email labels, specifying actions like add/remove labels and mark read/unread. It distinguishes from siblings like send_email, read_email, and search_emails, which have different purposes.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage when label changes or read status updates are needed, but it does not explicitly state when to use this tool over siblings, nor does it provide exclusions or alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
read_emailB
Get the full content of an email by ID
| Name | Required | Description | Default |
|---|---|---|---|
| account | Yes | Account alias or email to use | |
| messageId | Yes | The ID of the email message |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations exist, and the description does not disclose behavioral traits such as side effects (expected to be read-only), what 'full content' includes (attachments, headers), or any limitations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, concise sentence that is front-loaded with the most important information. No unnecessary words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the lack of annotations and output schema, the description is too minimal. It does not explain return format, authentication needs, or any limitations.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, so the description adds no additional meaning beyond what the schema already provides. Baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly identifies the action ('Get'), the resource ('full content of an email'), and the identifier ('by ID'). It distinguishes from sibling tools like search_emails (searching) and list_accounts (listing).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives. There is no mention of prerequisites, context, or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_emailsB
Search for emails using Gmail query syntax
| Name | Required | Description | Default |
|---|---|---|---|
| account | Yes | Account alias or email to use | |
| query | Yes | Gmail search query (e.g., 'in:inbox is:unread') | |
| maxResults | No | Maximum number of results (default: 10) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, and the description only states basic action. It does not disclose whether the tool is read-only, what it returns (full emails vs. metadata), or any side effects.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, clear sentence with no redundancy. It could be slightly more detailed but remains efficient and front-loaded.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No output schema exists, and the description does not mention return format, pagination, or the effect of maxResults. Leaves many user questions unanswered despite minimal complexity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% with detailed parameter descriptions. The description adds no extra meaning beyond what is already in the schema, maintaining the baseline of 3.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb 'Search' and resource 'emails', clearly stating the Gmail query syntax. It distinguishes from siblings like read_email (specific email) and send_email.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool vs alternatives. Lacks any 'when-to-use' or 'when-not-to-use' context. Sibling tools are listed but not compared.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
send_emailC
Send a new email
| Name | Required | Description | Default |
|---|---|---|---|
| account | Yes | Account alias or email to use | |
| to | Yes | Recipient email addresses | |
| subject | Yes | Email subject | |
| body | Yes | Email body (plain text) | |
| cc | No | CC recipients | |
| bcc | No | BCC recipients |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Despite having no annotations, the description fails to disclose any behavioral traits such as authentication requirements, rate limits, or side effects. The agent learns nothing beyond the basic action.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single short sentence, which is concise but arguably too minimal for a tool with 6 parameters. It front-loads the action but omits useful context.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity (6 parameters, no output schema, no annotations), the description lacks completeness. It does not explain the result (e.g., success/failure), side effects, or return format.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage, so the schema itself documents parameters. The description adds no further semantic context beyond the schema, meeting the baseline.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Send' and the resource 'a new email', distinguishing it from siblings like 'modify_email' and 'read_email'. It is specific enough to indicate the action, though it lacks scope details.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance on when to use this tool versus alternatives like 'modify_email' (for altering existing emails) or 'read_email'. The description does not mention prerequisites or limitations.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
7 tool updates
v0.1.0- First observed
authenticate - First observed
list_accounts - First observed
list_labels - First observed
modify_email - First observed
read_email - First observed
search_emails - First observed
send_email
TDQS
Each tool has a distinct purpose: authentication, account listing, label management, email reading, searching, sending, and label modification. No overlap or ambiguity.
All tool names follow a consistent verb_noun pattern with snake_case (e.g., list_accounts, modify_email). The only exception is 'authenticate' which lacks an object but is still clear.
7 tools is appropriate for a Gmail server, covering authentication, account management, label operations, and core email actions without being excessive or insufficient.
Core operations like send, read, search, and modify labels are present, but missing label creation/deletion and email deletion/trash are notable gaps for typical Gmail workflows.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
A MCP server for Gmail that lets you search, read, and draft emails and replies.
An MCP server that provides email capabilities, hosted on Alpic platform
An MCP server that provides email capabilities, hosted on Alpic platform
An MCP server that provides email capabilities, hosted on Alpic platform
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceAn MCP server that provides read, label, and draft access to multiple Gmail accounts from a single server, never sending email.86MIT
- FlicenseNot gradedqualityCmaintenanceEnables interacting with multiple Gmail accounts through a single MCP server, supporting search, labels, drafts, and thread management with per-account OAuth.-
- FlicenseNot gradedqualityCmaintenanceMulti-user Gmail MCP server that enables sending/receiving emails, managing accounts, and searching mail via SMTP/IMAP with per-user isolation and encrypted app passwords.-
- FlicenseNot gradedqualityCmaintenanceMulti-account Gmail MCP server for reading threads, managing labels, and creating drafts across multiple Gmail accounts.-
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/dmorrill/gmail-mcp-multi'
If you have feedback or need assistance with the MCP directory API, please join our Discord server