mailsiftCAUTION
Read-only multi-mailbox triage: watch inboxes and spam, judge what actually matters with an LLM, and push only that to Feishu or a webhook. MCP server and a web view included.
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
Unified IMAP monitoring for important email. mailsift scans every configured mailbox—including spam folders—uses an LLM plus local rules to classify messages, and sends important results to Feishu or a generic webhook.
mailsift is an assistant, not a mail client. It is read-only: it does not send, reply to, organize, or mark messages as read. Classification can be wrong, so keep using your mail client as the source of truth.
中文文档:README.zh-CN.md。
Features
- Any IMAP provider, with multiple accounts.
- Spam-folder monitoring with provider-specific folder-name detection.
- Personal rules plus LLM classification; keyword fallback when the LLM is not configured or fails.
- Real-time push notifications and a daily digest.
- Crash-safe cursor handling and recovery for interrupted processing.
- Optional MCP server for querying local triage results.
Quick start
git clone https://github.com/itswl/mailsift.git cd mailsift cp .env.example .env vim .env docker compose up -d
At minimum, configure one mailbox, one output (FEISHU_WEBHOOK_URL or WEBHOOK_URL), and optionally an LLM API key. For local development with Node >= 22.5:
npm install npm run check npm run dev
Configuration
All settings are environment variables. See .env.example for the complete template.
MAIL_ACCOUNT_1=qq|[email protected]|app-password MAIL_ACCOUNT_1_NAME=personal-qq MAIL_ACCOUNT_1_FOLDERS=all MAIL_ACCOUNT_2=imap|[email protected]|password|imap.example.com FEISHU_WEBHOOK_URL= WEBHOOK_URL= WEBHOOK_TOKEN= LLM_PROVIDER=deepseek LLM_MODEL=deepseek-flash LLM_API_KEY= PUSH_MIN_IMPORTANCE=warning SPAM_RANK_BONUS=0 DIGEST_ENABLED=true DIGEST_HOUR=9
MAIL_ACCOUNT_N_FOLDERS accepts all, INBOX,spam, or explicit folder names. The all token excludes sent, drafts, trash, and provider-wide virtual views. The spam token detects the provider's spam folder.
SUPPRESS_SELF_FORWARDS=true (the default) stops one me
1578c80988c6OBSERVED · 2026-10-11Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.
claude mcp add mailsift --env FEISHU_WEBHOOK_SECRET=${FEISHU_WEBHOOK_SECRET} --env GMAIL_CLIENT_SECRET=${GMAIL_CLIENT_SECRET} --env LLM_API_KEY=${LLM_API_KEY} --env MCP_TOKEN=${MCP_TOKEN} -- npx -y [email protected]{
"mcpServers": {
"mailsift": {
"command": "npx",
"args": [
"-y",
"[email protected]"
],
"env": {
"FEISHU_WEBHOOK_SECRET": "${FEISHU_WEBHOOK_SECRET}",
"GMAIL_CLIENT_SECRET": "${GMAIL_CLIENT_SECRET}",
"LLM_API_KEY": "${LLM_API_KEY}",
"MCP_TOKEN": "${MCP_TOKEN}"
}
}
}
}Exposed tools (1)
1 read · 0 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
mailsift | read | What arrived in your mailboxes, and how it was judged. |
Trust audit
CAUTIONgrade B · trust 85/100 Install with care. The audit found things worth knowing before you trust its output.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | WARN |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- declared (5 observation(s))
- Shell
- none-observed
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (10)
console.log(`❌ Token exchange failed: ${error instanceof AuthError ? error.message : error}`);export const icon192 = Buffer.from('iVBORw0KGgoAAAANSUhEUgAAAMAAAADACAYAAABS3GwHAAAG20lEQVR42u3dvasdRRiA8f1j7NOrpYVWNmJhJ2IpEQsxQkARFS4IfoGikkK8lSBapRDEQguxCQqiGBDEgAoBUQwIwsp7deXkkpx79pzZ3Xd2fgNPk49zexport const icon512 = Buffer.from('iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAVtklEQVR42u3dv4tddf7Hcf+Y7dOrZYpYbSMWdhIsQ4JFMMJARFQYCKgRdklCCnEqITiVRSCkWIthmxBBIhsIDAmswkBw2YAg3N3XwMhg5sedO+fH58fjexport const maskable512 = Buffer.from('iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAARlUlEQVR42u3dz4ud1QHHYf+Y7t1Hly505UayyE4kyxJxIUYYqEhbGBCMBipVspDOKiDOKgshdKGLoZuQgCQYEEICtTAQUjogBG75xl6YDjNz733vexport const appleTouch180 = Buffer.from('iVBORw0KGgoAAAANSUhEUgAAALQAAAC0CAYAAAA9zQYyAAAGAElEQVR42u3dv4skRRTA8fljzC9XQwONTMTATMRQTgzEEw4UUWFB8BcoKheIGwniRRcIYqDBYXIoyIkHgnigwoIoHghCy1Nah4Wd7Z7p7npV/Xexport const favicon64 = Buffer.from('iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAACyUlEQVR42u2bvUsDMRjG709xcLezOjro5CIOThVxFMVBVBAUty5+gqLiIHYSxM1BsA46uYiCKBYKoqCCnCgKghDvKU0J5117uUti7pIXnqUfuby/JEreturn `http://127.0.0.1:${port}/mcp`;const url = (path: string): URL => new URL(path, 'http://127.0.0.1:8410');
@modelcontextprotocol/sdk, @opentelemetry/api, @opentelemetry/exporter-metrics-otlp-proto, @opentelemetry/sdk-metrics, imapflow, mailparser, zod, @types/mailparser
the full surface. `MCP_TOKEN` then stays a read-only credential, which is what
Gates applied: no_behavioural_pass.
1578c80988c6full audit observations/trust-audit/mcp-server/itswl__mailsift.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-11 | 1578c80988c6 | CAUTION | B | 85 | first audit |
Questions
What is the mailsift MCP server?
Read-only multi-mailbox triage: watch inboxes and spam, judge what actually matters with an LLM, and push only that to Feishu or a webhook. MCP server and a web view included.
What tools does mailsift expose?
1 in total: 1 read-only, 0 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is mailsift safe to connect to an agent?
With care. The audit graded it B (85/100) and found 10 things worth knowing before you trust this server, listed below with the exact line each was found on.
What credentials does mailsift need?
It reads FEISHU_WEBHOOK_SECRET, GMAIL_CLIENT_SECRET, LLM_API_KEY, MCP_TOKEN, MCP_WRITE_TOKEN, OAUTH_REDIRECT_PORT, OUTLOOK_CLIENT_SECRET, TOKEN_STORE_PATH, WEBHOOKWISE_TOKEN and WEBHOOK_TOKEN from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How does mailsift run?
It speaks stdio and streamable-http, so it runs as a local process your client starts. It is published on npm as mailsift at 1.0.0.
How current is this page?
The grade is for one exact copy of the source (1578c80988c6), read on 2026-10-11. The repository is watched and re-audited when it changes.