gmail-mcp-server
Allows interaction with multiple Gmail accounts, providing tools for searching threads, reading messages, managing labels and drafts, and sending emails.
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-serverlist my connected Gmail accounts"
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-server
A local MCP (Model Context Protocol) server that connects multiple Gmail accounts
to Claude Desktop. Unlike Anthropic's built-in Gmail connector (which only supports one
account), every tool call here takes an account parameter so Claude can work across
several mailboxes in the same conversation.
Runs entirely on your own machine — no cloud hosting, no data leaves your computer except direct calls to the Gmail API over HTTPS.
Works on macOS and Windows.
Tools provided
list_accounts— list connected Gmail accountssearch_threads,get_thread,get_message— read-only search/readlist_labels,create_label,label_message,label_thread,unlabel_message,unlabel_threadcreate_draft,list_drafts— safe, does not send anythingsend_email— irreversible, sends immediately. The tool description instructs Claude to only use this after you've explicitly confirmed the recipients/subject/body, and it requires aconfirmed: truefield. Review what Claude is about to send before approving the tool call.
Related MCP server: gmail-mcp-server
One-time setup
1. Create a Google Cloud OAuth client (do this once, shared by all accounts/teammates)
Go to the Google Cloud Console and create a new project (or use an existing one).
APIs & Services > Library — search for and enable the Gmail API.
APIs & Services > OAuth consent screen (called Audience in newer Console layouts):
User type / Audience: External (if your Google Cloud project belongs to a Google Workspace org, it may default to Internal, which blocks personal @gmail.com accounts with
Error 403: org_internal— switch it to External).Publishing status: Production — do not leave it in Testing. Testing-status unverified apps have a Google policy quirk where refresh tokens expire after 7 days, which would silently break every connected account weekly. Production status (even without going through Google's verification review) doesn't have that limit.
Tradeoff: since the app won't be verified by Google, everyone who runs
npm run add-accountwill see a "Google hasn't verified this app" warning during sign-in. Click Advanced > Go to <project name> (unsafe) to proceed — this is expected and safe since it's your own app talking to your own Google account.
APIs & Services > Credentials > Create Credentials > OAuth client ID:
Application type: Desktop app
Note the generated Client ID and Client Secret — you'll enter these in step 3 below.
Share the Client ID/Secret with your teammate out-of-band (password manager, not Slack/email in plaintext, and never commit them to git). Both of you use the same client ID/secret; each person still does their own separate Google sign-in per account.
2. Install and build
Requires Node.js 18 or later.
git clone git@github.com:m-ishit/gmail-mcp-server.git
cd gmail-mcp-server
npm install
npm run build3. Configure the OAuth client credentials
npm run setupPaste in the Client ID and Client Secret from step 1. This writes them to a local config file outside the repo (see Where things are stored below) — never committed to git.
4. Connect your Gmail account(s)
npm run add-accountThis opens your browser to Google's consent screen. Sign in and approve access. Repeat this command once for each Gmail address you want to connect (personal, work, etc.).
Run npm run add-account again at any time to add another account or to re-authorize one
whose access was revoked.
5. Register the server in Claude Desktop
Edit your claude_desktop_config.json:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
Add (merge with any existing mcpServers entries):
macOS:
{
"mcpServers": {
"gmail": {
"command": "node",
"args": ["/absolute/path/to/gmail-mcp-server/dist/src/index.js"]
}
}
}Windows:
{
"mcpServers": {
"gmail": {
"command": "node",
"args": ["C:/absolute/path/to/gmail-mcp-server/dist/src/index.js"]
}
}
}Use the absolute path to your clone of this repo. Forward slashes work fine in these args on Windows too.
Fully quit and reopen Claude Desktop (not just close the window) so it picks up the new server.
6. Try it
In a Claude Desktop conversation:
"List my connected Gmail accounts"
"Search my alice@gmail.com inbox for unread emails from the last week"
For a second machine / teammate (e.g. Windows)
Repeat steps 2–6 above on their machine:
Same Client ID/Secret from step 1 (shared with them securely).
They run
npm run add-accountfor their own Gmail addresses — this creates their own local tokens, separate from yours.They edit their own
claude_desktop_config.jsonwith their own path todist/src/index.js.
No account credentials or tokens are ever shared between machines — only the OAuth client ID/secret (which identifies the application, not any individual user).
Where things are stored
All secrets live outside this repo, under your OS's application-data directory:
macOS:
~/Library/Application Support/gmail-mcp-server/Windows:
%APPDATA%\gmail-mcp-server\Linux:
$XDG_CONFIG_HOME/gmail-mcp-server/(or~/.config/gmail-mcp-server/)
Two files:
config.json— your OAuth client ID/secretaccounts.json— one refresh token per connected Gmail address (never the access token, which is short-lived and re-derived automatically on each call)
On macOS/Linux these files are written with chmod 600 (owner read/write only). On
Windows, protection instead relies on the file living under your own Windows user profile
(%APPDATA%), which other local user accounts can't read by default — this is a different
protection model than POSIX permissions, not a strict equivalent.
Never commit dist/, node_modules/, or any copy of these config files to git.
Security notes
Requested Gmail scopes are
gmail.modify(read/search/labels/drafts) andgmail.send— not the broader full-mailbox-access scope, and never permanent-delete access.Tokens are never printed to logs; the logger redacts token-shaped fields and only ever writes to stderr (stdout is reserved for the MCP protocol channel).
send_emailis irreversible. Read its tool description in the tools list, and always check the recipients/subject/body Claude shows you before approving that specific tool call.If you ever suspect a token has leaked, revoke access at myaccount.google.com/permissions and run
npm run add-accountagain to re-authorize.
Troubleshooting
"No OAuth client credentials found" — run
npm run setupfirst."Account is not connected to this server" — run
npm run add-accountfor that address.Google didn't return a refresh token — go to myaccount.google.com/permissions, remove this app's access for that account, and run
npm run add-accountagain (the consent screen forces re-issuing a refresh token).Tool calls fail with a 401/403 — the account's access may have been revoked; reconnect it with
npm run add-account.Use
npm run inspectto open the MCP Inspector and manually exercise each tool without needing Claude Desktop running.
Contributing
Issues and pull requests are welcome. This is a small, focused tool — please open an issue to discuss significant changes before submitting a large PR.
If you fork this to run your own instance, provision your own Google Cloud OAuth client rather than reusing anyone else's (see One-time setup above) — client secrets for Desktop-app OAuth clients aren't meant to be shared across unrelated users/orgs.
License
Available Tools
13 toolscreate_draftCreate a Gmail draftA
Create a draft email in the account's Drafts folder. This does NOT send anything — it's safe to call freely, including when you're not fully sure the user wants to send yet. The user reviews and sends the draft themselves from Gmail.
| Name | Required | Description | Default |
|---|---|---|---|
| cc | No | ||
| to | Yes | ||
| bcc | No | ||
| account | Yes | The Gmail address to operate on. Must be one of the accounts returned by list_accounts. If you don't know which account to use, call list_accounts first and ask the user if ambiguous. | |
| subject | Yes | ||
| bodyHtml | No | Optional HTML body, sent alongside the plain-text body. | |
| bodyText | Yes | Plain-text body. | |
| threadId | No | Set to draft a reply within an existing thread. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description adds value beyond annotations by explaining the draft stays in Drafts folder, is safe to call freely, and requires user review. Annotations lack details, so the description carries the burden well.
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 lean sentences front-load the core purpose and safety. No wasted words; every sentence serves a clear role.
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?
While the description covers purpose and safety, it omits parameter guidance and return value info. For a tool with no output schema, more detail on parameter semantics would improve completeness.
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 50%, meaning half the parameters lack descriptions. The tool description does not add any parameter-specific details (e.g., no explanation of 'threadId' or 'cc/bcc' format), leaving the agent with gaps.
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 it creates a draft in the Drafts folder and explicitly distinguishes from sending by stating 'This does NOT send anything'. The verb 'create' and resource 'draft' are specific, and it contrasts with sibling tool '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?
It gives explicit context for when to use ('when not fully sure the user wants to send yet') and implies safety. However, it does not directly compare to 'send_email' or state 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.
create_labelCreate a Gmail labelA
Create a new Gmail label. Fails with a clear message if a label with that exact name already exists.
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | The label name to create, e.g. 'Receipts/2026'. | |
| account | Yes | The Gmail address to operate on. Must be one of the accounts returned by list_accounts. If you don't know which account to use, call list_accounts first and ask the user if ambiguous. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations are neutral (readOnlyHint false, destructiveHint false), so the description adds value by disclosing that the tool fails with a clear message if the label already exists. However, it does not describe the return value or any other side effects, which is a minor gap.
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 two sentences, front-loaded with the core purpose, and contains no superfluous information. Every sentence is valuable and concise.
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?
For a simple creation tool with no output schema, the description covers the primary action and an important failure case. It could be slightly improved by mentioning what the tool returns (e.g., the created label), but overall it is complete enough for most use contexts.
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%, and the schema already provides detailed descriptions for both parameters (e.g., name example, account format and usage instruction). The tool description adds no additional parameter insights, so it meets but does not exceed expectations.
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 'Create a new Gmail label,' providing a specific verb and resource. It also distinguishes behavior by noting failure on duplicate names, which differentiates it from other label-related tools like list_labels.
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 does not explicitly state when to use this tool versus alternatives like label_message or list_labels. It implies usage for creating labels but offers no guidance on when not to use or how it compares to siblings.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_messageGet a Gmail messageARead-only
Fetch a single Gmail message by ID, including decoded plain-text/HTML body and attachment metadata (filenames and sizes, not the attachment contents themselves).
| Name | Required | Description | Default |
|---|---|---|---|
| account | Yes | The Gmail address to operate on. Must be one of the accounts returned by list_accounts. If you don't know which account to use, call list_accounts first and ask the user if ambiguous. | |
| messageId | Yes | The Gmail message ID. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true, and the description adds context about what the tool returns (decoded body, attachment metadata) and what it excludes (attachment contents). This enhances transparency beyond the annotations.
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 main purpose and includes important details. Every part is informative with no extraneous 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?
For a simple fetch tool, the description covers the main output (decoded body, attachment metadata) but lacks details on error handling, return structure (e.g., envelope fields), or behavior when the message is missing. Given the absence of an output schema, more context would be helpful.
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% with informative descriptions for both account and messageId. The description does not add additional meaning beyond what the schema already provides, so a 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 states 'Fetch a single Gmail message by ID' with a specific verb and resource. It distinguishes the tool from siblings by detailing what is included (decoded body, attachment metadata) and what is not (attachment contents).
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 fetching by ID but does not explicitly provide when-to-use or when-not-to-use guidance compared to siblings like search_threads or list_drafts. No alternatives are mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_threadGet a Gmail threadARead-only
Fetch a full Gmail thread by thread ID, including every message's headers and decoded body text. Use search_threads first to find the thread ID.
| Name | Required | Description | Default |
|---|---|---|---|
| account | Yes | The Gmail address to operate on. Must be one of the accounts returned by list_accounts. If you don't know which account to use, call list_accounts first and ask the user if ambiguous. | |
| threadId | Yes | The Gmail thread ID, from search_threads. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already mark readOnlyHint=true, indicating safe read. The description adds value by specifying that it returns 'every message's headers and decoded body text,' which is behavioral detail beyond the annotation.
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 sentences, both front-loaded with essential information. The first sentence states the function and scope; the second gives a usage hint. No wasted 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?
For a fetch-by-ID tool, the description covers what is returned (headers and body). It does not mention pagination or size limits, but for a single thread, this is likely complete. The lack of an output schema is compensated by the description.
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 well-described parameters for account and threadId. The description does not add new parameter semantics beyond what the schema provides, so baseline 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 states 'Fetch a full Gmail thread by thread ID, including every message's headers and decoded body text.' It uses a specific verb (fetch) and resource (full Gmail thread) and distinguishes from siblings like get_message (single message) and search_threads (finding thread IDs).
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 advises 'Use search_threads first to find the thread ID,' providing clear context for when to use this tool. It does not explicitly mention alternatives like get_message, but the instruction is sufficient to guide the agent.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
label_messageApply labels to a messageAIdempotent
Apply one or more existing labels to a single Gmail message. Label IDs come from list_labels.
| Name | Required | Description | Default |
|---|---|---|---|
| account | Yes | The Gmail address to operate on. Must be one of the accounts returned by list_accounts. If you don't know which account to use, call list_accounts first and ask the user if ambiguous. | |
| labelIds | Yes | Gmail label IDs (from list_labels), e.g. ['INBOX', 'Label_12345']. | |
| messageId | Yes | The Gmail message ID. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare idempotentHint=true and destructiveHint=false, so the description adds minimal behavioral context. It does not clarify whether labels are added to existing ones or replace them, nor does it mention side effects on thread labels or error conditions.
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 two sentences long, with no extraneous words. It is front-loaded and efficiently conveys the essential purpose.
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 and well-covered schema, the description is mostly complete. It explains the action and source of inputs but lacks detail on behavior (additive vs replace) and error handling, which would improve completeness.
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 descriptions. The tool description restates the source of label IDs, which adds marginal value. The schema already provides sufficient meaning for all parameters.
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 'apply', the resource 'labels to a single Gmail message', and specifies that label IDs come from list_labels. It inherently distinguishes from siblings like label_thread (applies to thread) and unlabel_message (removes labels).
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 indicates that label IDs come from list_labels, implying a prerequisite step. It provides clear context but does not explicitly compare with alternatives or state when not to use the tool (e.g., use label_thread for thread-level labeling).
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
label_threadApply labels to a threadAIdempotent
Apply one or more existing labels to every message in a Gmail thread. Label IDs come from list_labels.
| Name | Required | Description | Default |
|---|---|---|---|
| account | Yes | The Gmail address to operate on. Must be one of the accounts returned by list_accounts. If you don't know which account to use, call list_accounts first and ask the user if ambiguous. | |
| labelIds | Yes | Gmail label IDs (from list_labels), e.g. ['INBOX', 'Label_12345']. | |
| threadId | Yes | The Gmail thread ID. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations indicate idempotentHint=true and destructiveHint=false. The description adds that labels are applied to 'every message in a Gmail thread,' which is important behavioral context beyond annotations. No annotation contradictions. However, it does not mention error conditions or permissions, which would improve transparency.
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 (16 words) with a concise hint. It is front-loaded with the purpose and contains zero wasted words. Ideal brevity.
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 straightforward mutation operation, three required parameters with full schema coverage, and annotations, the description is complete. It states what the tool does and where to get label IDs. For a tool with no output schema, it suffices. Minor omission: no mention of idempotency or potential side effects on conversations.
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% with clear descriptions for all three parameters. The overall description adds 'Label IDs come from list_labels,' which reinforces the account parameter's hint to call list_accounts. The schema does most of the work, so the description provides marginal added value.
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 title and description clearly state 'Apply labels to a thread.' It specifies applying one or more existing labels to every message in a Gmail thread. The verb 'apply' and resource 'labels to thread' are distinct, and the tool is clearly differentiated from siblings like label_message (single message) and unlabel_thread (remove labels).
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 notes that label IDs come from list_labels, implying a prerequisite. However, it does not explicitly state when to use this tool versus alternatives (e.g., label_message for a single message) or provide when-not-to-use guidance. The context is adequate but not explicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_accountsList connected Gmail accountsARead-only
List all Gmail accounts currently connected to this server. Call this first whenever it's unclear which account a request should use, and ask the user to clarify if more than one account could match.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true, so the safe read behavior is known. The description adds that it lists only accounts 'currently connected to this server', and includes advisory behavior about user clarification, which provides additional context beyond annotations.
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 sentences with zero wasted words. The first sentence states the purpose, the second provides usage guidance. Front-loaded 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?
For a simple list tool with no parameters and no output schema, the description covers purpose, usage context, and user interaction instructions. Combined with annotations, it provides complete guidance for an AI 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?
There are no parameters, so schema coverage is effectively 100%. The description need not add parameter information. 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 clearly states 'List all Gmail accounts currently connected to this server', specifying the verb (list) and resource (Gmail accounts). It distinguishes from sibling tools like list_drafts or list_labels, which target different resources.
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 explicitly instructs to call this tool first when the relevant account is unclear, and to ask the user for clarification if multiple accounts match. This provides clear when-to-use and follow-up guidance.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_draftsList Gmail draftsARead-only
List existing drafts for an account, with basic metadata (subject, recipient, snippet).
| Name | Required | Description | Default |
|---|---|---|---|
| account | Yes | The Gmail address to operate on. Must be one of the accounts returned by list_accounts. If you don't know which account to use, call list_accounts first and ask the user if ambiguous. | |
| pageToken | No | ||
| maxResults | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already provide readOnlyHint=true. Description adds that the tool returns basic metadata (subject, recipient, snippet), giving the agent a clear idea of the output shape. No mention of pagination behavior or rate limits, but the annotation reduces the burden for safety disclosure.
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?
Single sentence with no unnecessary words. Front-loaded with the main action and scope, every word contributes value.
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 absence of an output schema and the need to explain return values, the description is too brief. It only mentions 'basic metadata' without specifying the full structure. Pagination via pageToken and maxResults is not addressed, nor is the relationship to get_draft for full content. The simplicity of the tool partially offsets this, but more detail is warranted.
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 low (33%): only the account parameter has a description. The description does not compensate by explaining pageToken or maxResults, leaving the agent to infer their purpose. For a tool with 3 parameters, this is insufficient.
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?
Clearly states the tool lists existing drafts for a Gmail account and specifies the metadata returned (subject, recipient, snippet). Distinguishes from siblings like create_draft and send_email by limiting to read-only listing of drafts.
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?
Does not explicitly state when to use this tool vs alternatives. The sibling list includes many tools, but no guidance on choosing list_drafts over search_threads or get_message for draft retrieval. Some parameter-level guidance is given for the account field, but overall usage context is lacking.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_labelsList Gmail labelsARead-only
List all Gmail labels (system labels like INBOX/UNREAD and user-created labels) for an account.
| Name | Required | Description | Default |
|---|---|---|---|
| account | Yes | The Gmail address to operate on. Must be one of the accounts returned by list_accounts. If you don't know which account to use, call list_accounts first and ask the user if ambiguous. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already indicate read-only behavior. The description adds that the tool lists both system and user labels, but does not disclose rate limits, permissions, or return format.
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 main description is a single, direct sentence that front-loads the purpose. No extraneous information.
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 simple parameter and lack of output schema, the description is nearly complete. It could mention the return structure but is adequate for a straightforward list operation.
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 account parameter description adds significant value beyond schema: it specifies a valid source (list_accounts) and suggests user disambiguation, fully covering the parameter semantics.
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 'List' and resource 'Gmail labels', with examples of system and user-created labels. It implicitly distinguishes from sibling tools like create_label or label_message.
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 guidance on when to use this tool versus alternatives. The parameter description provides workflow hints but the tool-level description lacks usage context.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_threadsSearch Gmail threadsARead-only
Search Gmail threads using Gmail's search syntax (e.g. from:x@y.com is:unread newer_than:7d, subject:invoice has:attachment). Returns thread IDs with a snippet and basic metadata for each matching thread.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Gmail search query, using standard Gmail search operators. | |
| account | Yes | The Gmail address to operate on. Must be one of the accounts returned by list_accounts. If you don't know which account to use, call list_accounts first and ask the user if ambiguous. | |
| pageToken | No | ||
| maxResults | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true, so description adds no new behavioral information beyond consistency. No destructive behavior mentioned, but not required.
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 succinct sentences, front-loaded with the core purpose, no wasted 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?
Sufficient for a search tool with no output schema; mentions return type (IDs, snippet, metadata). Could mention pagination via pageToken/maxResults, but not critical.
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 covers 50% of parameters with descriptions; the description only elaborates on query syntax, not on pageToken, maxResults, or account beyond what schema provides.
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?
Clearly states the verb 'search', the resource 'Gmail threads', and the use of Gmail search syntax. Returns thread IDs with snippet and metadata, distinguishing from siblings like get_thread or list_accounts.
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?
Provides clear context for when to use (searching by Gmail query) with syntax examples, but does not explicitly exclude alternatives among sibling tools like get_thread for single threads.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
send_emailSend an email (irreversible)ADestructive
⚠️ IRREVERSIBLE: Sends a real email immediately on behalf of the user — there is no undo, no "are you sure" prompt from Gmail, and no draft-review step once this is called. Only call this tool after the human user has explicitly and unambiguously confirmed the exact recipient(s), subject, and body of THIS specific email in the current conversation. If there is any ambiguity about content, recipients, or intent — or if you have not shown the user the exact text you're about to send — use create_draft instead and ask the user to review and send it themselves. Never call this proactively, as part of a speculative multi-step plan, or based on inferred rather than explicitly stated intent.
| Name | Required | Description | Default |
|---|---|---|---|
| cc | No | ||
| to | Yes | ||
| bcc | No | ||
| account | Yes | The Gmail address to operate on. Must be one of the accounts returned by list_accounts. If you don't know which account to use, call list_accounts first and ask the user if ambiguous. | |
| subject | Yes | ||
| bodyHtml | No | Optional HTML body, sent alongside the plain-text body. | |
| bodyText | Yes | Plain-text body. | |
| threadId | No | Set to send as a reply within an existing thread. | |
| confirmed | Yes | Must be exactly `true`. Set this only after the human user has explicitly confirmed the recipients, subject, and body of this exact email in the current conversation. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Adds rich context beyond the destructiveHint annotation: irreversible, no undo, no draft-review step, requirement for confirmed field. Explains the exact behavior and consequences.
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?
Single paragraph front-loaded with a strong warning. Every sentence adds value: purpose, usage guidance, behavioral warning, when-not, alternative. No wasted 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 tool's complexity (irreversible, 9 parameters, 56% schema coverage, no output schema), the description covers essential behavioral and usage context. Could mention success/failure behavior but still adequate.
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 56%. The description emphasizes the critical 'confirmed' parameter and account prerequisite, but does not add much per-parameter detail beyond what the schema already provides.
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?
Clearly states it sends a real email immediately on behalf of the user. Distinguishes from sibling 'create_draft' by specifying when to use the alternative.
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?
Explicitly provides when to use (after explicit user confirmation) and when not (ambiguity, speculative planning, inferred intent). Names alternative tool 'create_draft'.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
unlabel_messageRemove labels from a messageBIdempotent
Remove one or more labels from a single Gmail message.
| Name | Required | Description | Default |
|---|---|---|---|
| account | Yes | The Gmail address to operate on. Must be one of the accounts returned by list_accounts. If you don't know which account to use, call list_accounts first and ask the user if ambiguous. | |
| labelIds | Yes | Gmail label IDs (from list_labels), e.g. ['INBOX', 'Label_12345']. | |
| messageId | Yes | The Gmail message ID. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare idempotentHint=true, readOnlyHint=false, and destructiveHint=false, so the description doesn't need to restate these. However, the description adds no additional behavioral context, such as whether removing labels is reversible or what happens to the message if all labels are removed. Given the annotations cover the core safety profile, the description is adequate but not helpful 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, clear sentence with no unnecessary words. It is front-loaded with the key action and resource. Every word adds value, and it is appropriately concise for a simple operation.
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 that the schema covers all parameters and annotations provide basic behavioral hints, the description is sufficient for a simple removal tool. However, it lacks any mention of return values, error conditions (e.g., if the message or labels don't exist), or side effects. For an idempotent operation, this is acceptable but not complete.
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 for all three parameters, including format and constraints. The description ('Remove one or more labels') does not add any new meaning beyond what the schema provides. A baseline score of 3 is appropriate since the schema already documents the parameters thoroughly.
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 action ('Remove') and the resource ('labels from a single Gmail message'). It specifies that multiple labels can be removed. However, it does not explicitly differentiate from the sibling tool 'unlabel_thread', which performs a similar operation on threads. The distinction is implied by mentioning 'message' rather than 'thread', but could be more explicit.
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 like 'label_message' or 'unlabel_thread'. There is no mention of prerequisites, such as needing the user's consent or requiring certain labels to exist. The description offers no context about the results of removing labels (e.g., does it archive the message?).
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
unlabel_threadRemove labels from a threadAIdempotent
Remove one or more labels from every message in a Gmail thread.
| Name | Required | Description | Default |
|---|---|---|---|
| account | Yes | The Gmail address to operate on. Must be one of the accounts returned by list_accounts. If you don't know which account to use, call list_accounts first and ask the user if ambiguous. | |
| labelIds | Yes | Gmail label IDs (from list_labels), e.g. ['INBOX', 'Label_12345']. | |
| threadId | Yes | The Gmail thread ID. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already provide idempotentHint=true and destructiveHint=false. The description adds behavioral context: it removes labels from 'every message' in the thread, clarifying the scope. No contradiction with annotations.
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 verb and resource. Every word is necessary with no wasted text.
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?
For a simple tool with 3 required params, no output schema, and good annotations, the description is mostly complete. It specifies the scope (thread-level) and the schema covers parameter details. Slight improvement could mention idempotency, but annotations already do.
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 schema fully documents parameters. The description does not add new meaning beyond repeating 'one or more labels,' but this is acceptable given high schema coverage.
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 action: 'Remove one or more labels from every message in a Gmail thread.' It uses a specific verb and resource, and distinguishes from siblings like label_thread and unlabel_message, which add labels or operate on single messages.
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 when to use the tool (to remove labels from an entire thread) but does not explicitly contrast with alternatives like unlabel_message or mention when not to use it. No exclusions or prerequisites are provided.
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.
13 tool updates
v1.0.0- First observed
create_draft - First observed
create_label - First observed
get_message - First observed
get_thread - First observed
label_message - First observed
label_thread - First observed
list_accounts - First observed
list_drafts - First observed
list_labels - First observed
search_threads - First observed
send_email - First observed
unlabel_message - First observed
unlabel_thread
TDQS
Each tool targets a distinct Gmail operation (drafting, sending, labeling, searching, listing) with clear boundaries. The only similar pairs (label_message/label_thread, unlabel_message/unlabel_thread) operate on different entities, and send_email has an explicit warning to distinguish it from create_draft.
All tool names follow a consistent verb_noun pattern with underscores (create_draft, search_threads, unlabel_message, etc.), making it easy to predict the function of each tool based on its name.
13 tools is appropriate for a Gmail MCP server, covering essential operations without being overwhelming. It's well-scoped for the domain.
The set provides solid CRUD-like coverage for emails and labels, including create, read, search, label, and send. Minor gaps exist (e.g., no ability to trash/delete messages or edit drafts), but these do not severely hinder typical email 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
Connect any mailbox to Claude, ChatGPT & AI: read, send, reply, schedule & search emails.
Multiple Google accounts (Gmail, Calendar, Drive, Contacts, Tasks) in one Claude connector.
1Email infrastructure for AI agents — send, receive, search, and reply to email over MCP.
Read, search, send, organize, draft and schedule email across your inboxes from any MCP client.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceLets Claude Desktop manage multiple Gmail accounts simultaneously, supporting search, read, send, reply, and label organization via MCP tools.8619MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI-powered inbox management with natural language commands through Claude Desktop. Supports sending, reading, searching, organizing emails, and managing labels using Gmail API with automatic authentication.8MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol (MCP) server that enables Claude Desktop to interact with Gmail through secure OAuth 2.0 authentication. Send emails, search messages, read emails, and manage multiple Gmail accounts directly from Claude Desktop.215MIT
- FlicenseNot gradedqualityBmaintenanceConnects multiple Gmail and Google Calendar accounts to Claude Desktop locally, enabling email management (search, send, draft, label) and calendar operations (list events, search) via natural language.-
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/m-ishit/gmail-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server