This connects Claude to Gmail via OAuth, exposing the full Gmail API as MCP tools. You get message and thread operations (list, get, send, forward, modify), draft management, labels, filters, attachments, and vacation responders. The server acts as an OAuth proxy so you don't store tokens yourself. It runs locally over HTTP and handles the Google OAuth dance automatically. Reach for this when you want Claude to handle email workflows like finding receipts for expense reports, tracking packages by digging through shipping notifications, or setting up vacation mode across multiple services. The thread-based tools are generally preferred over individual message operations for better context.
Public tool metadata for what this MCP can expose to an agent.
GMAIL_ADD_LABEL_TO_EMAILAdds and/or removes specified gmail labels for a message; ensure `message id` and all `label ids` are valid (use 'listlabels' for custom label ids).4 paramsAdds and/or removes specified gmail labels for a message; ensure `message id` and all `label ids` are valid (use 'listlabels' for custom label ids).
user_idstringmessage_idstringadd_label_idsarrayremove_label_idsarrayGMAIL_CREATE_EMAIL_DRAFTCreates a gmail email draft, supporting to/cc/bcc, subject, plain/html body (ensure `is html=true` for html), attachments, and threading.10 paramsCreates a gmail email draft, supporting to/cc/bcc, subject, plain/html body (ensure `is html=true` for html), attachments, and threading.
ccarraybccarraybodystringis_htmlbooleansubjectstringuser_idstringthread_idstringattachmentobjectrecipient_emailstringextra_recipientsarrayGMAIL_CREATE_LABELCreates a new label with a unique name in the specified user's gmail account.6 paramsCreates a new label with a unique name in the specified user's gmail account.
user_idstringlabel_namestringtext_colorstringbackground_colorstringlabel_list_visibilitystringmessage_list_visibilitystringGMAIL_DELETE_DRAFTPermanently deletes a specific gmail draft using its id; ensure the draft exists and the user has necessary permissions for the given `user id`.2 paramsPermanently deletes a specific gmail draft using its id; ensure the draft exists and the user has necessary permissions for the given `user id`.
user_idstringdraft_idstringGMAIL_DELETE_MESSAGEPermanently deletes a specific email message by its id from a gmail mailbox; for `user id`, use 'me' for the authenticated user or an email address to which the authenticated user has delegated access.2 paramsPermanently deletes a specific email message by its id from a gmail mailbox; for `user id`, use 'me' for the authenticated user or an email address to which the authenticated user has delegated access.
user_idstringmessage_idstringGMAIL_FETCH_EMAILSFetches a list of email messages from a gmail account, supporting filtering, pagination, and optional full content retrieval.9 paramsFetches a list of email messages from a gmail account, supporting filtering, pagination, and optional full content retrieval.
querystringuser_idstringverbosebooleanids_onlybooleanlabel_idsarraypage_tokenstringmax_resultsintegerinclude_payloadbooleaninclude_spam_trashbooleanGMAIL_FETCH_MESSAGE_BY_MESSAGE_IDFetches a specific email message by its id, provided the `message id` exists and is accessible to the authenticated `user id`.3 paramsFetches a specific email message by its id, provided the `message id` exists and is accessible to the authenticated `user id`.
formatstringuser_idstringmessage_idstringGMAIL_FETCH_MESSAGE_BY_THREAD_IDRetrieves messages from a gmail thread using its `thread id`, where the thread must be accessible by the specified `user id`.3 paramsRetrieves messages from a gmail thread using its `thread id`, where the thread must be accessible by the specified `user id`.
user_idstringthread_idstringpage_tokenstringGMAIL_GET_ATTACHMENTRetrieves a specific attachment by id from a message in a user's gmail mailbox, requiring valid message and attachment ids.4 paramsRetrieves a specific attachment by id from a message in a user's gmail mailbox, requiring valid message and attachment ids.
user_idstringfile_namestringmessage_idstringattachment_idstringGMAIL_GET_CONTACTSFetches contacts (connections) for the authenticated google account, allowing selection of specific data fields and pagination.4 paramsFetches contacts (connections) for the authenticated google account, allowing selection of specific data fields and pagination.
page_tokenstringperson_fieldsstringresource_namestringinclude_other_contactsbooleanGMAIL_GET_PEOPLERetrieves either a specific person's details (using `resource name`) or lists 'other contacts' (if `other contacts` is true), with `person fields` specifying the data to return.6 paramsRetrieves either a specific person's details (using `resource name`) or lists 'other contacts' (if `other contacts` is true), with `person fields` specifying the data to return.
page_sizeintegerpage_tokenstringsync_tokenstringperson_fieldsstringresource_namestringother_contactsbooleanGMAIL_GET_PROFILERetrieves key gmail profile information (email address, message/thread totals, history id) for a user.1 paramsRetrieves key gmail profile information (email address, message/thread totals, history id) for a user.
user_idstringGMAIL_LIST_DRAFTSRetrieves a paginated list of email drafts from a user's gmail account. use verbose=true to get full draft details including subject, body, sender, and timestamp.4 paramsRetrieves a paginated list of email drafts from a user's gmail account. use verbose=true to get full draft details including subject, body, sender, and timestamp.
user_idstringverbosebooleanpage_tokenstringmax_resultsintegerGMAIL_LIST_LABELSRetrieves a list of all system and user-created labels for the specified gmail account.1 paramsRetrieves a list of all system and user-created labels for the specified gmail account.
user_idstringGMAIL_LIST_THREADSRetrieves a list of email threads from a gmail account, identified by `user id` (email address or 'me'), supporting filtering and pagination.5 paramsRetrieves a list of email threads from a gmail account, identified by `user id` (email address or 'me'), supporting filtering and pagination.
querystringuser_idstringverbosebooleanpage_tokenstringmax_resultsintegerGMAIL_MODIFY_THREAD_LABELSAdds or removes specified existing label ids from a gmail thread, affecting all its messages; ensure the thread id is valid.4 paramsAdds or removes specified existing label ids from a gmail thread, affecting all its messages; ensure the thread id is valid.
user_idstringthread_idstringadd_label_idsarrayremove_label_idsarrayGMAIL_MOVE_TO_TRASHMoves an existing, non-deleted email message to the trash for the specified user.2 paramsMoves an existing, non-deleted email message to the trash for the specified user.
user_idstringmessage_idstringGMAIL_PATCH_LABELPatches the specified label.6 paramsPatches the specified label.
idstringnamestringcolorobjectuserIdstringlabelListVisibilitystringmessageListVisibilitystringGMAIL_REMOVE_LABELPermanently deletes a specific, existing user-created gmail label by its id for a user; cannot delete system labels.2 paramsPermanently deletes a specific, existing user-created gmail label by its id for a user; cannot delete system labels.
user_idstringlabel_idstringGMAIL_REPLY_TO_THREADSends a reply within a specific gmail thread using the original thread's subject, requiring a valid `thread id` and correctly formatted email addresses. supports attachments via the `attachment` parameter with valid `s3key`, `mimetype`, and `name`.9 paramsSends a reply within a specific gmail thread using the original thread's subject, requiring a valid `thread id` and correctly formatted email addresses. supports attachments via the `attachment` parameter with valid `s3key`, `mimetype`, and `name`.
ccarraybccarrayis_htmlbooleanuser_idstringthread_idstringattachmentobjectmessage_bodystringrecipient_emailstringextra_recipientsarrayMCP server for Gmail - read, send, archive, and manage emails.
Flight check-in: "Check me in for my flight tomorrow" → finds your confirmation email, extracts the booking reference, and completes check-in with browser use.
Expense submission: "Submit my Amazon purchases from last week as expenses" → finds receipts, extracts amounts/categories, and files them in your expense system.
Package tracking: "Where's my package from Acme?" → finds the shipping notification, extracts the tracking number, and fetches current delivery status.
Find that attachment: "What did we settle on for the budget? Michelle sent me something yesterday" → locates the email and opens the attached spreadsheet.
Vacation mode: "I'm on holiday Dec 20-Jan 2" → sets up Gmail auto-reply, blocks your calendar, and updates your Slack status in one go.
Meeting follow-up: After a call, your assistant reads the Gemini transcript, summarizes key decisions, and drafts a follow-up email with action items.
(These are just examples - any workflow that needs email search, reading, or sending can use this.)
http://localhost:3000/callback to Authorized redirect URIsGOOGLE_CLIENT_ID='your-client-id' \
GOOGLE_CLIENT_SECRET='your-client-secret' \
MCP_TRANSPORT=http \
npm start
The server runs on http://localhost:3000 by default. Change with PORT=3001.
claude mcp add --transport http gmail-mcp http://localhost:3000/mcp
This server acts as an OAuth proxy to Google:
graph LR
A[MCP client] <--> B[gmail-mcp] <--> C[Google OAuth/API]
/.well-known/oauth-authorization-server/register returns the Google OAuth client credentials/authorize redirects to Google, encoding the client's callback URL in state/callback receives the code from Google and forwards to the client's callback/token proxies token requests to Google, injecting client credentials/mcp handles MCP requests, using the bearer token to call Gmail APIThe server holds no tokens or state - it just proxies OAuth to Google.
| Tool | Description |
|---|---|
gmail_get_profile | Get user's email address and profile info |
| Messages | |
gmail_messages_list | Search/list messages (consider gmail_threads_list instead) |
gmail_message_get | Get a single message |
gmail_message_send | Send an email |
gmail_message_forward | Forward an email to new recipients |
gmail_message_modify | Add/remove labels |
gmail_message_archive | Archive (remove from inbox) |
gmail_message_trash | Move to trash |
gmail_message_untrash | Restore from trash |
gmail_message_delete | Permanently delete |
gmail_messages_batch_modify | Bulk label changes |
gmail_messages_batch_delete | Bulk permanent delete |
| Threads | |
gmail_threads_list | Search/list threads (recommended) |
gmail_thread_get | Get all messages in a thread (recommended) |
gmail_thread_modify | Add/remove labels |
gmail_thread_trash | Move to trash |
gmail_thread_untrash | Restore from trash |
gmail_thread_delete | Permanently delete |
| Drafts | |
gmail_drafts_list | List drafts |
gmail_draft_get | Get a draft |
gmail_draft_create | Create a draft |
gmail_draft_update | Update a draft |
gmail_draft_send | Send a draft |
gmail_draft_delete | Delete a draft |
| Labels | |
gmail_labels_list | List all labels |
gmail_label_get | Get a label |
gmail_label_create | Create a label |
gmail_label_update | Update a label |
gmail_label_delete | Delete a label |
| Attachments | |
gmail_attachment_get | Download attachment |
| Filters | |
gmail_filters_list | List email filters |
gmail_filter_get | Get a filter |
gmail_filter_create | Create a filter |
gmail_filter_delete | Delete a filter |
| Settings | |
gmail_vacation_get | Get vacation auto-reply settings |
gmail_vacation_set | Set vacation auto-reply settings |
gmail.readonly - Read messages and labelsgmail.send - Send messagesgmail.modify - Modify messages (archive, labels, trash)Pull requests are welcomed on GitHub! To get started:
npm installnpm run test to run testsnpm run buildVersions follow the semantic versioning spec.
To release:
npm version <major | minor | patch> to bump the versiongit push --follow-tags to push with tagsGOOGLE_ACCESS_TOKEN*secretGoogle OAuth access token with Gmail scopes.
MCP_TRANSPORT*Transport type.
GOOGLE_CLIENT_ID*Google OAuth client ID.
GOOGLE_CLIENT_SECRET*secretGoogle OAuth client secret.
io.github.mindstone/mcp-server-microsoft-teams
com.mintmcp/outlook-email
helbertparanhos/resend-email-mcp
marlinjai/email-mcp
io.github.mindstone/mcp-server-email-imap
io.github.osamahassouna/email-playbook-mcp