Mail Memex
Description
Personal email archive with SQLite+FTS5 full-text search and MCP server for LLM access. Part of the *-memex ecosystem.
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
README
mail-memex
Personal email archive with SQLite+FTS5 full-text search and an MCP server for LLM access.
Part of the [`*-memex` ecosystem](../memex) of co-located personal archives: `llm-memex` (AI conversations), `bookmark-memex`, `photo-memex`, `book-memex`, `hugo-memex`, and `health-memex`.
What It Does
- Ingests email from Gmail Takeout, mbox files,
.emlfiles, or IMAP (Gmail OAuth2 or any IMAP server). - Indexes every message with SQLite FTS5 for ranked full-text search (Porter stemming, BM25 weighting).
- Rebuilds threads from
In-Reply-To/Referencesheaders. - Exposes the archive as an MCP server so LLMs can query it with SQL or Gmail-style operators.
- Exports to JSON, mbox, markdown, a single-file HTML SPA (embedded SQLite via sql.js), or arkiv JSONL for cross-archive ingestion.
- Marginalia: attach free-form notes to any email, thread, or marginalia itself, addressable by durable URIs that survive re-imports.
- Soft-deletes: archived emails and threads stay queryable but are filtered from default results, so MCP trails and marginalia references don't break.
mail-memex is **not an email client**. It does not send or reply to mail. It's a long-term archive and an LLM-queryable surface on top of your mail history.
Install
pip install -e ".[mcp,imap,imap-oauth]"
Optional extras: `mcp` (MCP server), `imap` (IMAP pull with keyring), `imap-oauth` (Gmail OAuth2).
Quick Start
# 1. Initialize
mail-memex init
# 2. Import from Gmail Takeout, mbox, or eml
mail-memex import gmail ~/takeout/"All mail Including Spam and Trash.mbox"
mail-memex import mbox archive.mbox
mail-memex import eml ~/Mail/
# 3. Search
mail-memex search "project proposal"
mail-memex search "from:alice after:2024-01-01 has:attachment"
# 4. Start MCP server (LLM-facing)
mail-memex mcp
CLI Commands
| Command | Purpose |
|---|---|
mail-memex init |
Create the database |
| `mail-memex import {mbox,eml,gma |
Related Skills
Agency Agents
A complete AI agency at your fingertips - From frontend wizards to Reddit community ninjas, from whimsy inject
AI Firecrawl
🔥 The API to search, scrape, and interact with the web for AI
AI Artifacts Builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web tech
AI CrewAI
Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewA
AI TrendRadar
⭐AI-driven public opinion & trend monitor with multi-platform aggregation, RSS, and smart alerts.🎯 告别信息过载,你的
AI mem0
| Universal memory layer for AI Agents | 51341 | 221 | 1 |
AI