mailwarden

mailwarden

A native Gmail MCP server providing full mailbox control via the live Gmail API, including unique snooze functionality.

Category
访问服务器

README

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.

Tools

Tool What it does
search Gmail query syntax → thread summaries (from/subject/date/labels/snippet)
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)

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_snoozed tool),
  • via cron: mailwarden --sweep,
  • or automatically: set MAILWARDEN_AUTO_SWEEP=1 (hourly sweep while the server runs).

Setup

  1. 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.
  2. Put credentials.json in ~/.mailwarden/ (or set MAILWARDEN_CREDENTIALS=/path/to/credentials.json).
  3. Install & authorize once:
    npm install && npm run build
    mailwarden --auth        # opens a browser, stores a refresh token in ~/.mailwarden/token.json
    
    Scope requested: https://www.googleapis.com/auth/gmail.modify.

Run

  • Local (stdio) — for Claude Code / Claude Desktop:
    mailwarden
    
  • Remote (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/mcp

claude.ai (web): Settings → Connectors → Add custom connector → your https://your-host/mcp URL.

Config (env)

Var Meaning
MAILWARDEN_DIR config dir (default ~/.mailwarden)
MAILWARDEN_CREDENTIALS path to credentials.json
MAILWARDEN_AUTO_SWEEP 1 → hourly snooze sweep while running
PORT HTTP port (default 8787)
MAILWARDEN_TOKEN 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 © C.Sitte Softwaretechnik

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选