Skip to main content
Glama
dmorrill

gmail-mcp-multi

by dmorrill

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-multi

Or run directly with npx:

npx gmail-mcp-multi

Quick Start

1. Set up Google Cloud OAuth

You'll need OAuth credentials from Google Cloud Console:

  1. Go to Google Cloud Console

  2. Create a new project (or use existing)

  3. Enable the Gmail API

  4. Create OAuth 2.0 credentials (Desktop app type)

  5. 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_accounts

List all configured accounts and auth status

authenticate

Add or re-authenticate an account

Email Operations

Tool

Description

search_emails

Search emails using Gmail query syntax

read_email

Get full content of an email by ID

send_email

Send a new email

draft_email

Create a draft

modify_email

Add/remove labels, mark read/unread

delete_email

Trash or permanently delete

batch_modify_emails

Bulk label operations

batch_delete_emails

Bulk delete

Label Management

Tool

Description

list_labels

Get all labels for an account

create_label

Create a new label

delete_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.json

Development

git clone https://github.com/dmorrill/gmail-mcp-multi.git
cd gmail-mcp-multi
npm install
npm run build
npm run dev

Contributing

Contributions welcome! Please see CONTRIBUTING.md for guidelines.

License

MIT

Available Tools

7 tools
authenticateA

Add or re-authenticate a Gmail account. Opens browser for OAuth flow.

ParametersJSON Schema
NameRequiredDescriptionDefault
aliasYesFriendly name for this account (e.g., 'work', 'personal')
emailNoEmail address for this account (used as login hint)

TDQS

A3.7/5.0
Behavior3/5

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.

Conciseness5/5

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.

Completeness3/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines3/5

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

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.9/5.0
Behavior3/5

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.

Conciseness5/5

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.

Completeness3/5

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.

Parameters4/5

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.

Purpose5/5

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.

Usage Guidelines3/5

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

ParametersJSON Schema
NameRequiredDescriptionDefault
accountYesAccount alias or email to use

TDQS

C2.9/5.0
Behavior2/5

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.

Conciseness4/5

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.

Completeness2/5

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.

Parameters3/5

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.

Purpose4/5

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.

Usage Guidelines2/5

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)

ParametersJSON Schema
NameRequiredDescriptionDefault
accountYesAccount alias or email to use
messageIdYesThe ID of the email message
addLabelIdsNoLabel IDs to add
removeLabelIdsNoLabel IDs to remove

TDQS

B3.4/5.0
Behavior2/5

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.

Conciseness5/5

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.

Completeness2/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines3/5

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

ParametersJSON Schema
NameRequiredDescriptionDefault
accountYesAccount alias or email to use
messageIdYesThe ID of the email message

TDQS

B3.2/5.0
Behavior2/5

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.

Conciseness5/5

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.

Completeness2/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines2/5

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

ParametersJSON Schema
NameRequiredDescriptionDefault
accountYesAccount alias or email to use
queryYesGmail search query (e.g., 'in:inbox is:unread')
maxResultsNoMaximum number of results (default: 10)

TDQS

B3.1/5.0
Behavior2/5

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.

Conciseness4/5

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.

Completeness2/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines2/5

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

ParametersJSON Schema
NameRequiredDescriptionDefault
accountYesAccount alias or email to use
toYesRecipient email addresses
subjectYesEmail subject
bodyYesEmail body (plain text)
ccNoCC recipients
bccNoBCC recipients

TDQS

C2.8/5.0
Behavior2/5

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.

Conciseness3/5

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.

Completeness2/5

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.

Parameters3/5

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.

Purpose4/5

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.

Usage Guidelines2/5

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.

  1. 7 tool updatesv0.1.0
    • First observedauthenticate
    • First observedlist_accounts
    • First observedlist_labels
    • First observedmodify_email
    • First observedread_email
    • First observedsearch_emails
    • First observedsend_email

TDQS

A3.5/5.0
Disambiguation5/5

Each tool has a distinct purpose: authentication, account listing, label management, email reading, searching, sending, and label modification. No overlap or ambiguity.

Naming Consistency5/5

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.

Tool Count5/5

7 tools is appropriate for a Gmail server, covering authentication, account management, label operations, and core email actions without being excessive or insufficient.

Completeness3/5

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

ActivityInactive
ResponsivenessSyncing

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

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    An MCP server that provides read, label, and draft access to multiple Gmail accounts from a single server, never sending email.
    86
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    Enables interacting with multiple Gmail accounts through a single MCP server, supporting search, labels, drafts, and thread management with per-account OAuth.
    -
  • F
    license
    Not graded
    quality
    C
    maintenance
    Multi-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.
    -
  • F
    license
    Not graded
    quality
    C
    maintenance
    Multi-account Gmail MCP server for reading threads, managing labels, and creating drafts across multiple Gmail accounts.
    -

Latest Blog Posts

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