Mailwarden MCP Server

Native Gmail MCP server: search, labels, archive, trash, attachments, and snooze.

Local serverstdio

What is the Mailwarden MCP server?

If you already use Mailwarden, the mailwarden mcp server is the piece that lets your assistant work with it directly. Native Gmail MCP server: search, labels, archive, trash, attachments, and snooze.

What the server does

A reliable, native Gmail MCP server — full mailbox triage for AI assistants, with the feature nobody else ships: snooze.

  • Snooze — the feature nobody else ships. — Archive a thread now, have it resurface in the inbox
  • Search you can trust. — Gmail's own search index silently drops is:unread in some operator
  • Bulk operations that scale. — bulk_modify archives/labels everything matching a query at
  • Structured outputs. — Every tool declares an outputSchema and returns validated
  • Small attack surface. — No send tools (no exfiltration path for prompt-injected mail),
  • Correct with real-world mail. — RFC 2047 headers decoded (=?UTF-8?B?…?= → readable text),

Available tools

The toolset is worth reading before you wire it up, because it tells you what the integration is really for:

  • search — Gmail query syntax → thread summaries (from/subject/date/labels/snippet); read-state/category predicates are re-verified against each hit's live
  • get_thread — Full thread: headers, plaintext + HTML bodies, attachment metadata
  • list_labels — All labels (system + user)
  • create_label — Create a user label (idempotent; nested via Parent/Child) and return its id
  • modify_labels — Add/remove labels by name or id — an unknown name in add is auto-created (archive = remove INBOX, read = remove UNREAD)
  • download_attachment — Save an attachment to a local path (never overwrites — collisions get a numeric suffix)
  • list_filters — All Gmail filters (criteria + label actions); surfaces any forward address on existing filters for auditing
  • create_filter — Create a server-side auto-triage rule (criteria → label actions only; no forwarding — see below). Optionally applyToExisting to also sweep
  • delete_filter — Delete a filter by id

Installation

Installation goes through your MCP client rather than a global install: point it at mailwarden on npm and it is fetched when the client starts. The copy-paste blocks for Claude Desktop, Claude Code and Cursor are further down this page.

Credentials and setup notes

Configuration is passed through the environment: MAILWARDEN_TOKEN, MAILWARDEN_ALLOW_NO_TOKEN, MAILWARDEN_HOST. Treat anything key-shaped as a real credential — scope it to the minimum the server needs, and rotate it if it ever lands in a shared config.

Where it fits

Among the team communication options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. Mailwarden's toolset — search, get_thread, list_labels and 6 more — is a fair guide to whether it matches your workflow. It is maintained by csitte; worth a glance at recent repository activity before you build anything load-bearing on it.

SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.

Worth knowing first

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 9 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch Mailwarden.
  • Missing credentials fail quietly in some clients — if no tools show up, check the environment block first.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Available tools

ToolWhat it does
searchGmail query syntax → thread summaries (from/subject/date/labels/snippet); read-state/category predicates are re-verified against each hit's live labels; paginated via pageToken/nextPageToken
get_threadFull thread: headers, plaintext + HTML bodies, attachment metadata
list_labelsAll labels (system + user)
create_labelCreate a user label (idempotent; nested via Parent/Child) and return its id
modify_labelsAdd/remove labels by **name or id** — an unknown name in add is auto-created (archive = remove INBOX, read = remove UNREAD)
download_attachmentSave an attachment to a local path (never overwrites — collisions get a numeric suffix)
list_filtersAll Gmail filters (criteria + label actions); surfaces any forward address on existing filters for auditing
create_filterCreate a server-side auto-triage rule (criteria → label actions only; **no forwarding** — see below). Optionally applyToExisting to also sweep matching mail already in the mailbox
delete_filterDelete a filter by id

How to install the Mailwarden MCP server

{
  "mcpServers": {
    "mailwarden": {
      "command": "npx",
      "args": ["-y", "mailwarden"],
      "env": {
        "MAILWARDEN_TOKEN": "your-value",
        "MAILWARDEN_ALLOW_NO_TOKEN": "your-value",
        "MAILWARDEN_HOST": "your-value"
      }
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Configuration

VariableDescriptionRequired
MAILWARDEN_TOKENCredential the server authenticates with.Yes
MAILWARDEN_ALLOW_NO_TOKENCredential the server authenticates with.Yes
MAILWARDEN_HOSTEndpoint or connection string the server talks to.Optional

Example prompts to try

  • Use Mailwarden to search.
  • Use Mailwarden to get thread.
  • Use Mailwarden to list labels.

Frequently asked questions

It connects Mailwarden to MCP-compatible AI assistants such as Claude and Cursor, exposing 9 tools (search, get_thread, list_labels, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Mailwarden directly.