Anything can send an email; what this adds is bulk inbox work — label changes and deletes across many messages, chunked to stay inside API limits, with failures retried individually and reported per item rather than as one opaque error. The default batch size is 50 and can be lowered when you hit rate limiting. Note that `delete_email` is a permanent delete, not a move to trash.
An MCP server for Gmail with an authentication flow built in. It covers the whole mailbox: sending and drafting, reading with proper MIME handling, Gmail-syntax search, label management, and batch operations over many messages at once.
- Send or draft mail with recipients, cc, bcc and international characters in subject and body — `send_email`, `draft_email`
- Read one message by ID, with the plain-text body extracted from nested MIME parts and attachment filenames, types and sizes reported — `read_email`
- Search with Gmail's own operators — `from:`, `to:`, `subject:`, `has:attachment`, `after:`, `before:`, `is:`, `label:` — combined in one query — `search_emails`
- Move, archive and delete by changing labels on a message — `modify_email`, `delete_email`
- Full label management: list, create, update, delete, and get-or-create by name, with `messageListVisibility` and `labelListVisibility` under your control — `list_email_labels`, `create_label`, `update_label`, `delete_label`, `get_or_create_label`
- Batch label changes and deletes across many messages, chunked automatically with per-item success and failure reported — `batch_modify_emails`, `batch_delete_emails`
A Google Cloud project with the Gmail API enabled and OAuth 2.0 credentials — Desktop app or Web application both work — downloaded and renamed to `token.json`. The README drives every step through npx and the name `@raghavared/gmail-mcp`, which npm does not have. The flow itself is a one-off `auth` run: it opens a browser, completes Google sign-in and saves credentials to `~/.gmail-mcp/credentials.json`, after which any directory can use them. Web application credentials need `http://localhost:3000/v2/auth/google/callback` in the authorized redirect URIs, and port 3000 must be free during authentication. A Docker path and a cloud callback form (`auth {domain}/v2/auth/google/callback`) are documented for headless hosts.
