MailOps MCP Server
Automates Gmail maintenance using per-label rules — archive after N days, move to Trash after M days, or keep forever — via an Apps Script engine running in the user's own Google account. Supports dry runs first, never permanently deletes, and skips starred, Important and Keep-labelled mail. Includes tools to read inbox state, propose rule changes, manage labels and filters, and view run history/heartbeat.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
MailOps
Open-source Gmail automation, without handing your inbox to a server.
MailOps keeps Gmail tidy with simple per-label rules: archive after N days, move to Trash after M days, or keep forever. You manage everything from a clean web dashboard, or from Claude, through the MailOps MCP server.
Status: beta. The Gmail engine logic has run in production for one user since Sept 2026; engine v3 (no spreadsheet), the dashboard and the MCP server are new. See the roadmap.
Get started
Sign in to your MailOps dashboard (or self-host one).
Follow Setup: copy the engine into your Google account, run
setup, approve the code. Engine guide.Add rules, start a dry run, check Activity, then turn on production in Settings.
Optional: connect Claude.
Related MCP server: gmail-mcp-server
How it works
flowchart LR
E[Your Apps Script<br/>MailOps engine] -- archive / trash / labels / filters --> G[(Your Gmail)]
E <-- rules & approved changes / runs & heartbeat --> A[MailOps API<br/>Vercel]
W[Dashboard] --> A
C[Your Claude<br/>via MCP] -- read & propose --> A
A --> F[(Firestore)]Your Gmail stays yours. The engine runs as an Apps Script in your Google account. The web app only uses basic Google sign-in and never gets Gmail access.
Safe by default.
dry run first
move to Trash, never permanent delete
starred, Important and
Keep-labelled mail is never touchedevery change made from the web or Claude is a proposal you approve.
Free to run. Fits the Firebase Spark and Vercel Hobby free tiers, and Apps Script quotas. Self-host with your own Firebase and Vercel.
Claude-native. Ask Claude to "add a rule that trashes promo mail from my bank after 90 days". It proposes; you approve in the dashboard.
Repository
Path | What |
Next.js dashboard, API routes, MCP endpoint (Vercel) | |
Apps Script engine that runs in each user's account (tested in Node) | |
Shared zod schemas: rules, settings, proposals | |
Firestore security rules and indexes | |
Development
corepack pnpm install
corepack pnpm check # format + typecheck + tests (same as CI)See CONTRIBUTING.md. Security issues: see SECURITY.md.
License
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
Connect any IMAP/SMTP mailbox to Claude & ChatGPT: search, read, sort, draft. Sends only with OK.
Manage Gmail end-to-end: search, read, send, draft, label, and organize threads. Automate workflow…
Connect any mailbox to Claude, ChatGPT & AI: read, send, reply, schedule & search emails.
Your mailboxes in ChatGPT and Claude: Gmail, iCloud, Fastmail, any IMAP. Passwords stay yours.
Related MCP Servers
- FlicenseAqualityDmaintenanceEnables Claude to read, search, send, and manage Gmail messages and threads through natural language.13-
- FlicenseNot gradedqualityDmaintenanceEnables Claude to read and manage your Gmail account, including listing, searching, sending, drafting, replying to, archiving, labeling, and trashing emails via the Gmail API.-
- AlicenseAqualityBmaintenanceEnables Claude.ai and Claude Code to read and write a single Gmail mailbox, including search, drafts, sending, and label management.21MIT
- AlicenseNot gradedqualityBmaintenanceEnables Claude to search, read, summarize, and reversibly organize Gmail across multiple linked accounts, with journaled changes, undo, triage preferences, and defenses against prompt injection.2MIT