Server data from the Official MCP Registry
Native Gmail MCP server: search, labels, archive, trash, attachments, and snooze.
Native Gmail MCP server: search, labels, archive, trash, attachments, and snooze.
mailwarden is a well-engineered Gmail MCP server with proper OAuth2 authentication, comprehensive input validation, and thoughtful security controls. Code quality is high with extensive test coverage. The server appropriately scopes permissions to Gmail API operations and enforces path traversal protections on file downloads. No critical or high-severity vulnerabilities were identified. Supply chain analysis found 2 known vulnerabilities in dependencies (0 critical, 1 high severity). Package verification found 1 issue.
4 files analyzed · 7 issues found
Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.
This plugin requests these system permissions. Most are normal for its category.
Set these up before or after installing:
Environment variable: MAILWARDEN_DIR
Environment variable: MAILWARDEN_CREDENTIALS
Environment variable: MAILWARDEN_AUTO_SWEEP
Environment variable: MAILWARDEN_DOWNLOAD_DIR
Add this to your MCP configuration file:
{
"mcpServers": {
"io-github-csitte-mailwarden": {
"env": {
"MAILWARDEN_DIR": "your-mailwarden-dir-here",
"MAILWARDEN_AUTO_SWEEP": "your-mailwarden-auto-sweep-here",
"MAILWARDEN_CREDENTIALS": "your-mailwarden-credentials-here",
"MAILWARDEN_DOWNLOAD_DIR": "your-mailwarden-download-dir-here"
},
"args": [
"-y",
"mailwarden"
],
"command": "npx"
}
}
}From the project's GitHub README.
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.
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.
search goes one step further than the raw API: Gmail's threads.list index is sometimes loose for read-state operators — is:unread is silently dropped in some operator combinations (e.g. category:updates is:unread -in:inbox returns read mail too). Since every hit is fetched live anyway, search re-checks the unambiguous predicates (is:unread/is:read/is:starred/in:inbox/category:…, with negation) against each thread's true labels and drops the index's false positives.
| Tool | What it does |
|---|---|
search | Gmail query syntax → thread summaries (from/subject/date/labels/snippet); read-state/category predicates are re-verified against each hit's live labels |
get_thread | Full thread: headers, plaintext + HTML bodies, attachment metadata |
list_labels | All labels (system + user) |
modify_labels | Add/remove labels (archive = remove INBOX, read = remove UNREAD) |
archive / mark_read / mark_unread | Convenience wrappers |
trash / untrash | Move to / restore from Trash |
download_attachment | Save an attachment to a local path |
snooze | Archive now, resurface on/after a date (YYYY-MM-DD) |
unsnooze | Cancel a snooze, return to inbox now |
list_snoozed | All snoozed threads + due dates |
sweep_snoozed | Resurface threads whose snooze is due (run on demand, via cron, or the daemon) |
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:
sweep_snoozed tool),mailwarden --sweep,MAILWARDEN_AUTO_SWEEP=1 (hourly sweep while the server runs).claude mcp add mailwarden -- npx -y mailwarden
That's the whole install — npx fetches and runs the published package, no clone or build step. You only need Google OAuth credentials once (below).
credentials.json.credentials.json in ~/.mailwarden/ (or set MAILWARDEN_CREDENTIALS=/path/to/credentials.json).~/.mailwarden/token.json:
npx -y mailwarden --auth
Scope requested: https://www.googleapis.com/auth/gmail.modify.Claude Code (local stdio):
claude mcp add mailwarden -- npx -y mailwarden
Claude Desktop — add to claude_desktop_config.json:
{
"mcpServers": {
"mailwarden": { "command": "npx", "args": ["-y", "mailwarden"] }
}
}
Remote (Streamable HTTP) — for a VPS / claude.ai custom connector:
npx -y mailwarden --http # listens on :8787/mcp ; set PORT, optional MAILWARDEN_TOKEN bearer gate
Then in claude.ai: Settings → Connectors → Add custom connector → your https://your-host/mcp URL. In Claude Code: claude mcp add --transport http mailwarden https://your-host/mcp.
git clone https://github.com/csitte/mailwarden && cd mailwarden
npm install && npm run build
node dist/index.js --auth
| Var | Meaning |
|---|---|
MAILWARDEN_DIR | config dir (default ~/.mailwarden) |
MAILWARDEN_CREDENTIALS | path to credentials.json |
MAILWARDEN_AUTO_SWEEP | 1 → snooze sweep at startup + hourly while running |
MAILWARDEN_DOWNLOAD_DIR | restrict download_attachment to this directory (strongly recommended for HTTP hosting) |
PORT | HTTP port (default 8787) |
MAILWARDEN_TOKEN | optional bearer token for the HTTP endpoint |
0.1.5 — working. Core Gmail tools + snooze implemented against googleapis and used in daily mailbox automation. Covered by a vitest suite (82 tests, ~99 % statement coverage — npm run coverage). See the changelog / releases. PRs welcome.
MIT © C.Sitte Softwaretechnik
Be the first to review this server!
by Modelcontextprotocol · Developer Tools
Web content fetching and conversion for efficient LLM usage
by Toleno · Developer Tools
Toleno Network MCP Server — Manage your Toleno mining account with Claude AI using natural language.
by mcp-marketplace · Developer Tools
Create, build, and publish Python MCP servers to PyPI — conversationally.