Skip to main content
Glama
alexpekach

gmail-mcp-local

by alexpekach

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
GMAIL_MCP_SCOPESNoScopes to request (default: readonly+compose+modify)
GMAIL_MCP_CLIENT_IDYesGoogle Desktop client ID
GMAIL_MCP_CLIENT_SECRETYesGoogle Desktop client secret (non-confidential, required for token exchange)

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

This server publishes no instructions, or was last inspected before Glama recorded them.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
list_accountsA

List the Google accounts connected on THIS device (metadata only — never tokens). Each entry has ref, email, tag, has_refresh_token. Optionally filter by tag.

connect_accountA

Connect a Google account on THIS device via your browser (PKCE + loopback). The refresh token is stored in your OS keychain and never leaves the machine. Returns {ref, email, tag}.

remove_accountA

Disconnect a Google account: deletes its refresh token from the keychain and its metadata. Does NOT revoke at Google — do that at https://myaccount.google.com/permissions.

set_tagA

Change your tag for a connected account (e.g. switch "personal" to "work"). Metadata only — never touches the token.

search_threadsA

Search Gmail threads in a connected account using Gmail search syntax (e.g. "from:bob newer_than:7d has:attachment"). Returns thread ids + snippets in one API call. Use get_thread for full content.

get_threadC

Fetch a Gmail thread by id, with each message parsed into readable headers + body text/html.

list_labelsA

List Gmail labels (system + user) for a connected account.

list_thread_attachmentsA

List metadata for all attachments in a thread — filename, mime_type, size_bytes, message_id, attachment_id. No bytes (cheap). Use get_attachment to fetch one.

get_attachmentA

Fetch one Gmail attachment by message_id + attachment_id (discover both via list_thread_attachments). Returns base64 bytes + filename/mime_type/size_bytes; for text-like MIMEs also data_text. Default cap 5MB.

check_account_scopesA

Report the OAuth scopes currently granted on a connected account. Returns {granted_scopes[], has_write_scope, has_modify_scope, needs_reauth}. If needs_reauth, reconnect to grant compose/modify.

create_draftA

Create a Gmail draft. Returns {draft_id, message_id, thread_id}. For replies pass reply_to_message_id. Requires gmail.compose scope.

send_draftA

Send a previously-created draft (review it in Gmail first). Returns {message_id, thread_id, label_ids}. Requires gmail.compose scope.

send_messageA

Compose AND send in one step (no draft review). Same payload as create_draft. Returns {message_id, thread_id, label_ids}. Requires gmail.compose scope.

label_threadA

Add/remove labels on every message in a thread. INBOX/STARRED/UNREAD/IMPORTANT/SPAM/TRASH or user label ids. Mark read: remove ["UNREAD"]. Archive: remove ["INBOX"]. Requires gmail.modify scope.

label_messageC

Same as label_thread but for a single message id. Requires gmail.modify scope.

create_labelA

Create a user label. Use "/" for nesting (e.g. "Clients/Acme"). Returns {id, name}. Requires gmail.modify scope.

update_labelB

Rename or change visibility of a user label. Requires gmail.modify scope.

delete_labelA

Permanently delete a user label (messages keep other labels). Requires gmail.modify scope.

trash_threadA

Move a thread to TRASH (reversible via untrash_thread). Requires gmail.modify scope.

untrash_threadA

Restore a trashed thread to its previous labels. Requires gmail.modify scope.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A3.7/5.0

Scored across 20 tools

Disambiguation5/5

Each tool targets a distinct action on a specific resource (e.g., create_draft vs send_message, get_thread vs search_threads, label_message vs label_thread). There is no functional overlap; even similar-sounding tools like send_draft and send_message have clearly differentiated purposes.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern with lowercase and underscores (e.g., check_account_scopes, create_label, delete_label). The naming is predictable and makes it easy to infer the tool's function from its name alone.

Tool Count4/5

With 20 tools, the count is slightly above the typical well-scoped range of 3-15, but each tool serves a distinct purpose in Gmail management. The size is justified by the breadth of Gmail's features, making it reasonable for a comprehensive MCP server.

Completeness4/5

The tool set covers the core Gmail lifecycle: account management, email sending (draft or direct), threading, labeling, attachments, and trash operations. Minor gaps exist (e.g., no direct individual message retrieval, but get_thread suffices), but agents can work around them.

Maintenance

ActivityMaintained
ResponsivenessNo issues