MCP Server Studio

Mailwarden MCP server

Gmail MCP server for email triage: search, labels, archive, trash, unsubscribe, snooze.

Registry name: io.github.csitte/mailwarden

Publisher
csitte
Runs
Runs locally
Package
npm
Version
0.34.0
Category
Communication
Updated
2026-11-25

Source code on GitHub

Set up Mailwarden (run locally)

Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "mailwarden": {
      "command": "npx",
      "args": [
        "-y",
        "[email protected]"
      ],
      "env": {
        "MAILWARDEN_DIR": "<MAILWARDEN_DIR>",
        "MAILWARDEN_CREDENTIALS": "<MAILWARDEN_CREDENTIALS>",
        "MAILWARDEN_AUTO_SWEEP": "<MAILWARDEN_AUTO_SWEEP>",
        "MAILWARDEN_DOWNLOAD_DIR": "<MAILWARDEN_DOWNLOAD_DIR>"
      }
    }
  }
}

Claude Code

Run in your terminal:

claude mcp add mailwarden -e MAILWARDEN_DIR='<MAILWARDEN_DIR>' -e MAILWARDEN_CREDENTIALS='<MAILWARDEN_CREDENTIALS>' -e MAILWARDEN_AUTO_SWEEP='<MAILWARDEN_AUTO_SWEEP>' -e MAILWARDEN_DOWNLOAD_DIR='<MAILWARDEN_DOWNLOAD_DIR>' -- npx -y [email protected]

Cursor

Add to .cursor/mcp.json:

{
  "mcpServers": {
    "mailwarden": {
      "command": "npx",
      "args": [
        "-y",
        "[email protected]"
      ],
      "env": {
        "MAILWARDEN_DIR": "<MAILWARDEN_DIR>",
        "MAILWARDEN_CREDENTIALS": "<MAILWARDEN_CREDENTIALS>",
        "MAILWARDEN_AUTO_SWEEP": "<MAILWARDEN_AUTO_SWEEP>",
        "MAILWARDEN_DOWNLOAD_DIR": "<MAILWARDEN_DOWNLOAD_DIR>"
      }
    }
  }
}

VS Code

Add to .vscode/mcp.json:

{
  "servers": {
    "mailwarden": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "[email protected]"
      ],
      "env": {
        "MAILWARDEN_DIR": "<MAILWARDEN_DIR>",
        "MAILWARDEN_CREDENTIALS": "<MAILWARDEN_CREDENTIALS>",
        "MAILWARDEN_AUTO_SWEEP": "<MAILWARDEN_AUTO_SWEEP>",
        "MAILWARDEN_DOWNLOAD_DIR": "<MAILWARDEN_DOWNLOAD_DIR>"
      }
    }
  }
}

Windsurf

Add to ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "mailwarden": {
      "command": "npx",
      "args": [
        "-y",
        "[email protected]"
      ],
      "env": {
        "MAILWARDEN_DIR": "<MAILWARDEN_DIR>",
        "MAILWARDEN_CREDENTIALS": "<MAILWARDEN_CREDENTIALS>",
        "MAILWARDEN_AUTO_SWEEP": "<MAILWARDEN_AUTO_SWEEP>",
        "MAILWARDEN_DOWNLOAD_DIR": "<MAILWARDEN_DOWNLOAD_DIR>"
      }
    }
  }
}

Settings

NameRequiredWhat it is
MAILWARDEN_DIRNoConfig directory (default ~/.mailwarden), holds credentials.json and token.json
MAILWARDEN_CREDENTIALSNoPath to the Google OAuth credentials.json (Desktop app client)
MAILWARDEN_AUTO_SWEEPNoSet to 1 to sweep due snoozes at startup and hourly while running
MAILWARDEN_DOWNLOAD_DIRNoRestrict download_attachment and export_thread writes to this directory (recommended for HTTP hosting)

More communication MCP servers