The batch and filter tools are what separate it from a send-and-read integration: fifty messages relabelled in one call, or a rule created once so the same class of mail never reaches the inbox again.
A Gmail integration with an OAuth flow that launches your browser and stores the result globally, so authentication is done once and works from any directory afterwards.
- Sending: `send_email` and `draft_email`, both taking plain text, HTML or multipart bodies and an `attachments` array of local file paths, with full support for international characters in subject and body
- Reading: `read_email` with MIME structure handling, showing each attachment's filename, type, size and download ID; `download_attachment` then writes it to a path you choose
- `search_emails` using Gmail's own operators — `from:`, `to:`, `subject:`, `has:attachment`, `after:`, `before:`, `is:` and `label:`, combinable
- Organising: `modify_email` to add and remove labels, `delete_email`, and the label suite `list_email_labels`, `create_label`, `update_label`, `delete_label` and `get_or_create_label`
- Batches: `batch_modify_emails` and `batch_delete_emails` process up to 50 messages at a time with automatic chunking, per-item success reporting and individual retries when a batch item fails
- Filters: `create_filter`, `list_filters`, `get_filter`, `delete_filter`, and `create_filter_from_template` with prebuilt templates for `fromSender`, `withSubject`, `withAttachments`, `largeEmails`, `containingText` and `mailingList`
A Google Cloud project with the Gmail API enabled and OAuth 2.0 credentials — Desktop app or Web application both work; for Web, add `http://localhost:3000/oauth2callback` to the authorized redirect URIs. Rename the downloaded key file to `gcp-oauth.keys.json`, put it in `~/.gmail-mcp/`, and run `npx @gongrzhe/server-gmail-autoauth-mcp auth`, which opens your browser and saves `credentials.json` next to it. Then point the client at `npx @gongrzhe/server-gmail-autoauth-mcp`. Port 3000 must be free during authentication. A Docker image is available, and a custom callback URL can be passed to `auth` for cloud environments where localhost is not reachable. Gmail's own limit of 25MB per email applies to attachments.
One command plus a key — npx -y @smithery/cli install @gongrzhe/server-gmail-autoauth-mcp --client claude, then supply credentials
