Gmail MCP
MCP server for the Gmail API: search, read and send email, manage drafts, labels and the trash.
Connector by A1-x-Tech · GitHub account verified by the MCP Registry
Install
Works with Claude Code, Codex, VS Code, Cursor, Windsurf, Claude Desktop. Read the repository before you give any tool access to your data.
npx agentmarket install connector/a1-x-tech-mcp-google-gmail
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this server can do and what it asks for, from its tool list and install config. Checked Oct 25, 2026.
- Tools
- 8 read · 1 write · 9 delete
- Secrets
- 3 (API keys, tokens or passwords)
- Install scripts
- Not scanned yet
- Runs as
- Node.js package
Tools by what they do 18
Read from the source code; the running server may list different tools.
Read 8 · Look things up without changing anything.
get_draftget_messageget_profileget_threadlist_draftslist_labelslist_messageslist_threads
Write 1 · Create, change, send or run things.
create_draft
Delete 9 · Delete, drop, revoke or wipe things.
delete_draftmanage_labelsmanage_trashmodify_messagemodify_threadraw_requestsend_draftsend_messageupdate_draft
Secrets and settings it asks for
Secrets: values you paste in that let it act as you.
GOOGLE_GMAIL_ACCESS_TOKENGOOGLE_GMAIL_CLIENT_SECRETGOOGLE_GMAIL_REFRESH_TOKEN
Other settings (environment variables or headers).
GOOGLE_GMAIL_API_BASEGOOGLE_GMAIL_CLIENT_IDGOOGLE_GMAIL_MAX_RETRIESGOOGLE_GMAIL_OAUTH_PORTGOOGLE_GMAIL_TIMEOUT_MS
Files it touches
- Any path the agent passes to its tools
Tools (18)
Read from the source code; the running server may differ. Descriptions are the server’s own words; hidden characters are shown as [U+…].
create_draftCreate a draftCreates a draft email in the mailbox without sending anything. All fields are optional — an empty draft is legal — but a useful one carries to[], subject and a body. For a reply draft set thread_id, in_reply_to (headers.messageId of the message being answered, via get_message) and the original subject with "Re: ". Returns the draft id (needed by update_draft/send_draft/delete_draft) and the underlying message id/threadId. Drafting first and sending with send_draft after a human look is the safe path for consequential mail — prefer it over send_message when in doubt.
delete_draftDelete a draftcan change or delete dataPERMANENTLY deletes a draft — drafts skip the trash, so there is no undo and no manage_trash recovery. Confirm with get_draft before deleting anything the user might still want. Returns empty on success.
get_draftRead a draftread-onlyFetches one draft with its message decoded like get_message: headers (to, cc, subject, ...), text body, HTML only on request, attachment metadata. Use it to show the user what send_draft would send, or to read the current content before update_draft (updates REPLACE the whole draft).
get_messageRead a messageread-onlyFetches one message fully decoded: headers (from, to, cc, subject, date, messageId, inReplyTo, references — RFC 2047 words decoded), the plain-text body (base64/charset decoded), the HTML body when there is no text part or include_html=true, and attachment METADATA (filename, mimeType, sizeBytes, attachmentId — never the content; download bytes via raw_request users/me/messages/<id>/attachments/<attachmentId> if truly needed). Bodies are truncated at max_body_chars (default 50000) with textTruncated/htmlTruncated flags. metadata_only=true skips bodies entirely. To reply later, keep headers.mes…
get_profileGet the mailbox profileread-onlyReturns the authenticated mailbox's profile: emailAddress (the user's own address — useful for send-to-self checks and for recognizing the user's messages in threads), messagesTotal, threadsTotal and historyId. The cheapest way to verify that the OAuth credentials work.
get_threadRead a whole conversationread-onlyFetches a conversation with every message decoded like get_message: headers, text bodies (HTML only when a message has no text part or include_html=true), attachment metadata and truncation flags. Messages come oldest-first. To reply to the conversation, take the LAST message's threadId, headers.messageId and subject and pass them to send_message (thread_id, in_reply_to, subject with "Re: "). Long threads can be large — lower max_body_chars (it applies per message) when only the gist is needed.
list_draftsList draftsread-onlyLists the mailbox's drafts: draft id plus the underlying message's id and threadId (no subjects — read one with get_draft). query filters with Gmail query syntax (e.g. subject:invoice); paginate with page_token from nextPageToken.
list_labelsList labelsread-onlyWithout label_id: lists every label in the mailbox — system labels (INBOX, SENT, DRAFT, SPAM, TRASH, UNREAD, STARRED, IMPORTANT, CATEGORY_*) and user labels with their ids — the vocabulary that list_messages label_ids and modify_message add/remove_label_ids speak. With label_id: fetches that one label including its counts (messagesTotal, messagesUnread, threadsTotal, threadsUnread), which the plain list does not carry.
list_messagesSearch and list messagesread-onlySearches the mailbox with Gmail query syntax and returns one summary per message: id, threadId, labelIds, snippet, from, to, subject, date, internalDate. Filter with query (same operators as the Gmail search box: from:, to:, subject:, is:unread, is:starred, has:attachment, label:, newer_than:7d, before:/after:) and/or label_ids (all must match). Spam and trash are excluded unless include_spam_trash=true. Paginate with page_token from nextPageToken; page_size defaults to 25 (max 100 — each summary costs one metadata read, throttled to a few at a time). A message deleted between the search and i…
list_threadsSearch and list threadsread-onlySearches conversations (threads) with the same Gmail query syntax as list_messages and returns id, snippet (of the latest message) and historyId per thread. Use this instead of list_messages when the unit of work is a conversation — triaging an inbox, finding a discussion to reply into. Filter with query and/or label_ids; paginate with page_token from nextPageToken (page_size max 500). Read the full conversation with get_thread.
manage_labelsCreate, rename or delete a labelcan change or delete dataManages user labels. action=create needs name (nest with "/", e.g. "Clients/Acme" — the parent must already exist). action=update needs label_id plus at least one of name, label_list_visibility (show | show_if_unread | hide — the label in the sidebar) or message_list_visibility (show | hide — its messages in the list); only the provided fields change. action=delete needs label_id and removes the label from EVERY message it was applied to — the messages survive, the label and its message-associations do not; this cannot be undone. System labels (INBOX, STARRED, ...) cannot be created, renamed o…
manage_trashTrash or restore mailcan change or delete dataMoves a message or a whole thread to the Gmail trash, or restores it. action=trash is REVERSIBLE: Gmail keeps trashed mail for about 30 days, then deletes it permanently; action=untrash restores it before that happens. target=message (default) uses a message id, target=thread trashes/restores every message in the thread. This server intentionally has no permanent-delete tool — the trash is the safety net. Note: untrash does not re-add INBOX; follow up with modify_message archived=false if it should reappear in the inbox.
modify_messageChange message labels / statecan change or delete dataChanges a message's state via Gmail labels: read=true/false marks read/unread, starred=true/false stars/unstars, archived=true removes it from the inbox (archived=false moves it back), and add_label_ids/remove_label_ids apply or strip any labels from list_labels (e.g. a user label, or IMPORTANT). At least one change is required; applying the same change twice is harmless. This never deletes anything — use manage_trash for the trash. Returns the message's new id/labelIds.
modify_threadChange thread labels / statecan change or delete dataApplies the same normalized state changes as modify_message — read/unread, starred, archived, add_label_ids/remove_label_ids — to EVERY message in a conversation at once. Use it to mark a whole conversation read or archive it in one call instead of looping over messages. At least one change is required; repeating the same change is harmless. Returns the thread's new id and message label state.
raw_requestRaw Gmail API callcan change or delete dataEscape hatch to call any Gmail API v1 path directly, for requests the typed tools don't cover — e.g. downloading attachment content ("gmail/v1/users/me/messages/<messageId>/attachments/<attachmentId>", returns base64url data), history.list for incremental sync ("gmail/v1/users/me/history?startHistoryId=..."), batchModify, or settings endpoints (filters, forwarding, vacation). The path may carry a query string. The Bearer token is added automatically; the method defaults to GET. CAUTION: this bypasses the typed tools' guard rails — users/me/messages/<id> DELETE is a PERMANENT delete that skips …
Show 3 more tools
send_draftSend a draftcan change or delete dataSends an existing draft exactly as it is stored, immediately and irreversibly; the draft disappears from the drafts list and becomes a sent message (returned id/threadId). Verify the content with get_draft before calling this. NEVER retried after a timeout or 5xx (a duplicate email cannot be unsent): if the outcome is unclear, check list_drafts (the draft is gone if it was sent) or list_messages in:sent before considering anything else. Daily sending limits apply (~500/day consumer, ~2000/day Workspace).
send_messageSend an emailcan change or delete dataSends an email from the authenticated mailbox, immediately and irreversibly. Requires at least one recipient across to/cc/bcc (a bcc-only send is fine — to may be omitted) and at least a subject or a body; body_text and body_html together become multipart/alternative. TO REPLY IN A THREAD: call get_message on the message being answered first, then pass its threadId as thread_id, its headers.messageId as in_reply_to, and the same subject prefixed with "Re: " — Gmail threads the reply only when all three line up. Returns the sent message's id, threadId and labelIds. NEVER retried after a timeout…
update_draftUpdate a draftcan change or delete dataREPLACES a draft's entire message — the Gmail API has no partial draft edit, so omitted fields are dropped, not kept. Read the current content with get_draft first, then pass the complete new state (recipients, subject, body, and thread_id/in_reply_to for reply drafts). The draft id stays the same; the underlying message id changes. Returns the updated draft.
Signals
- Stars
- 0
- Forks
- 0
- Open issues
- 0
- Last commit
- Oct 4, 2026 (24 days ago)
- Last release
- Sep 23, 2026 (1 month ago)
From GitHub (fetched Oct 24, 2026).
Details
- Registry name
io.github.A1-x-Tech/mcp-google-gmail- Version
- 1.0.0
- Auth
- API key
- Packages
- npm mcp-google-gmail
- License
- MIT
- Repository
- github.com/A1-x-Tech/mcp-google-gmail
- First seen
- Oct 24, 2026
- Last checked
- Oct 25, 2026
More from A1-x-Tech
- 0.537score
Google Sheets MCP
A1-x-Tech
MCP server for the Google Sheets API: read and write ranges, sheets, formatting, charts, sharing.
ConnectorAFreshness: ALocal★ 1↓ 45/wkClaude Code +5 - 0.535score
Google Slides MCP
A1-x-Tech
MCP server for the Google Slides API: presentations, slides, text, shapes, images and tables.
ConnectorAFreshness: ALocal★ 1↓ 37/wkClaude Code +5 - 0.535score
Google Business Profile MCP
A1-x-Tech
MCP server for Google Business Profile: locations, reviews, local posts and performance metrics.
ConnectorAFreshness: ALocal★ 4Claude Code +5 - 0.526score
Google Drive MCP
A1-x-Tech
MCP server for the Google Drive API: search, upload, download, organize and share files.
ConnectorAFreshness: ALocal↓ 38/wkClaude Code +5 - 0.526score
Google Calendar MCP
A1-x-Tech
MCP server for the Google Calendar API: events, recurrence, invitations, availability, calendars.
ConnectorAFreshness: ALocal↓ 36/wkClaude Code +5 - 0.524score
Google Docs MCP
A1-x-Tech
MCP server for the Google Docs API: read and edit documents, styles, tables, images, comments.
ConnectorAFreshness: ALocal↓ 27/wkClaude Code +5
Cite this page
Gmail MCP. Agent Mart. https://agentmart.dev/connectors/a1-x-tech-mcp-google-gmail (last updated 2026-10-25)