lethe
Provides read-only Gmail metadata access to scan recent messages for From and List-Unsubscribe headers, group mailing-list senders, and perform RFC 8058 one-click unsubscribes for selected senders.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@lethe scan my last 90 days of mail and unsubscribe from the biggest senders"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
lethe
Lethaei ad fluminis undam / securos latices et longa oblivia potant. At the waters of the river Lethe they drink the draught that frees from care, and long forgetting. — Virgil, Aeneid VI.714–715
An MCP server that finds every mailing list in your mailbox and unsubscribes from the ones you choose. It reads headers only. It cannot send, move or delete mail.
Point it at a Microsoft 365 or Gmail mailbox, ask your assistant to scan the last 90 days, pick what to keep, and lethe makes the unsubscribe requests: the standard one-click kind (RFC 8058) that senders publish in their own List-Unsubscribe header.
What it can and cannot do
Microsoft 365 | Gmail | |
Scope requested |
|
|
Reads message bodies | No (it asks only for headers, but the scope would allow it) | Cannot — the scope does not expose bodies |
Sends, moves, deletes, labels mail | Cannot | Cannot |
Outbound network calls | Only the unsubscribe URLs of senders you name, with | Same |
Senders that only accept an unsubscribe email are never contacted. lethe cannot send mail, so it hands you the address instead.
See SECURITY.md for what these guarantees rest on and where they stop.
Related MCP server: multi-email
Tools
Tool | What it does |
| Provider, signed-in account, scope, kill-switch state |
| Sign in (M365 device code; Gmail opens a browser on the host) |
| Read |
| Page through a scan, biggest senders first |
| Without |
| Everything done for a scan, per sender |
Typical session: "Scan my mail for the last 90 days, show me the 40 biggest senders, then unsubscribe from everything except my bank and the airline."
On its first real mailbox (90 days, 13,042 messages), lethe found 592 senders with an unsubscribe header covering 10,894 of those messages. 98% of them supported one-click.
How unsubscribing works
one-click — the sender advertises
List-Unsubscribe-Post: List-Unsubscribe=One-Click. lethe POSTs that body to the sender's https URL. It is the same mechanism mail providers use behind their own Unsubscribe buttons, and Gmail and Yahoo require it of bulk senders, so most lists support it.link — an https URL with no one-click support. Skipped unless you pass
allow_link_visits=true; a visited link may still need a confirm click on the sender's page.mailto — reported back to you, never sent.
Safety rails
Flagged senders are skipped by default — freemail addresses with list headers, display names imitating postal/tax/government brands on unrelated domains, and headers with unrendered templates. Unsubscribing from phishing only confirms your address is live; block those instead.
SSRF guard — https only; every host, including every redirect hop, must resolve to a public IP.
Newest header wins — unsubscribe tokens can expire, so the scan keeps each sender's most recent header.
Audit log — every scan and request is appended to
audit.loginLETHE_HOME.Kill switch — create
LETHE_HOME/DISABLEDor setLETHE_DISABLED=1.
Install
Install straight from GitHub with uv:
uvx --from git+https://github.com/SuperAngryMonkey/lethe@v0.1.0 lethe-mcp --version(A PyPI package, lethe-mcp, and an MCP registry listing are coming. Until then, use the GitHub form in the configs below.)
Microsoft 365
lethe has no shared app registration. Register your own (five minutes):
Entra admin center → App registrations → New registration. Single tenant. No redirect URI.
Authentication → Settings → Allow public client flows: Yes.
API permissions → Microsoft Graph → Delegated → Mail.Read. Nothing else.
Copy the Application (client) ID and Directory (tenant) ID.
{
"mcpServers": {
"lethe": {
"command": "uvx",
"args": ["--from", "git+https://github.com/SuperAngryMonkey/lethe@v0.1.0", "lethe-mcp"],
"env": {
"LETHE_PROVIDER": "m365",
"LETHE_M365_CLIENT_ID": "<client id>",
"LETHE_M365_TENANT_ID": "<tenant id>"
}
}
}
}Then ask your assistant to run lethe_login, enter the code it shows, and run lethe_login_finish. Or run lethe-mcp auth in a terminal with the same environment.
Gmail
Google Cloud console → new project → enable the Gmail API.
OAuth consent screen → External, Testing, add yourself as a test user. Add the scope
https://www.googleapis.com/auth/gmail.metadata.Credentials → Create OAuth client ID → Desktop app. Download the JSON.
"lethe-gmail": {
"command": "uvx",
"args": ["--from", "git+https://github.com/SuperAngryMonkey/lethe@v0.1.0", "lethe-mcp"],
"env": {
"LETHE_PROVIDER": "gmail",
"LETHE_GMAIL_CLIENT_SECRETS": "/path/to/client_secret.json",
"LETHE_HOME": "~/.config/lethe-gmail"
}
}Sign in with lethe-mcp auth in a terminal (a browser opens), or ask for lethe_login. gmail.metadata is a restricted scope: in Testing mode Google lets you and your listed test users use your own client without verification, and the refresh token lasts seven days before you sign in again.
gmail.metadata does not allow Gmail's search syntax, so lethe pages through mail newest-first and stops at the cutoff date. A new Google Cloud project has a low per-minute quota; lethe backs off and retries when it hits it, so a large 90-day Gmail scan can take several minutes.
Several mailboxes
Run one entry per mailbox, each with its own LETHE_HOME.
Configuration
Variable | Default | |
| — |
|
|
| token, saved scans, audit log, kill switch |
| — | your Entra app |
|
| your tenant |
| — | path to the desktop-client JSON |
|
| parallel unsubscribe requests (1–16) |
Limits
Unsubscribing stops future mail; existing messages are untouched. Senders are allowed up to ten days to comply.
Some senders reject automated requests (403/429) or publish broken headers. These are reported as failures; do them by hand.
Microsoft 365 is
/meonly — no shared mailboxes.
Documentation
SECURITY.md: what the read-only guarantee rests on, and where it stops
DESIGN.md: how a scan and an unsubscribe work, and why
OPERATIONS.md: sign-in, reading results, the audit log, the kill switch, removal
docs/decisions/: architecture decision records
CONTRIBUTING.md: send us the headers lethe gets wrong
License
MIT © 2026 800 Pound Gorilla Inc.
Available Tools
7 toolslethe_auth_statusA
Report the provider, whether lethe is signed in, its scope, and whether the kill switch is on.
Inputs: no named parameters.
lethe_loginA
Start sign-in. Microsoft 365: returns a URL and code to enter, then call lethe_login_finish. Gmail: opens a browser on this machine and waits up to four minutes for you to approve.
Inputs: no named parameters. Returns: result
lethe_login_finishA
Microsoft 365 only: complete the sign-in started by lethe_login. Safe to call repeatedly.
Inputs: no named parameters. Returns: result
lethe_reportC
What has been done for a scan: every sender with a recorded unsubscribe status.
Inputs: scan_id.
lethe_scanA
Read the From and List-Unsubscribe headers of every message received in the last days
days (all folders except Sent, Drafts and Outbox), group them by sender, and save the result.
Returns totals, the scan_id, and the top biggest senders that can be unsubscribed from.
A large mailbox can take a few minutes.
Inputs: top, days.
lethe_sendersA
Page through a saved scan (latest by default), biggest senders first. query filters on address or display name; method filters on one-click | link | mailto; include_non_list also shows senders with no List-Unsubscribe header.
Inputs: limit, query, method, offset, +2 more.
lethe_unsubscribeA
Unsubscribe from the named sender addresses (from a saved scan; latest by default).
One-click senders (RFC 8058) get a single POST to their own unsubscribe URL. Senders with only a plain link are skipped unless allow_link_visits=true; a visited link may still need a confirm click on the sender's page. mailto-only senders are never contacted: lethe cannot send mail, so their addresses are returned for you to email yourself. Flagged senders (possible phishing or broken headers) are skipped unless include_flagged=true.
Nothing happens without confirm=true. Without it, this returns the plan.
Inputs: senders (required), confirm, scan_id, include_flagged, +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Each tool maps to a distinct stage of the workflow: auth_status/login/login_finish handle authentication, scan creates a saved scan, senders pages it, unsubscribe acts on senders, and report reviews outcomes. The two-step login pair is clearly differentiated by the descriptions.
All seven tools use the lethe_ prefix and lowercase snake_case, with no mixed casing conventions. The only minor deviation is that some names are verbs (scan, unsubscribe) while others are nouns (senders, report), but the pattern remains readable.
Seven tools are well scoped for a focused email-unsubscribe workflow, and each tool has a clear role. There is no obvious redundancy or missing operational stage that would require more tools.
The core lifecycle is covered: authenticate, scan the mailbox, inspect senders, unsubscribe, and report results. Minor gaps include no logout or kill-switch toggle despite auth_status mentioning it, and no explicit scan listing/deletion management.
Maintenance
Related MCP Connectors
Gmail deliverability & tracking readiness auditor, separate-send dry-run planner, CSV analytics
Hosted email MCP for your own Gmail, Outlook.com, Microsoft 365, iCloud or IMAP inbox: read, search, draft, reply in thread, forward and file mail. It moves or flags up to 500 messages in one call, and a send leaves exactly one copy in Sent. A calendar is a separate connection, and connecting one adds diary and scheduling tools.
Never-stored live email: read, send and triage Gmail, Outlook / Microsoft 365, or any IMAP mailbox.
Read, send, file and search email in any Gmail, Microsoft 365 or IMAP mailbox, plus its calendar.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables bulk Gmail inbox cleanup including trashing emails, managing filters, and extracting unsubscribe links, with dry-run previews and automatic retry/backoff to handle rate limits.MIT
- AlicenseNot gradedqualityCmaintenanceEnables safe, multi-account Gmail and Microsoft 365 operations with explicit aliases, including searching, reading, drafting, archiving, labels/categories, and human-reviewed sending via a localhost approval window.MIT
- AlicenseNot gradedqualityDmaintenanceEnables monitoring shared Google storage quota and recovering Gmail space by scanning cleanup candidates, scoring them deterministically, and requiring review before moving non-protected messages to Trash.MIT
- AlicenseAqualityBmaintenanceEnables reading and searching personal Outlook/Hotmail mail, filing into folders, deleting, and unsubscribing from newsletters via Microsoft Graph.1285 npm1MIT