Skip to main content
Glama
mcp-z

@mcp-z/mcp-gmail

by mcp-z

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
PORTNoPort for HTTP transport (used for OAuth callback URL).
AUTH_MODENoAuthentication mode: loopback (default), service-account, or dcr.
REDIRECT_URINoRedirect URI for OAuth. Omit for local loopback; set to public /oauth/callback for cloud.
DCR_STORE_URINoURI for DCR registration storage (default: file://).
TOKEN_STORE_URINoURI for OAuth token storage (default: file:// under ~/.mcp-z/).
GOOGLE_CLIENT_IDNoYour Google OAuth client ID. Required for loopback OAuth and DCR modes.
GOOGLE_CLIENT_SECRETNoYour Google OAuth client secret. Required for loopback OAuth and DCR modes.
GOOGLE_SERVICE_ACCOUNT_KEY_FILENoPath to the Google service account JSON key file.

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
{
  "listChanged": true
}
prompts
{
  "listChanged": true
}
resources
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
categories-listA

List Gmail category labels (CATEGORY_*) with IDs and descriptions.

label-addB

Add a label to a Gmail message

label-deleteA

Delete Gmail labels permanently (irreversible). System labels (INBOX, SENT, etc.) cannot be deleted.

labels-listA

List Gmail labels for label: query syntax. Case-sensitive.

message-getA

Get a Gmail message by ID with flexible field selection

message-mark-readA

Mark a Gmail message as read

message-move-to-trashA

Move Gmail messages to trash (recoverable).

message-respondB

Send a reply to a Gmail message

message-searchB

Search Gmail messages using structured query objects with flexible field selection.

message-sendC

Send an email message through Gmail

messages-export-csvA

Export Gmail messages to CSV with streaming pagination. Returns file URI. Use query-syntax prompt for query reference.

account-meA

Show current mcp-gmail user identity. Returns email, alias (if set), and session expiry information.

account-switchA

Use mcp-gmail account (smart mode). If email/alias provided and already linked, switches to it without triggering OAuth. If not linked or no email provided, triggers OAuth browser flow to add account. Returns account email, whether it was newly added, and total account count.

account-removeA

Remove mcp-gmail account and delete stored tokens permanently. If removing the active account, the first remaining account becomes active. Requires email or alias parameter.

account-listA

List all linked mcp-gmail accounts with their aliases and active status.

Prompts

Interactive templates invoked by user choice

NameDescription
draft-emailDraft an email response
query-syntaxReference guide for Gmail query syntax

Resources

Contextual data attached and managed by the client

NameDescription

No resources

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/mcp-z/mcp-gmail'

If you have feedback or need assistance with the MCP directory API, please join our Discord server