mailwarden
Provides tools for searching, reading, labeling, archiving, trashing, downloading attachments, and snoozing threads in Gmail via the live Gmail API.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mailwardensearch for recent emails from john@example.com"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mailwarden
A reliable, native Gmail MCP server — full mailbox control for AI assistants, with the feature nobody else ships: snooze.
Every operation hits the live Gmail API (no cached snapshot), so it reliably sees all your mail — search, read, label, archive, trash, download attachments, and snooze threads until a date.
Why
Hosted Gmail connectors run on a synced index that can silently miss messages. mailwarden talks straight to the Gmail API, so what you see is what's there. It's a generic Gmail capability layer — keep your own rules/logic in your AI client, not in the server.
Related MCP server: gmail-mcp
Tools
Tool | What it does |
| Gmail query syntax → thread summaries (from/subject/date/labels/snippet) |
| Full thread: headers, plaintext + HTML bodies, attachment metadata |
| All labels (system + user) |
| Add/remove labels (archive = remove |
| Convenience wrappers |
| Move to / restore from Trash |
| Save an attachment to a local path |
| Archive now, resurface on/after a date ( |
| Cancel a snooze, return to inbox now |
| All snoozed threads + due dates |
| Resurface threads whose snooze is due (run on demand, via cron, or the daemon) |
How snooze works (no Gmail API snooze exists — we build it)
snooze removes INBOX and applies a dated label MCP/Snoozed/<YYYY-MM-DD>. sweep_snoozed finds due labels and returns those threads to the inbox (marked unread). Run the sweep:
on demand (
sweep_snoozedtool),via cron:
mailwarden --sweep,or automatically: set
MAILWARDEN_AUTO_SWEEP=1(hourly sweep while the server runs).
Setup
Google Cloud: create a project → enable the Gmail API → configure the OAuth consent screen → create an OAuth client ID of type Desktop app → download it as
credentials.json.Put
credentials.jsonin~/.mailwarden/(or setMAILWARDEN_CREDENTIALS=/path/to/credentials.json).Install & authorize once:
npm install && npm run build mailwarden --auth # opens a browser, stores a refresh token in ~/.mailwarden/token.jsonScope requested:
https://www.googleapis.com/auth/gmail.modify.
Run
Local (stdio) — for Claude Code / Claude Desktop:
mailwardenRemote (Streamable HTTP) — for a VPS / claude.ai custom connector:
mailwarden --http # listens on :8787/mcp ; set PORT, optional MAILWARDEN_TOKEN bearer gate
Connect
Claude Code:
# local stdio
claude mcp add mailwarden -- mailwarden
# or remote
claude mcp add --transport http mailwarden https://your-host/mcpclaude.ai (web): Settings → Connectors → Add custom connector → your https://your-host/mcp URL.
Config (env)
Var | Meaning |
| config dir (default |
| path to |
|
|
| HTTP port (default 8787) |
| optional bearer token for the HTTP endpoint |
Status
0.1.0 — scaffold. Core Gmail tools + snooze implemented against googleapis. The HTTP transport is a thin wrapper to verify against your installed @modelcontextprotocol/sdk version. PRs welcome.
License
MIT © Christian Sitte
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
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/csitte/mailwarden'
If you have feedback or need assistance with the MCP directory API, please join our Discord server